I have a script that I would like to run as a scheduled task, unfortunately, it doesn't seem to work quite right. The subroutine I am having problems with involves the script logging in. Here is a code snippet: <snip> Win32::AdminMisc::LogonAsUser($DomainName,$UserName,$UserPassword); $WhoAmI = Win32::AdminMisc::GetLogonName(); print "\nI am logged in as $WhoAmI.\n"; </snip> When I am logged on to the box locally, the script returns my logon name instead of the one from the script. If I schedule the script to run (it prints to a log file), it says it logs on as the correct ID, but it cannot access any of the files or directories it needs access to. I have logged on as the script logon ID and I am able to get to all the files it needs without an issue. I have all of the appropriate file and directory permissions enabled. The account that the script uses has been given rights to logon as a service and logon as a batch job. It has also been given local administrator rights. Am I missing something here? Thank you! Jason R DePriest, GSEC, GCFW Intranet Web Administrator II voice - (901) 523-5975 fax - (901) 523-5527 _______________________________________________ Perl-Win32-Admin mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-admin
