Sometimes, when i'm re-packaging an app, i run into problems and start to google / looking here for simular issues. And sometimes, i run into a commandline to install the app i'm repacking silently, ergo, there wasn't any need to repackage the app @ the first place. I decided to write a script in VB that executes a number of commandlines based on input. But i can't get the execution of the actual commandline to work. The script thusfar:

Dim WshShell
Set WshShell = WScript.CreateObject("WScript.Shell")
Dim ProgName

On Error Resume Next

Msgbox "remember to copy this script to program dir!"

ProgName=Inputbox("Provide the executable name:")
If ProgName = "" Then Wscript.Quit
WSHShell.Run "ProgName /s"
Msgbox "Trying /s commandline.."

WSHShell.Run "ProgName /silent"
Msgbox "Trying /silent commandline.."

WSHShell.Run "ProgName /verysilent"
Msgbox "Trying /verysilent commandline.."

WSHShell.Run "ProgName /q"
Msgbox "Trying /q commandline.."

WSHShell.Run "ProgName /quiet"
Msgbox "Trying /quiet commandline.."

WSHShell.Run "ProgName /veryquiet"
Msgbox "Trying /veryquiet commandline.."

WSHShell.Run "ProgName /u"
Msgbox "Trying /u commandline.."

WSHShell.Run "ProgName /unattended"
Msgbox "Trying /unattended commandline.."

WSHShell.Run "ProgName -s"
Msgbox "Trying -s commandline.."

Wscript.Quit(0)

The idea of the script is that, when an installation starts off with setup.exe, the user should copy the script to the folder with setup.exe, starting it off, then entering setup.exe in the messagebox and the script would try a number of "silent" switches. The script does ask for the input, but it doens't seem to run the input + the switch afterwards. I think the problems' in the "WSHShell.Run "ProgName /s"" line.. Tried omitting the quotes and using brackets, but no luck.. Any suggestions/comments would be greatly appreciated.. TIA and kind regards!
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
Try this...

WSHShell.Run ProgName & " /s"
Answered 08/26/2005 by: WiseUser
Fourth Degree Brown Belt

Please log in to comment
0
Btw, a nice feature of VBScript is that you can drag and drop files onto them and then read their path from within the script.

Thus you wouldn't have to copy the script to the application folder or type in the exe file's name.

ProgName = Wscript.Arguments(0)
If ProgName = "" Then Wscript.Quit
WSHShell.Run Chr(34) & ProgName & Chr(34) & " /s"
Msgbox "Trying /s commandline.."

Hope this helps.[;)]
Answered 08/26/2005 by: WiseUser
Fourth Degree Brown Belt

Please log in to comment
0
Allright.. Gonna try that.. Thanks all!
Answered 09/25/2005 by: neo2000
Purple Belt

Please log in to comment
Answer this question or Comment on this question for clarity