|..> check to make sure registry entry is created in|
('reg query "HKCU\Printers\Connections\,,servername,printername"')
When you run
rundll32 printui.dll,PrintUIEntry /in /n "%%B"
It creates a registry key in "HKCU\Printers\Connections", so I want to check if the reg key is created immediately after mapping each network printer which is why i have a call:delay --3 secs to make sure the reg entry gets created (in other words, this is for making sure the printer is on the network and that the connection was successfully created. )
If the reg key is present, I just want to print out "echo.Printer %%b successfully mapped."
if the key isn't present (printer isn't on the network or turned off), simple print a message saying printername is not online and proceed to mapping the rest of the network printers.
..> map the default printer only once from 1st for loop?
Among the printers in printers.txt is the default printer. so if there's a way to merge the two for loops in such a way that it gets the default printer first and then map the rest of the network printers (i wouldn't think there's any harm in mapping the default printer twice but if I can avoid mapping the default printer twice, it'll be great.)
..> if the default printer is not a network printer, don't map it (for obvious reasons).
Well, I only want to map only the network printer and infact if the default printer is a network printer, I want a logic to just map it and if the default printer is a local printer, i want a logic that'll simply say "Please contact your IT Dept to assist you in installing the driver for your local printer"
Since I don't know what kind of local printer the user will have, I'll have to manually hunt for the driver wherever it is.. so this is why I simply want only the network printer map.