Software to make life easier

Vista Post-install Run for ColorCache, PTFB Pro and PromptPal

July 11th, 2007 by Paul Roberts

As promised, we’ve modified our installers for ColorCache, PTFB Pro and PromptPal to include the new technique for the post-install run under Vista. The latest releases for PTFB Pro and PromptPal also contain some useful bugfixes, so be sure to update to the latest versions from our site if you haven’t done so
already.

Since we use InnoSetup - a very popular installer creation program - I thought it would be good to share the changes we made to our installer scripts.

Step 1 - Add the Vista launch DLLs to the [Files] section

Source: “<insert your path>\VistaLib32.dll”; DestDir: “{app}”; Check: not IsWin64(); MinVersion: 0,6
Source: “<insert your path>\VistaLib64.dll”; DestDir: “{app}”; Check: IsWin64(); MinVersion: 0,6

Notice the use of the IsWin64 and MinVersion 6 (Vista) checks.

Step 2 - Modify the [Run] section

; Post-install run for Pre-Vista systems
Filename: “{app}\App.exe”; Flags: nowait postinstall skipifsilent; OnlyBelowVersion: 0,6.0

; Post-install run for Vista 32-bit systems
Filename: “RunDll32.exe”; Parameters: “{code:AddQuotes|{app}\VistaLib32.dll},RunNonElevated
{code:AddQuotes|{app}\App.exe}”; Flags: nowait postinstall skipifsilent; Check: not IsWin64(); MinVersion: 0,6

; Post-install run for Vista 64-bit systems Filename: “RunDll32.exe”; Parameters: “{code:AddQuotes|{app}\VistaLib64.dll},RunNonElevated {code:AddQuotes|{app}\App.exe}”; Flags: nowait postinstall skipifsilent; Check: IsWin64(); MinVersion: 0,6

As you can see, the direct launch method is used on pre-Vista systems, but on Vista we select between the 32-bit and 64-bit versions of the launcher DLL. Also note the the use of “RunDLL32″ on the 64-bit line is
NOT a typo! Yep, you use RunDLL32 even though you’re calling into a 64-bit DLL (nice one, Microsoft!)

You must be logged in to post a comment.

Four Legged Pal