Running a program

  • Thread starter Thread starter Gareth Howe
  • Start date Start date
G

Gareth Howe

I have created a form with a button. When the button is clicked, I wast it
to execute the following :
%logonserver%\netlogon\con2prt /cd \\Hawking\LJ1

I have the following code on the button:
Shell("\\newton\netlogon\con2prt /cd \\Hawking\LJ1")


When I run the program, I get the following error:

An unhandled exception of type 'System.Security.SecurityException' occurred
in WindowsApplication1.exe

Additional information: Request for the permission of type
System.Security.Permissions.SecurityPermission, mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.


What am I doing wrong?

Many thanks,
Gareth
 
* "Gareth Howe said:
I have created a form with a button. When the button is clicked, I wast it
to execute the following :
%logonserver%\netlogon\con2prt /cd \\Hawking\LJ1

I have the following code on the button:
Shell("\\newton\netlogon\con2prt /cd \\Hawking\LJ1")


When I run the program, I get the following error:

An unhandled exception of type 'System.Security.SecurityException' occurred
in WindowsApplication1.exe

Additional information: Request for the permission of type
System.Security.Permissions.SecurityPermission, mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.

Is the application started from a network drive?
 
Back
Top