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.

I'm not sure the above can be accomplished using a batch login script, so if anybody can help me scripting this using Kix I'd be very thankful.

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"
:ok_OKIC5600

Can anybody tell me why this isn't working? I think the problem is that "if not exist \\fs\OKIC5600 goto ok_OKIC5600" looks for a printer with the sharename OKIC5600 on the print server named fs, and this no longer exists since I've changed the sharename to ANBLOkiC5600, and because this no longer exists on the print server it goes to ":ok_OKIC5600".

So the challenge is to change the \\fs\OKIC5600 part to instead search for the network printer on the local pc, but how can I do this with Kix so it works for all pc's in the domain?

Thanks in advance,
Ronnie