<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><DIV></DIV>
<DIV>I am having a problem with the wpkg.js checking for the status of the remove, before the remove completes. </DIV>
<DIV> </DIV>
<DIV>It works like this.</DIV>
<DIV>1. Add the package</DIV>
<DIV>2. Run the wpkg process which installs the package</DIV>
<DIV>3. Remove the package, expecting it the next run of wpkg to uninstall it</DIV>
<DIV>4. Run the wpkg process, which uninstalls the package ***</DIV>
<DIV>5. The "check" after the remove occurs BEFORE the uninstall completes, so the package remains in the wpkg.xml file</DIV>
<DIV> <here begins the problem></DIV>
<DIV>6. Run the wpkg process</DIV>
<DIV>7. The package will check for the install before the removal, which will fail</DIV>
<DIV>8. wpkg installs the package</DIV>
<DIV>9. wpkg removes the package</DIV>
<DIV>10. The uninstall completes before the recheck is done, the package remains in wpkg.xml</DIV>
<DIV>11. successive runs of wpkg.js repeats the install / uninstall</DIV>
<DIV> </DIV>
<DIV>This is a simple package, it's the one used in the WPKG QUICK INSTALL guide. The remove command runs as a separte process, returning control back to wpkg.js before it has completed. This causes the issue, as wpkg.js checks the install status immediately after the uninstall command returns control.</DIV>
<DIV> </DIV>
<DIV>Is there a command switch that will cause the uninstaller to not return control until it completes? Is there a way for wpkg to handle this?</DIV>
<DIV> </DIV>
<DIV>I execute wpkg.js in a batch file via windows job scheduler. Here is the info regarding the job, including the debug info written to the log.</DIV>
<DIV> </DIV>
<DIV>wpkg.bat:</DIV>
<DIV>set software=\\server\software<BR>cscript <A href="file://\\server\wpkg\wpkg.js">\\server\wpkg\wpkg.js</A> /synchronize /debug > c:\wpkg.log</DIV>
<DIV> </DIV>
<DIV>Package for DIA:<BR> <package id='dia' name='Dia Diagram Editor' revision='1' reboot='false' priority='800'><BR> <check type='file' condition='exists' path='%PROGRAMFILES%\dia\dia-0.96.1-9-uninstall.exe'/><BR> <install cmd='"%SOFTWARE%\dia\dia-setup-0.96.1-9.exe" /S'/><BR> <upgrade cmd='"%SOFTWARE%\dia\dia-setup-0.96.1-9.exe" /S'/><BR> <remove cmd='"%PROGRAMFILES%\dia\dia-0.96.1-9-uninstall.exe" /S'/><BR> </package></DIV>
<DIV> </DIV>
<DIV>wpkg.log on the Install:<BR>Executing command : "%SOFTWARE%\dia\dia-setup-0.96.1-9.exe" /S<BR>Command in installation of Dia Diagram Editor returned exit code [0]. Success.<BR>Checking existence of package: Dia Diagram Editor<BR>The path 'C:\Program Files\dia\dia-0.96.1-9-uninstall.exe' exists: the test was successful<BR>Removing currently existing settings node first: 'Dia Diagram Editor' (dia), Revision 1<BR>Adding settings node: 'Dia Diagram Editor' (dia), Revision 1<BR>Processing (install) of Dia Diagram Editor successful.</DIV>
<DIV>Restoring previous environment.<BR></DIV>
<DIV>wpkg.log on the Remove:</DIV>
<DIV>Removing Dia Diagram Editor (dia)...<BR>Found system locale: 409<BR>No locale language definition found for message ID 'notifyUserStart' (language LCID '409').<BR>Executing command: "%PROGRAMFILES%\dia\dia-0.96.1-9-uninstall.exe" /S<BR>Command returned result: 0<BR>Command in removal of Dia Diagram Editor returned exit code [0]. Success.<BR>Checking existence of package: Dia Diagram Editor<BR>The path 'C:\Program Files\dia\dia-0.96.1-9-uninstall.exe' exists: the test was successful<BR>Checking dia zombie state.<BR>Could not process (remove) Dia Diagram Editor.<BR>Package still installed.</DIV>
<DIV> </DIV>
<DIV>wpkg.log for EVERY successive run: (install then uninstall)</DIV>
<DIV>Going to install package 'Dia Diagram Editor' (dia), Revision 1, (execute flag is '', notify flag is 'true').<BR>Package 'Dia Diagram Editor' (dia): Not yet processed during this session.<BR>Checking existence of package: Dia Diagram Editor<BR>The path 'C:\Program Files\dia\dia-0.96.1-9-uninstall.exe' does not exist: the test failed<BR>Package 'Dia Diagram Editor' (dia): Installed but checks failed. Re-Installing.<BR>Found system locale: 409<BR>No locale language definition found for message ID 'notifyUserStart' (language LCID '409').<BR>Installing dependencies of 'Dia Diagram Editor' (dia).<BR>Installing 'Dia Diagram Editor' (dia)...<BR>Reading variables from package<BR>Reading variables from package Dia Diagram Editor<BR>Stored 0 variables from package<BR>Reading variables from profile[s]<BR>Getting profiles which apply to this node.<BR>1 profiles apply to this host.<BR>Reading variables from profile custom0<BR>Reading variables from host
banc60xpof03<BR>Install type: install<BR>Fetched 1 install command(s).<BR>Executing command : "%SOFTWARE%\dia\dia-setup-0.96.1-9.exe" /S<BR>Command in installation of Dia Diagram Editor returned exit code [0]. Success.<BR>Checking existence of package: Dia Diagram Editor<BR>The path 'C:\Program Files\dia\dia-0.96.1-9-uninstall.exe' exists: the test was successful<BR>Removing currently existing settings node first: 'Dia Diagram Editor' (dia), Revision 1<BR>Adding settings node: 'Dia Diagram Editor' (dia), Revision 1<BR>Processing (install) of Dia Diagram Editor successful.<BR>Restoring previous environment.<BR>Removing Dia Diagram Editor (dia)...<BR>Executing command: "%PROGRAMFILES%\dia\dia-0.96.1-9-uninstall.exe" /S<BR>Command returned result: 0<BR>Command in removal of Dia Diagram Editor returned exit code [0]. Success.<BR>Checking existence of package: Dia Diagram Editor<BR>The path 'C:\Program Files\dia\dia-0.96.1-9-uninstall.exe' exists: the test
was successful<BR>Checking dia zombie state.<BR>Could not process (remove) Dia Diagram Editor.<BR>Package still installed.<BR></DIV></div><br>
</body></html>