Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27016

VS 2010 Process.Start System32 Directory Error

$
0
0
So I'm using a listview and a button to launch the selected program the user chooses. Though I'm having an issue with snipping tool and msconfig but with notepad it launches fine. I noticed that it launches perfectly on a 32-bit system but on my 64-bit system it doesn't...

This works completely fine BUT...
If lstUtilities.SelectedItem = "Notepad" Then
If IO.File.Exists("C:\Windows\System32\notepad.exe") = True Then
Process.Start("C:\Windows\System32\notepad.exe")
Else : MessageBox.Show("This program is not installed in your computer or is installed in a different directory", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
End If
End If

This ONE doesn't
If lstUtilities.SelectedItem = "Snipping Tool (Windows 7)" Then
If IO.File.Exists("C:\Windows\System32\SnippingTool.exe") = True Then
Process.Start("C:\Windows\System32\SnippingTool.exe")
Else : MessageBox.Show("This program is not installed in your computer or is installed in a different directory", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
End If
End If

So as this one...

If lstUtilities.SelectedItem = "System Configuration (Windows 7)" Then
If IO.File.Exists("C:\Windows\System32\msconfig.exe") = True Then
Process.Start("C:\Windows\System32\msconfig.exe")
Else : MessageBox.Show("This program is not installed in your computer or is installed in a different directory", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
End If
End If

Viewing all articles
Browse latest Browse all 27016

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>