Games Explorer Manager Install: Difference between revisions
Line 42: | Line 42: | ||
=== Check if already installed. === | === Check if already installed. === | ||
This is something I custom wrote myself by using common sense and a well rounded knowledge of the Windows Registry. I also used the MessageBox plug-in because it allows a lot of leeway with prompting the user. | This is something I custom wrote myself by using common sense and a well rounded knowledge of the Windows Registry. I also used the MessageBox plug-in because it allows a lot of leeway with prompting the user. Now what is going on in the code below is the installer reads the Windows Registry for the location of the Uninstaller for GEM. Then if the Uninstaller exists then the program is installed (if not then it must not be installed so continue with the setup). If install is detected then a custom message box is displayed (using the MessageBox plug-in) and then the user decides whether to cancel the setup or to launch the Uninstaller of the currently installed program. | ||
* NSIS Wiki Source: [[MessageBox_plug-in]] | * NSIS Wiki Source: [[MessageBox_plug-in]] |
Revision as of 18:46, 17 August 2007
Download
Games_Explorer_Manager_Install_src.zip (98 KB) An installer for the GEM (You must compile it with NSIS).
Games Explorer Manager (871 KB) Here is a link to the GEM without the installer.
About
About GEM
The Games Explorer Manager (GEM) is a nice little tool that allows the user to edit the Games Explorer and add their own games or programs (that are already installed) even though Windows Vista didn't already detect them and put it in the list. This is if a user has a game that is so old, not well known that Vista doesn't add it to the games list automatically, or that the developers of the game didn't set up the installer to register with the Vista Games Explorer then this would be a great alternative for someone looking for a quick an easy fix that is simple.
About GEM Installer
This is an installer for the Games Explorer Manager (GEM). This installer is fully compatible with Windows Vista. This installer uses many techniques, concepts, and examples that have been developed over time by the NSIS developers and community. There is a section that will go over the features and functionality of the installer.
Who Created It?
GEM
The Games Explorer Manager (GEM) was developed by a company called Extensible Software. The actual copyright to GEM is held by Andy Chentsov.
GEM Installer
The installer for GEM was created and currently maintained by Sam Gleske (User:sag47).
Concepts used by Installer
.onInit Function
Only allow one installer instance at a time.
This is a nice concept that I got from the NSIS wiki. I modified it a little to fit my needs and then like all users should I updated the wiki to include my modified example so others can benefit.
- NSIS Wiki Source: Allow_only_one_installer_instance
BringToFront ; Check if already running ; If so don't open another but bring to front System::Call "kernel32::CreateMutexA(i 0, i 0, t '$(^Name)') i .r0 ?e" Pop $0 StrCmp $0 0 launch StrLen $0 "$(^Name)" IntOp $0 $0 + 1 loop: FindWindow $1 '#32770' '' 0 $1 IntCmp $1 0 +4 System::Call "user32::GetWindowText(i r1, t .r2, i r0) i." StrCmp $2 "$(^Name)" 0 loop System::Call "user32::ShowWindow(i r1,i 9) i." ; If minimized then maximize System::Call "user32::SetForegroundWindow(i r1) i." ; Brint to front Abort launch:
Check if already installed.
This is something I custom wrote myself by using common sense and a well rounded knowledge of the Windows Registry. I also used the MessageBox plug-in because it allows a lot of leeway with prompting the user. Now what is going on in the code below is the installer reads the Windows Registry for the location of the Uninstaller for GEM. Then if the Uninstaller exists then the program is installed (if not then it must not be installed so continue with the setup). If install is detected then a custom message box is displayed (using the MessageBox plug-in) and then the user decides whether to cancel the setup or to launch the Uninstaller of the currently installed program.
- NSIS Wiki Source: MessageBox_plug-in
; Check to see if already installed ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Games Explorer Manager" "UninstallString" IfFileExists $R0 +1 NotInstalled messagebox::show MB_DEFBUTTON4|MB_TOPMOST "Games Explorer Manager" \ "0,103" \ "GEM is apparently already installed." \ "Launch Uninstall" "Cancel" Pop $R1 StrCmp $R1 2 Quit +1 Exec $R0 Quit: Quit NotInstalled:
Development
TODO: