Running a program

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
 
H

Herfried K. Wagner [MVP]

* "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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top