Title: Message
Oliver,
 
Personally,  I would bone up on to use WMI to accomplish this task.  Win32 Perl Scripting The Administrator Handbook, by Dave Roth would be a good starting point.  Also, see the following URL to get a sense of what can be accomplish with WMI.
 
http://cwashington.netreach.net/depo/default.asp?topic=wmifaq
 
-Craig
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Oliver Wayne E Contr AETC CSS/SCNS
Sent: Wednesday, March 10, 2004 08:10
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";
              }

Wayne E. Oliver
System Administrator
AETC GCCS C4 Systems
DSN 487-7678
Comm: (210) 652-7678

_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to