in reply to Error: Read a PPD for 'Win32-Lanman', but ..not intended ..for this build (MSWin32-x86-multi-thread-5.10)
Some code from the XP cookbook may help:
# From the book "Windows XP Cookbook" # ISBN: 0596007256 # Note that you cannot use this to connect to the local machine. # ------ SCRIPT CONFIGURATION ------ use Win32::OLE; $strServer = '<HostName>'; # e.g. wks01 $strUser = '<User>'; # e.g. AMER\rallen.adm $strPasswd = '<Password>'; # ------ END CONFIGURATION --------- $objLocator = Win32::OLE->new('WbemScripting.SWbemLocator'); $objWMI = $objLocator->ConnectServer($strServer, 'root\\cimv2', $strUs +er, $strPasswd); if ((0 + Win32::OLE::LastError()) != 0) { print 'Authentication failed: ' . ('' . Win32::OLE::LastError()), +"\n"; } # Now you can use the objWMI object to get an instance of a class # or perform a WQL query. Here is an example: $colDisks = $objWMI->InstancesOf('Win32_LogicalDisk')->Item;
..to maintain is to slowly feel your soul, sanity and sentience ebb away as you become one with the Evil.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Error: Read a PPD for 'Win32-Lanman', but ..not intended ..for this build (MSWin32-x86-multi-thread-5.10)
by gctaylor1 (Hermit) on Apr 28, 2009 at 02:09 UTC |