Saturday, June 20, 2020

Halo MCC crashes with easy anti cheat error 00000001


Shortly after launching Halo Master Chief Collection (MCC) the program crashes requiring an end task.  Both normal and Anti-Cheat Disabled mode fail. A task end of a normal launch produces

Game Security Violation Detected (#00000001)











This was resolved by installing update KB4497165

https://support.microsoft.com/en-us/help/4497165/kb4497165-intel-microcode-updates


A previous update of some type is suspected to have caused the issue.

MCC seems to be very sensitive to updates.  Several times the game will only launch one all pending updates have been installed and the computer rebooted.

Thursday, June 18, 2020

remote password changing


Occasionally you cannot RDP to a remote machine because your password has expired.  This article provides a powershell script which allows remote password changing, as long as you know the previous password.
https://evotec.xyz/how-to-change-your-own-expired-password-when-you-cant-login-to-rdp/

Wednesday, June 3, 2020

0 - Python in 10(minutes)


This is just a very quick guide to setup and use a python code development environment.

download PyCharm here
https://www.jetbrains.com/pycharm/

Launch Pycharm and start a new project with a relevant name.  At this point PyCharm will get ready for a new project and download and install python.

You may be prompted to exclude project directories from Windows Defender scanning.

Right click the project with the name you selected and select New_Python File.

A Python code window will open.

This installs a tool which can compile python code into an exe file.

Open a command window and change directory to %USERPROFILE%\pycharmprojects\<projectname>\venv\scripts

run the command

pip install pyinstaller


To begin code development enter the code into the python file window.  Editing is automatically saved to the .py file.

To run or test the code, open a command window and change directory to the scripts folder as above.

python <path to .py file>


Once the code is operating successfully, compile it with

pyinstaller <path to .py file>

The compiled exe file is generated in %USERPROFILE%\pycharmprojects\<projectname>\venv\scripts\dist

Select Browser when link is clicked


I use multiple browsers.  Chrome for Google stuff.  Edge for Microsoft Stuff etc. One browser is sandboxed using Sandboxie.

I want to be prompted every time I click a link in an external app, e.g. email so I can select which browser I want to use to view the website.

The key to this is a great piece of freeware called BrowserSelect by Borhan Hafez.  This works out what the available browsers are and allows you to choose one when a link is clicked.  It is a 64-bit program that installs to the user profile but can also be installed to C:\Program Files\BrowserSelect

BrowserSelect becomes the default "browser" for Windows.  Instead of opening a webpage it allows you to select the installed browser you want.  BrowserSelect determines what the available browsers are from registry keys that browsers use to identify themselves as such.

Portable browsers are browser versions that enable themselves to exist, self-contained, under one folder.  You should be able to run it from a USB key for example.  Some browser installation programs provide an option to install in portable mode.  Portable mode though, will not register the browser as a web browser option under Apps_Default Apps_ Web browser.  BrowserSelect will also not present the portable mode browser as an option because it refers to the same registry keys as windows to determine browser options.

Configuring a portable mode browser as an available web browser application option requires a set of additional registry keys to be created.  Christoph Kolbicz describes how to do that here  Note that any application you wanted to pass URLs to could be set up as a web browser using the additional keys.  Indeed this is what BrowserSelect is doing to take over the URL launch handling.

When a browser is configured as a web browser option, one important registry key defines what exe is actually the target of the call to the web browser.  In the case of Google Chrome it is
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\Google Chrome\shell\open\command]
@="\"C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe\""

The HKCU\SOFTWARE\Clients\StartMenuInternet is also in use here so be aware that that is probably where you want the configuration to apply of a particular user.

The default key that points to the browser exe can only be a single string containing the path to the target browser exe.  Any variations will not work.  If you have a shortcut to launch a sandboxed browser, it is calling something like
"C:\Program Files\Sandboxie\Start.exe" /box:DefaultBox "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"

This command could NOT be used in the open command registry key.

A special exe would be required to execute the actual command we require.  It is possible to write a short python program and compile it into an exe.  The exe simply calls the above command and allows a URL argument to be included.

import os;
import sys;
# if a URL is supplied then use it as a parameter else launch without.
if len(sys.argv) > 1:
    # set variable for the argument
    URL = sys.argv[1]
    os.system(r'C:\Program" "Files\Sandboxie\Start.exe /box:DefaultBox C:\Program Files (x86)\Google\Chrome\Application\chrome.exe ' + URL)
else:
    os.system(r'C:\Program" "Files\Sandboxie\Start.exe /box:DefaultBox C:\Program Files (x86)\Google\Chrome\Application\chrome.exe')


Once the python code is compiled into an exe file, the path to this exe can be entered into the registry key enabling a sandboxed browser to be a launch option from within BrowserSelect.