LyonJay
asked on
Kix - Printer Removal
Dear all,
I need to remove any printers that are attached to a certain server when a user logs in.
DelPrinterConnection("\\se rvername\p rinter")
Is there a way of putting a wildcard into it so that any printers that are picked up get dropped?
Or basically is there a Kix command that i can use to remove all printers?
As they are being recreated later on in the script.
Thanks,
Lyon
I need to remove any printers that are attached to a certain server when a user logs in.
DelPrinterConnection("\\se
Is there a way of putting a wildcard into it so that any printers that are picked up get dropped?
Or basically is there a Kix command that i can use to remove all printers?
As they are being recreated later on in the script.
Thanks,
Lyon
I don't think you'll be able to remove all existing printer connections just using Kixtart. Also I think DelPrinterConnection() is only supported on Windows NT and Windows 2000.
However, you could call a shell command from within your Kix script, so something like:
You may need to put con2prt.exe (depends on client OS) where it can be accessed by the login script - I would just save it in the nelogon shares root folder.
Hope this helps.
--IJ
However, you could call a shell command from within your Kix script, so something like:
shell "%comspec% /c con2prt /f"
You may need to put con2prt.exe (depends on client OS) where it can be accessed by the login script - I would just save it in the nelogon shares root folder.
Hope this helps.
--IJ
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
https://www.experts-exchange.com/questions/22703269/Remove-printer-via-script.html
https://www.experts-exchange.com/questions/22721142/Deleting-a-network-printer-with-kix-script.html
https://www.experts-exchange.com/questions/21378427/Urgent-500-points-deleting-a-network-printer-from-users.html?sfQueryTermInfo=1+10+30+delet+kix+network+printer+script