Reputation: 11
I have an existing application in VB.NET where I have a requirement to install a freeware EXE which for an unattended system. I know the path from where I have to install.
Note: I only have to write code to execute that inside the current code base and cannot create a batch file for the same.
Till now I have tried the following steps: I have used Shell command to execute the EXE file giving the additional argument like:
Shell("C:\MOVEit_Freely_Install.exe /q C:\yourlogfilename.log")
Shell("C:\MOVEit_Freely_Install.exe /s")
Shell("C:\MOVEit_Freely_Install.exe /silent")
Shell("C:\MOVEit_Freely_Install.exe /qb C:\yourlogfilename.log")
It just opens the installer where I have to click Next button and then it will get install (Which I don't want).
Can you please suggest anything about that.
Thanks, Puneet
Upvotes: 1
Views: 4719
Reputation: 13
Something like this might help:
Dim myProcess As New Process
Dim param as String = "/?"
myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden
myProcess.StartInfo.CreateNoWindow = True
myProcess.StartInfo.FileName = ("moveit_freely_install.exe" & param)
myProcess.Start()
It loads your app with it's parameter but no window.
Upvotes: 0
Reputation: 718
from a normal cmd window execute the file like c:\moveit_freely_install.exe /?
and it should tell you if there's a silent option.
alternately, if it wraps an .msi you may be able to get at that and use regular microsoft installer switches to make it quiet. I use 7zip to extract the exe contents in these cases. if you have 7zip, right click the file and choose 7zip -> extract.
if you do find an msi, here are the interesting options for you:
`/q n|b|r|f Sets the UI level.
q , qn - No UI.
qb - Basic UI.
qr - Reduced UI. A modal
dialog box is displayed
at the end of the
installation.
qf - Full UI. A modal
dialog box is displayed
at the end of the
installation.
qn+ - No UI. However, a
modal dialog box is
displayed at the end of
the installation.
qb+ - Basic UI. A modal
dialog box is displayed
at the end of the
installation. If you
cancel the installation,
a modal dialog box is
not displayed.
qb- - Basic UI with no
modal dialog boxes.
The "/qb+-" switch
is not a supported UI
level.`
Upvotes: 3