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:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CasPol -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.
Good tip it works.
Post new comment