Run Executable from Network Share

Feb 19 2010

When you compile a job to an executable through WinAutomation, you are actually creating a .NET application that can run in any computer that has the .NET framework 2.0 or higher installed in it. However, if you have tried to run a compiled job through a network location, you have probably come across an error.

The reason for the error message is that .Net applications generally obey to much stricter security rules than normal executables. In order to run an exe, that was generated through WinAutomation, from a network share you will have to explicitly grant permissions to that application. To do so you will have to enter the following command (once) in your computer, through the Command Prompt window (Start->All Programs->Accessories->Command Prompt)

c:\WINDOWSMicrosoft.NETFrameworkv2.0.50727CasPol -pp off -m -ag 1.2 -url Z:APPNAME.exe FullTrust

where:
Z: the mapped drive letter
APPNAME: the application you want to execute (usually this is the job's name)

This command will modify the security policy on your computer to permit execution of the specified application with full trust. Of course the easiest method is just to copy the exe locally where it will run without problems.

Your rating: None Average: 1 (1 vote)

Comments

Samantha

posted on Fri, 09/30/2011 - 22:01

c:\WINDOWSMicrosoft.NETFrameworkv2.0.50727CasPol -pp off -m -ag 1.2 -url Z:APPNAME.exe FullTrust Please try the link above, it seems there was typo in the original post! :) Samantha

Post your comment

You!
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <p>
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.
  • You may quote other posts using [quote] tags.

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.