Hello again,
I have some code that launches an application. Some of the apps launch fine in any windows version but some do not. (Defrag works, regedit works)
I want to be able to get a user to launch system restore but on windows 7 x64 it does not. if I use rstrui.exe it reports path not found, the code below does not launch or error. Thanks.
Private Sub LinkLabel7_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkLabel7.LinkClicked
On Error Resume Next
Dim f64bitOS As Boolean = Is64BitOperatingSystem()
Me.Cursor = Cursors.AppStarting
Select Case Environment.OSVersion.Version.Major & "." & Environment.OSVersion.Version.Minor
Case "6.0", "6.1" 'Vista, 7
If f64bitOS Then
System.Diagnostics.Process.Start("C:\Windows\syswow64\rstrui.exe")
Else
System.Diagnostics.Process.Start("rstrui.exe")
End If
Case "5.2" '2003, 2003r2
MsgBox("Windows 2003 does not support system restore", MsgBoxStyle.OkOnly + MsgBoxStyle.Information, "Unsupported OS")
Case "5.1" 'xp
System.Diagnostics.Process.Start("defrag.exe")
End Select
HideForm()
Me.Cursor = Cursors.Default
End Sub
I have some code that launches an application. Some of the apps launch fine in any windows version but some do not. (Defrag works, regedit works)
I want to be able to get a user to launch system restore but on windows 7 x64 it does not. if I use rstrui.exe it reports path not found, the code below does not launch or error. Thanks.
Private Sub LinkLabel7_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkLabel7.LinkClicked
On Error Resume Next
Dim f64bitOS As Boolean = Is64BitOperatingSystem()
Me.Cursor = Cursors.AppStarting
Select Case Environment.OSVersion.Version.Major & "." & Environment.OSVersion.Version.Minor
Case "6.0", "6.1" 'Vista, 7
If f64bitOS Then
System.Diagnostics.Process.Start("C:\Windows\syswow64\rstrui.exe")
Else
System.Diagnostics.Process.Start("rstrui.exe")
End If
Case "5.2" '2003, 2003r2
MsgBox("Windows 2003 does not support system restore", MsgBoxStyle.OkOnly + MsgBoxStyle.Information, "Unsupported OS")
Case "5.1" 'xp
System.Diagnostics.Process.Start("defrag.exe")
End Select
HideForm()
Me.Cursor = Cursors.Default
End Sub