M
Milsnips
Hi there,
i've created a STARTER program that checks if a cab file exists on the pda,
if so, it installs it, waits until the process exits, then deletes the cab
file if exists and call a new process to start my updated application.
Code is below:
Public AppPath As String =
System.IO.Path.GetDirectoryName(Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase)
Sub Main()
Dim p As Process
If IO.File.Exists("\My Documents\setup.cab") Then
p = New Process
p = Process.Start("\My Documents\setup.cab", "")
p.WaitForExit()
p.Kill()
p = Nothing
If IO.File.Exists("\My Documents\setup.cab") Then
IO.File.Delete("\My Documents\setup.cab")
End If
End If
If IO.File.Exists(AppPath & "\myApp.exe") Then Process.Start(AppPath &
"\myApp.exe", "")
End Sub
Ok, here is the scenario where i think the problem is occuring, if the cab
file doesnt exist, it skips the first IF statement and loads MyApp.exe okay.
However... if the setup file does exist, it starts the process, and during
the installation, the connection is lost during debug, and although the
setup continues until the end, the rest of the code doesnt execute,
therefore it doesnt restart my update MyApp.exe application file.
Please any help appreciated into why it cuts out during the cab file install
process if anyone knows, and a workaround to this problem would br great!
thanks,
Paul
i've created a STARTER program that checks if a cab file exists on the pda,
if so, it installs it, waits until the process exits, then deletes the cab
file if exists and call a new process to start my updated application.
Code is below:
Public AppPath As String =
System.IO.Path.GetDirectoryName(Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase)
Sub Main()
Dim p As Process
If IO.File.Exists("\My Documents\setup.cab") Then
p = New Process
p = Process.Start("\My Documents\setup.cab", "")
p.WaitForExit()
p.Kill()
p = Nothing
If IO.File.Exists("\My Documents\setup.cab") Then
IO.File.Delete("\My Documents\setup.cab")
End If
End If
If IO.File.Exists(AppPath & "\myApp.exe") Then Process.Start(AppPath &
"\myApp.exe", "")
End Sub
Ok, here is the scenario where i think the problem is occuring, if the cab
file doesnt exist, it skips the first IF statement and loads MyApp.exe okay.
However... if the setup file does exist, it starts the process, and during
the installation, the connection is lost during debug, and although the
setup continues until the end, the rest of the code doesnt execute,
therefore it doesnt restart my update MyApp.exe application file.
Please any help appreciated into why it cuts out during the cab file install
process if anyone knows, and a workaround to this problem would br great!
thanks,
Paul