Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Installscript's version of /w?


5 replies to this topic

luckymargi7

luckymargi7
  • Full Members
  • 3 posts

Posted 13 July 2011 - 15:00

Hi, I'm using Installshield 2011 and I'm writing a python script to uninstall a product from a specific directory and install a different version of that product into that same directory. I've been having troubles where the setup.exe returns when it hasn't finished the installation yet.

I believe that the Basic-MSI projects have a "/w" parameter which would fix the problem but my project is purely Installscript. Is there an installscript-only version of "/w"?

I've tried "/SMS" and "/sms" as suggested in other topics but it was unsuccessful, which may be because for Installshield 2011, "/SMS" or "/sms" is only for Installscript-MSI projects. Help?

Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 13 July 2011 - 15:34

Normally the SMS switch should work, but I have seen cases with multi platform installers where the top level setup.exe simply launches a java driven installer and then exits. In these cases I have had to resort to the crazy approach of scanning the task list in task manager for the setup process name at regular intervals and report "setup complete" when I no longer find the process in the list. You need to add a timeout value for this in case the install hangs for some reason. I have attached a sample vbscript which does this.

Here is a sample command line from a batch file I have that installs a setup.exe installscript MSI:

CODE
start /wait Tools\setup.exe -s -SMS -f1"%BATCHFILEPATH%Tools\setup.iss" -f2"%LOGDIR%\Product.log"


Here is one more:
CODE
"%BATCHFILEPATH%bin\setup.exe" /s MODE=4 NOMEDUSA=1 NOAEC=1 NOUMVPL=1 /l1033 /SMS /f1"%BATCHFILEPATH%bin\setup.iss" /f2"%LOGFILE%"


Here is a list of setup.exe parameters: http://www.appdeploy...0Parameters.pdf

Attached Files


Regards
-Stein Åsmul

luckymargi7

luckymargi7
  • Full Members
  • 3 posts

Posted 13 July 2011 - 21:23

Thanks for the fast reply.

I didn't use a batch file but I used your suggestion and checked the list of processes in the task manager to see if there was a setup.exe running or not.

Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 14 July 2011 - 03:26

Checking the task list has limitations, but will probably work. That script was intentionally written to be minimal. Might be worthwhile to narrow down the range of hits from the task list to determine that you are really looking for the right setup.exe, but this wasn't necessary when I made my script. I suppose you could try and check the file image size, date or similar.
Regards
-Stein Åsmul

luckymargi7

luckymargi7
  • Full Members
  • 3 posts

Posted 14 July 2011 - 17:18

Thanks again! =)

Actually, I was playing around more with the command-line parameters, i found a good combination that will return after the uninstallation is completely finished.

Turns out the Maintenance Start adds a "-runfromtemp" parameter for the UNINSTALLATION_STRING and so I thought I should add it as well when i was running the uninstallation. So because of this, there was another instance of setup.exe running as i noticed in the task manager. By adding the "-clone_wait" parameter, the setup.exe returned when both instances were finished with the uninstallation.

But I haven't tried taking out the "-runfromtemp" to see if that should properly uninstall.

I hope others running into a similar problem tries that combination of parameters.



Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 14 July 2011 - 18:10

Nice one. And for the record here is the link to a list of command line parameters one more time: http://www.appdeploy...0Parameters.pdf
Regards
-Stein Åsmul