[wpkg-users] Installing an icon when a file exists

Chris Johnson cjohnson at kes.sheffield.sch.uk
Tue Sep 1 14:54:16 CEST 2009


We've got some software that just won't install using wpkg (SIMS from Capita).
We're going to manually install it on the few workstations that need it but I need to copy an icon for it to the folder we use for our start menus.

I've got the copy icon part of this working but its the check I'm stuck on.

I want to run the install/upgrade IF the application file exists to copy the icon on and run the uninstall if the application file doesn't exist.  Normal checks run the code the other way round, if the check "doesn't exist".

So I used this code:
----------------------------
<check type="logical" condition="not">
                <check type="file" condition="exists" path='"%programfiles%\SIMS\SIMS .net\SIMSLoad.exe"' />
</check>
                                <!--Creates local icons-->
                                <install cmd='%comspec% /c %software%\ui\copyicons.bat "%ALLUSERSPROFILE%\Start Menu\Programs\SIMS Applications" "startmenu\staff\Programs\Administration\SIMS Applications"' />
                                <upgrade cmd='%comspec% /c %software%\ui\copyicons.bat "%ALLUSERSPROFILE%\Start Menu\Programs\SIMS Applications" "startmenu\staff\Programs\Administration\SIMS Applications"' />
                                <remove cmd='%comspec% /c rd /s /q "%SYSTEMDRIVE%\ui\local\startmenu\staff\Programs\Administration\SIMS Applications"' />
----------------------------

To run the icon install when it does exist.

However its not working.
It doesn't appear in the eventvwr logs.
Each of the copy commands works when run at the command line so I think the problem lies in the logic

Any ideas how I can achieve this?
Thanks

ChrisJ
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wpkg.org/pipermail/wpkg-users/attachments/20090901/01667a67/attachment-0001.html>


More information about the wpkg-users mailing list