asked on
ASKER
ASKER
ASKER
ASKER
ASKER
ASKER
ASKER
ASKER
ASKER
ASKER
ASKER
ASKER
Windows Server 2003 was based on Windows XP and was released in four editions: Web, Standard, Enterprise and Datacenter. It also had derivative versions for clusters, storage and Microsoft’s Small Business Server. Important upgrades included integrating Internet Information Services (IIS), improvements to Active Directory (AD) and Group Policy (GP), and the migration to Automated System Recovery (ASR).
TRUSTED BY
The alternative is to parse the output of ipconfig to get the IP address in a script, e.g.
for /f "tokens=2 delims=:" %%a in ('ipconfig ^| find "IP Address"') do set IP ADDR=%%a
for /f "tokens=1,2,3 delims=." %%a in ("%ipaddr%") do set SUBNET=%%a.%%b.%%c
Which leaves the last IP address (if more than one) in the IPADDR variable and the first three octets of it in the variable SUBNET
Having got to that point you know which subnet you are on and can sort out the printers. Adding a printer you can use VBScript or a simple command from batch file:
rundll32 printui.dll,PrintUIEntry /in /n \\SERVER\MYPRINTERNAME
There are details of all the command line switches for this here along with a sample of the VBS way of doing it.
https://www.experts-exchange.com/questions/21101041/Printers-by-login-script.html
You can use /dn to delete a network printer then use /in to install the correct network printer.
One other cleverish way... If your printer is shared from a domain controller in each office and the share name is the same then you can connect the user to \\domainname.com\printer and it should print to the local one regardless - can't say I've tried that... it should work though as DNS will always give the nearest dc's IP out for \\domainname.com.
Anyway give some of that a try and come back if you want more help.
Steve