From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Oliver Wayne E Contr AETC CSS/SCNS
Sent: Wednesday, March 10, 2004 8:10 AM
To: '[EMAIL PROTECTED]'
Subject: Win32::Job
All,
I
have a project to update some security settings on a few remote systems and
would like to use Win32::Job to launch secedit. The encluded code is an example
of what I am trying to do. It returns a success but fails to run the task. I
don't know if I read the docs wrong or what. Could someone look over the code
and offer any suggestions?
if ($job = Win32::Job->new)
{
print "$^E: Created initial job\n";
$myArgs = 'secedit /configure /db
C:/WINNT/Security/Database/fortezzaFix.sdb /cfg C:/WINNT/Security/Templates/GCCS
3.7.1 Fortezza Fix.inf /log C:/WINNT/Security/Logs/fortezzaFix.log
/verbose';
if ($job->spawn("//$workstation/ADMIN\$/System32/Cmd.exe", qq{cmd /C
$myArgs}))
{
print "$^E: Maby it worked: \n";
} else {
print Win32::FormatMessage(Win32::GetLastError()) . "Failed to launch
\n";
print qq{cmd /C $myArgs};
}
}
} else {
print "$workstation not available\n";
}
_______________________________________________ Perl-Win32-Admin mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
