Hi J,
This is the error I get.
System.Security.SecurityException: Request for the permission of type System.Security.Permissions.SecurityPermission, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.
at System.Security.CodeAccessSecurityEngine.CheckToke nBasedSetHelper(Boolean ignoreGrants, TokenBasedSet grants, TokenBasedSet denied, TokenBasedSet demands)
at System.Security.CodeAccessSecurityEngine.CheckSetH elper(PermissionSet grants, PermissionSet denied, PermissionSet demands)
at Microsoft.VisualBasic.Interaction.Shell(String Pathname, AppWinStyle Style, Boolean Wait, Int32 Timeout)
at _13F_Report.Form1.OpenNP() in \\file3\Home\jshae\My Documents\Visual Studio Projects\13F Report\Form1.
vb:line 125
I've tried many different ways of doing it, but always get the same error:
ATTEMPT 1:
Shell("C:\Windows\System32\Notepad.exe", AppWinStyle.NormalFocus, True)
ATTEMPT 2:
Process.Start("notepad.exe")
ATTEMPT 3:
System.Diagnostics.Process.Start("notepad.exe")
ATTEMPT 4:
Dim MyProcess As New ProcessStartInfo("notepad.exe") MyProcess.WindowStyle = ProcessWindowStyle.Normal
Process.Start(MyProcess)
ATTEMPT 5:
Dim sinfo1 As System.Diagnostics.ProcessStartInfo = Nothing
sinfo1 = New System.Diagnostics.ProcessStartInfo("notepad.exe")
System.Diagnostics.Process.Start(sinfo1)