Xtreme Visual Basic Talk

Xtreme Visual Basic Talk (http://www.xtremevbtalk.com/)
-   .NET Installation / Documentation (http://www.xtremevbtalk.com/-net-installation-documentation/)
-   -   silent msi install issue (http://www.xtremevbtalk.com/-net-installation-documentation/327840-silent-msi-install-issue.html)

Brocke 09-06-2015 01:33 PM

silent msi install issue
 
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.

Brocke 09-06-2015 04:07 PM

I figured it out

I have to use pi.FileName = "msiexec" not cmd.exe

BThunderW 09-06-2015 07:02 PM

Thanks for following up with a solution :)

Brocke 10-06-2015 06:26 PM

ok guys I'm stuck now.

so far I have this

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 = "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.

any ideas ?


All times are GMT -6. The time now is 07:55 PM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Search Engine Optimisation provided by DragonByte SEO v2.0.15 (Lite) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
All site content is protected by the Digital Millenium Act of 1998. Copyright©2001-2011 MAS Media Inc. and Extreme Visual Basic Forum. All rights reserved.
You may not copy or reproduce any portion of this site without written consent.