Jump to content

Recommended Posts

Posted

Hey (new here)

Enjoying using WPI (great program.)

Just need some help, I have tried looking on forums...

Is it possible to get WPI to only install programs if they arent already installed? Also how good is WPI at installing games on its own?

Many thanks

Tom,


Posted

If you read the manual and the changelog you will see that the condition can be set to look for already installed files and it will disable the checkbox if a file exists i.e. "Is already installed"

like so in grayed condition section = FileExists('%programfiles%\VMware\VMware Workstation\vmware.exe')

As for games what are you talking about? Litlle ones like reflexive arcade games and popcap or gamehouse game? Yes it installs thoughs fine with switches.

But for bigger games you nedd to find or create complex auto-it scripts (Auto-it is not too hard to learn) to have those install silently and WPI can then run the au3 script to install the game.

Posted

Thanks, should have said that i read the manual but I misunderstood the conditions in the help. From what I understood in the manual I thought that the conditions were only for checking to see if installation files where in the WPI folder. Maybe you might want to reword this for future people who don't know things like this (just a suggestion.)

Under conditions I was putting %root%\program files\application folder\application. I've now taken the root of and using %programfiles% as in your other post. Thanks again

Tom

Posted

XCougar,

I think the manual is worded correctly.

Use the cond (Condition) statement to show/hide entire checkbox and entry based on a certain condition, like if the application is available on the disk (wouldn't want to try to install it if it wasn't there), or if it required a certain OS or Hardware to be installed.

Kel is referring to Grayed Condition in his response.

like so in grayed condition section = FileExists('%programfiles%\VMware\VMware Workstation\vmware.exe')

Use gcond (Grayed Condition) to gray out checkbox entry if that condition is true, like if something is already installed whether it be a file or registry setting. I prefer to key on registry keys as they provide path independence for the application if they are standard installations, this is where all the Add/Remove Programs get tracked.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall

Example for checking for 7-Zip, This line just checking for RegKey is not version specific:

gcond[pn]=['RegKeyExists("HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\7-Zip\\DisplayName")'];

You could easily break it down to the exact registry value, this will key to a specific version:

gcond[pn]=['RegKeyValue("HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\7-Zip\\DisplayName")=="7-Zip 4.45 beta"'];

Posted

You will have to manipulate these for the logic you wish to implement.

This example compares strings, notice I'm pulling from the DisplayVersion now:

prog[pn]=['Adobe Reader 7.0.8'];
ordr[pn]=[100];
desc[pn]=['Adobe® Reader® — free software for viewing and printing Adobe Portable Document Format (PDF) files.'];
uid[pn]=['ADOBE708'];
dflt[pn]=['yes'];
cat[pn]=['Commercial Applications'];
forc[pn]=['no'];
configs[pn]=['default'];
cond[pn]=['FileExists("%root%\\Applications\\Commercial\\Adobe Reader 7.0.8\\reader708.exe")'];
gcond[pn]=['RegKeyValue("HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{AC76BA86-7AD7-1033-7B44-A70800000002}\\DisplayVersion")=="7.0.8"'];
cmd1[pn]=['"%root%\\Applications\\Commercial\\Adobe Reader 7.0.8\\reader708.exe"'];
pn++;

This example will parse the strings to numbers, then you can use <,>,= or any combination to compare the numbers to determine if the installed version is greater than the version you wish to install...you may want to move this logic to the condition statement since you may not want the user to even see an older version available.

prog[pn]=['Adobe Reader 7.0.8'];
ordr[pn]=[101];
desc[pn]=['Adobe® Reader® — free software for viewing and printing Adobe Portable Document Format (PDF) files.'];
uid[pn]=['ADOBE708'];
dflt[pn]=['yes'];
cat[pn]=['Commercial Applications'];
forc[pn]=['no'];
configs[pn]=['default'];
cond[pn]=['FileExists("%root%\\Applications\\Commercial\\Adobe Reader 7.0.8\\reader708.exe")'];
gcond[pn]=['parseFloat(RegKeyValue("HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{AC76BA86-7AD7-1033-7B44-A70800000002}\\DisplayVersion")) >= parseFloat("7.0.8")'];
cmd1[pn]=['"%root%\\Applications\\Commercial\\Adobe Reader 7.0.8\\reader708.exe"'];
pn++;

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...