Not sure what I'm doing wrong here my code looks right
Code:
Dim p As Process = New Process()
Dim pi As ProcessStartInfo = New ProcessStartInfo()
pi.WindowStyle = ProcessWindowStyle.Hidden
pi.Arguments = "msiexec /i " & Chr(34) & My.Computer.FileSystem.SpecialDirectories.Temp.ToString & "\test.msi" & Chr(34) & " /qn"
pi.FileName = "cmd.exe"
p.StartInfo = pi
p.Start()
I'm trying to have my program get updated silent but its not working.
Not really positive what going on. Command line it works and close the program and updates.
Dim p As Process = New Process()
Dim pi As ProcessStartInfo = New ProcessStartInfo()
pi.WindowStyle = ProcessWindowStyle.Hidden
pi.Arguments = "msiexec /i " & Chr(34) & My.Computer.FileSystem.SpecialDirectories.Temp.ToString & "\test.msi" & Chr(34) & " /qn"
pi.FileName = "msiexec"
p.StartInfo = pi
p.Start()
Form1.Close
and I use this code in my Setup Project in the custom actions and under Commit
Code:
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run """" & Property("CustomActionData") & """",7,False
Set WshShell = Nothing
Now what happening is my program updates but not always does the app close and restart.
What is Supposed to happen is the Program download the MSI runs it hidden, Closes the Main Form to exit. and then Start again after the program is installing/installed to use the new update.
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET. subscribe