
Originally Posted by
Chrisn Cheers Midget, I know its a bit cheeky, but any chance of seeing a copy of your script, that I might be able to tailor to our site?
Regards Chrisn
Code:
SME.bat
rem @echo off
c:
cd c:\windows\system32
NET USE m: \\WIN2KSRV\sme /persistent:no
START \\MyServer\SMlas
m:
cd ResultsManager\SuccessMaker\bin
LOGIN.EXE C:\ResultsManager\SuccessMaker\Launch.txt
WScript removeprinter.vbs
c:
cd c:\windows\system32
NET USE m: /DELETE
Code:
removeprinter.vbs
Option Explicit
DIM WSHNetwork, SMLas
Set WSHNetwork = CreateObject("WScript.Network")
SMLas="\\MyServer\SMLas"
WshNetwork.RemovePrinterConnection SMLas, true, true
Completely uncommented because I'm lazy and didn't see the point on such a short script. Apparently there are ways to remove a printer in a bat script but calling a vbs works just as well.