After a recent Steam update I started getting a warning about Windows Compatibility Mode. A quick check of both the shortcut and the executable itself revealed that no such setting was set. At first I was ignoring it as a fluke of Windows but it started screwing with my games… I need muh vida gumes!
The fix was simple, although annoying. Check the following
regedit paths for the
steam.exe executable. If you find any delete them and reboot.
- HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers
- HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers
- HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Compatibility Assistant\Persisted
This fixed the issue for me. Good luck to you.
With the exception my gaming machine I have abandoned Windows. Still, however, I do some times deal with it.
One of the more common annoyances is trying to shutdown when Windows has downloaded, but not installed, updates. In this case Windows may take forever and a day to finally cut the power. If you need to go somewhere in a rush, this blows. If you are on a laptop and the battery is about to die you are better off with hibernation (which has to be enabled, takes up a decent amount of disk space, and has its own problems), putting the machine to sleep (which has its own problems), or just letting it die at the desktop. If you interrupt the update process– say, because it has been nearly 30 minutes– you risk explodeorizing your install.
There is an option built into Windows 7 that will allow you to add an ‘Install Updates And Shut Down’ in Shut Down Windows dialog box option. For some reason it is not enabled by default, but that is pretty easy to take care of:
- Start, Run, enter
- Surf over to User Configuration, Administrative Templates, Windows Components, Windows Update.
- Edit Do not adjust default option to ‘Install Updates And Shut Down’ in Shut Down Windows dialog box to be Enabled. Make sure Do not display ‘Install Updates and Shut Down’ Option in Shut Down Windows dialog box is not set to Enabled.
The option will only appear when there are updates that need installing. You could also change your Windows Update settings but if you got here you probably are not interested in doing that.
I have not tested this with other versions of Windows. I assume this applies to Vista/Server 2008 and up but do not hold me to that.
The Allegro game programming library has released v5 of their popular library and with it comes a whole mess of great changes. Thing is, since most of the applications you make with it are going to be games, your main audience lives in Windows. Since I am really upset with Microsofts offerings in this area I needed a way to capture this audience without having to drive myself insane.
What follows is how I am making Windows executables in Linux using Allegro. Please note that I live in Ubuntu (currently 10.10, Maverick Meerkat). You may have to make some slight changes to fit your distro but that should not be a big deal. These instructions assume a clean installation where no other copy of Allegro has been installed (not sure if that would be a problem or not as I have not tested).
- Install the required programs:
sudo apt-get install cmake mingw32
- Retrieve and uncompress DirectX:
Download and copy the DirectX headers and libraries to
/usr/i586-mingw32msvc/. Note the file structure within the archive should compare to the mentioned directory. When prompted to overwrite any files do so but make sure you have a backup first in case something explodes.
- Retrieve and uncompress Allegro 5:
Download allegro-5.x.x.tar.gz from their site. Uncompress some place easy to get to. I used my desktop as we can delete this when done.
- Compile from source:
In a terminal type
cd [path to uncompressed archive] && mkdir build && cd build && cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-mingw.cmake .. && make && sudo make install
This may take a little while depending on your hardware.
You should now have a functioning cross compiler setup for Allegro 5. Just replace
i586-mingw32msvc-g++ (for example, I compiled my first test with
i586-mingw32msvc-g++ alleg.cpp -lallegro.dll -lallegro_image.dll -lallegro_font.dll -o alleg.exe). The DLLs you will need are in
/usr/i586-mingw32msvc/bin/. You may now delete all of our working files on your desktop (or wherever you put them).
There are still one or two things I need to figure out. For one, dynamically linked programs are peachy on Linux; I am comfortable in my assumption that most people using Linux either already expect this or are willing to learn. Windows, not so much. I want to statically link for that platform but I have yet to experiment with that. Another thing is the fact that my current method has Windows opening up a console window in addition to the “main” window. I am sure this is also very simple but have not yet played with it.
There are a few services I run that I need to access over the web that I do not want anyone watching (phpMyAdmin, for example). The simple solution is to encrypt this traffic with SSL certificates. Here is how I did it on Windows with Apache 2.2:
- Install the latest Apache 2.2 with OpenSSL: http://httpd.apache.org/download.cgi.
- Open the Command Prompt and browse to [apache 2.2 path]/bin.
openssl req -config ../conf/openssl.cnf -new -out foo.csr -keyout foo.pem. Fill out this information the best you can but you can leave most of it blank. The most notable exceptions are the PEM Pass Phrase fields and the Common Name field (which should be the domain name you will use this certificate on). It is best that you leave the Challenge Password at the end blank.
openssl rsa -in foo.pem -out foo.key. You will be asked to reenter the password you entered in the last step.
openssl x509 -in foo.csr -out foo.crt -req -signkey foo.key -days 3650. You can replace 3560 with however long you want to certificate to be valid for.
- You will now wind up with four files: foo.crt, foo.csr, foo.key, and foo.pem. At this point you really only need foo.crt and foo.key and may delete the other two (unless you want to sign more certificates later on).
- Move your two remaining files somewhere safe (not any place where the web server will be able to serve them to clients).
- Open [apache 2.2 path]/conf/httpd.conf in your favorite text editor. Uncomment out the line
LoadModule ssl_module modules/mod_ssl.so.
- Open [apache 2.2 path]/conf/extra/httpd-ssl.conf. Uncomment out the line
- In Windows Explorer browse to [apache 2.2 path]/conf and open up the configuration for the site you want to SSL enable. Make sure you are setup to listen on port 443 if you are running a virtual host. Add the lines
SSLCertificateFile "[foo.crt path]", and
SSLCertificateKeyFile "[foo.key path]".
- Restart Apache 2.2:
net stop apache2.2 and
net start apache2.2
- Certificates can only be used for whole domains or virtual hosts as opposed to a single directory. However with some clever allows, denies, and redirects in your web root you can do just about anything.
- Only one SSL connection per IP on the same server is allowed. This is by design within SSL.
- These certificates are self-signed. That means that anyone who views your new secure site will most likely be greeted with a warning they must accept before continuing. You setup the certificates yourself so you know there is nothing fishy going on but they might not know that. If you want to avoid this you will have to put out the cash to Verisign or someone else who can offer the same service.
- Check out the SSLCipherSuite and SSLCARevocationFile directives (which you will notice are missing in my instructions) to further lock down your site.
- Remember that if you ever change your certificate in any way the client may need to remove their old certificate before they will be able to view the site again.
- I generally replace foo with the domain name.
- Since this was always meant as a quick-and-dirty howto you can find more information at the Apache site.
- I am running Windows XP SP3, Apache 2.2.14, and the included OpenSSL 0.9.8k.
As a follow up to my Tether Motorola Droid with Ubuntu 9.10 and Ubuntu 10.04 article I have decided to post the steps for Windows 7.
- Grab and install the latest Droid Drivers: http://www.motorola.com/Support/US-EN/Support-Homepage/Software_and_Drivers/USB-and-PC-Charging-Drivers/
- Grab and install the latest OpenVPN: http://www.openvpn.net/index.php/open-source/downloads.html
- Grab the latest Android SDK and extract it: http://developer.android.com/sdk/
- Create a file called azilink.ovpn file and enter into it:
remote 127.0.0.1 41927 tcp-client
ifconfig 192.168.56.2 192.168.56.1
route 0.0.0.0 126.96.36.199
route 188.8.131.52 184.108.40.206
dhcp-option DNS 192.168.56.1
- Create a file called azilink.bat and enter into it:
"[path to android sdk]\tools\adb.exe" forward tcp:41927 tcp:41927
openvpn "[path to azilink.ovpn]"
- Set your Droid to debugging mode: Settings -> Applications -> Development -> USB debugging
- Grab and install the latest Azilink .apk file onto your Droid: http://azilink.googlecode.com/ (This can be done by pointing the Droid’s web browser directly to the download link or loading it onto the SD card. Either way you may need to go to Settings -> Applications -> Unknown sources to allow it to be installed.)
- Start up Azilink on your Droid and select Service active.
- Right-click azilink.bat and select Run as Administrator.
If all these steps went well you should be able to access the Internet on your computer via Azilink’s tethering capabilities. Be sure to check out the About screen in the Azilink application on the Droid to see if any of that applies to you.
A few things worth mentioning:
- This method does not require your Droid to be rooted.
- I am under the impression that these steps will also work for Windows Vista but I can not confirm that.
- I am under the impression that these steps will also work for Windows XP with the
route-method exe line removed from azilink.ovpn but I can not confirm that.
- I am running Droid firmware 2.1, OpenVPN 2.1.1, Azilink 2.0.2, and MotoConnect 4.6.0.