D
Divideetimpera
Guest
I am trying to call an Internet Explorer Administration Kit for IE 8.0 setup file I have custom created using the Microsoft Package to run at the click of a button in my application in Visual Basic.
This is what I have so far:
Dim applysettings As applysettings = Nothing
Dim success3 As Boolean = True
Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click
Dim applyconfig As New applysettings
AddHandler applyconfig.FormClosed, AddressOf LoadingDone3
applyconfig.StartPosition = FormStartPosition.CenterScreen
applyconfig.Show()
Me.Enabled = False
Dim process As System.Diagnostics.Process = Nothing
Dim processStartInfo As System.Diagnostics.ProcessStartInfo
processStartInfo = New System.Diagnostics.ProcessStartInfo()
processStartInfo.FileName = "C:\*****\******\*****\Secure_Deployment\IEAK8\Data\build 1.3\IEAK 8.0\INS\WIN32_VISTA\EN\IE8-Setup-Full.exe"
processStartInfo.Verb = "runas"
processStartInfo.Arguments = ""
processStartInfo.ErrorDialog = False
processStartInfo.UseShellExecute = False
processStartInfo.RedirectStandardOutput = True
processStartInfo.CreateNoWindow = True
processStartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal
process = System.Diagnostics.Process.Start(processStartInfo)
process.Start()
If My.Computer.FileSystem.FileExists("C:\Program Files (x86)\Internet Explorer\CUSTOM\INSTALL.ins") Or
My.Computer.FileSystem.FileExists("C:\Program Files\Internet Explorer\CUSTOM\INSTALL.ins") Then
success3 = True
End If
End Sub
Private Sub loadingdone3(ByVal sender As Object, ByVal e As System.EventArgs)
If success3 = True Then
settingsapplied.Show()
Else
applyfailed.Show()
End If
Me.Enabled = True
End Sub
End Class
It seems to work, except that when Im debugging in visual studio express I get the following alert and then my success or fail prompt. How can I make this alert go away?
I think its calling the process twice, somewhere in my code.
Continue reading...
This is what I have so far:
Dim applysettings As applysettings = Nothing
Dim success3 As Boolean = True
Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click
Dim applyconfig As New applysettings
AddHandler applyconfig.FormClosed, AddressOf LoadingDone3
applyconfig.StartPosition = FormStartPosition.CenterScreen
applyconfig.Show()
Me.Enabled = False
Dim process As System.Diagnostics.Process = Nothing
Dim processStartInfo As System.Diagnostics.ProcessStartInfo
processStartInfo = New System.Diagnostics.ProcessStartInfo()
processStartInfo.FileName = "C:\*****\******\*****\Secure_Deployment\IEAK8\Data\build 1.3\IEAK 8.0\INS\WIN32_VISTA\EN\IE8-Setup-Full.exe"
processStartInfo.Verb = "runas"
processStartInfo.Arguments = ""
processStartInfo.ErrorDialog = False
processStartInfo.UseShellExecute = False
processStartInfo.RedirectStandardOutput = True
processStartInfo.CreateNoWindow = True
processStartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal
process = System.Diagnostics.Process.Start(processStartInfo)
process.Start()
If My.Computer.FileSystem.FileExists("C:\Program Files (x86)\Internet Explorer\CUSTOM\INSTALL.ins") Or
My.Computer.FileSystem.FileExists("C:\Program Files\Internet Explorer\CUSTOM\INSTALL.ins") Then
success3 = True
End If
End Sub
Private Sub loadingdone3(ByVal sender As Object, ByVal e As System.EventArgs)
If success3 = True Then
settingsapplied.Show()
Else
applyfailed.Show()
End If
Me.Enabled = True
End Sub
End Class
It seems to work, except that when Im debugging in visual studio express I get the following alert and then my success or fail prompt. How can I make this alert go away?
I think its calling the process twice, somewhere in my code.
Continue reading...