On Tue, 18 Apr 2006, Daniel Rychlik wrote:
> Ive been playing with the Win32::OLE module and this is what I have
> come up with.
>
> Use win32::OLE;
>
> My $objnet=Win32::OLE->CreatObject("Wscript.Network");
>
> $objnet->MapNetworkDrive("z:",\\10.103.105.50\\root","administrator","password");


You are missing the 3rd argument, which is a Boolean indicating if you want
to store the mapping and credentials in the user profile.  Try this:

  
$objnet->MapNetworkDrive("z:",\\10.103.105.50\\root",0,"administrator","password");

> Print Win32::OLE->LastError();
>
> Type Mismatch error...
>
> I cant find any solid documentation on this joker. Anyone have any
> good documentation?

Have you tried Google?  There seem to be plenty of references.  The canonical
documentation for MapNetworkDrive() should be this (beware of line wrapping):

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/fef5a591-c633-4c18-91a3-848e72a36ca7.asp

Cheers,
-Jan


_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to