You may not be able to do run-as on "script.pl", but you could on "perl script.pl". | [reply] |
I asked a similar question recently here.
Z1R pointed out Win32::NetResource. I haven't tried it yet but it might help you out.
| [reply] |
Well, the original problem is worse than that. Perl is installed on the web server. This script is also there. It needs to run as a nightly task that grabs a file from a user's home directory and FTP's it to a different server. So, I can't run the Perl.exe program as that user since it will be used by other processes. That user account is locked out of local access and only has that user's folder access perms.
BLAH!?!? | [reply] |
I faced a similar problem with a batch script on a Windows 2000 server. I had the network admins set up a service account on the domain and then I used the Windows "Scheduled Task" functionality. I selected my script directly (using "shebang" syntax to point to the perl runtime) and selected the service account in the "run as" portion. Works like a champ.
You said it needs to run nightly, and it sounds like you already have a domain ID for it, so it may be easy to set up. I think you can probably just use the standard UNC syntax for the pathnames. But I'm not 100% certain about this last part. I know that the "run-as" bit works though.
PCS
| [reply] |