Hi all,
I want to change the naming standard for all printers in my company. This
goes for both the sharenames and printer names. The idea is that I'll do this
outside normal working hours and then for a period of time update the login
script so that it first checks if a network printer is installed, and if this
is the case it deletes the network printer and then re-installs it with the
new name. This will be done for each network printer in the company, and if
the printer isn't installed on the specific pc the script will just move on
to check for the next printer. However I can't get this to work properly.
This is an example of the script for a printer with old printer name OKI
C5600 and sharename OKIC5600 and new printer name Herlev - Stuen - ANBL - Oki
C5600 and sharename ANBLOkiC5600:
if not exist \\fs\OKIC5600 goto ok_OKIC5600
rundll32 printui.dll,PrintUIEntry /dn /n\\fs\OKIC5600 /j"OKI C5600"
rundll32 printui.dll,PrintUIEntry /in /n\\fs\ANBLOkiC5600 /j"Herlev - Stuen
- ANBL - Oki C5600"

k_OKIC5600
Can anybody tell me why this isn't working? If I rem out the first line the
printer is succesfully deleted, so there must be a problem in the "if not
exist......" line.
Thanks in advance,
Ronnie