use Win32::OLE; my $workstation=Win32::OLE->CreateObject("WScript.Network"); # Add a printer my $printerpath='\\\\server\\printername'; $workstation->AddWindowsPrinterConnection($printerpath); # Make it the default $workstation->SetDefaultPrinter($printerpath); # Map a network drive my $drivepath='\\\\server\\sharename'; $workstation->MapNetworkDrive("X:",$drivepath);