Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need Help With Perl Script to Start Remote Service

Status
Not open for further replies.

netgeek1

MIS
Oct 29, 2002
5
0
0
US
I am trying to run this very simple script on IIS 5.0 on a Win2K machine to start PC Anywhere (or any service) on a remote Win2K PC. I am running ActiveState v5.6.1.633. I am logging on as Administrator to IIS with Windows Authentication. The Administrator pw on both boxes are the same. I have tried everything I can think of in IIS for settings. I have tried to add both IWAM_MYPC & IUSR_MYPC to the Admin Group. I have tried creating IWAM_MYPC & IUSR_MYPC accounts on the remote Win2k machine and adding them to the Admin Group and giving access to "Act as part of the Operating System". I have run FileMon and the script does execute, as well as netsvc.exe. I have tried installing Win32::AdminMisc and creating a new script. Everything appears to come down to a problem with Authentication, because all the script works when run locally, but not the run from IIS. I have had a return of "Error Code 5. Access Denied" and "Privilege not held", but I can't think of anything else to do. Please HELP!!!

Thank you in advance.
Matt

#! c:\perl\bin\perl.exe
use IO::Socket;# This requires a modern version of PERL. It was designed using PERL from: $VERSION=3D'Alpha';

{
$idle = 'netsvc \\\\MYPC /stop "pcAnywhere Host Service"' ;
$idle1 = 'netsvc \\\\MYPC /start "pcAnywhere Host Service"' ;
system($idle);
sleep(2);
system($idle1);
sleep(5);
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top