New Print Server

  • Thread starter Thread starter Jeff
  • Start date Start date
J

Jeff

I have about 500 users and we have gone to a new Windows
2000 File and Print server. Our old one ran out of
diskspace. I have done the conversion of moving files,
shares and re-creating all the print queues. Now my
problem is how to have the workstations point to the new
server without having to go to every machine. Is there
anything I could do in the login script? The new server
has a different computer name than the old one.
 
Removes the old one

@Echo Off
If Not %1'==/?' Goto Begin
Echo Removes Windows NT's printers (Registry-settings and printer
driver's files).
Echo.
Echo %~n0
(Goto :EOF)
:Begin
(Echo [Version]
Echo Signature = "$Windows NT$"
Echo.
Echo [DefaultInstall]
Echo DelReg = DelReg
Echo AddReg = AddReg
Echo.
Echo [DelReg]
Echo HKLM,"SYSTEM\CurrentControlSet\Control\Print\Printers"
Echo HKLM,"SYSTEM\CurrentControlSet\Control\Print\Environments\Windows
NT x86\Drivers\Version-2"
Echo.
Echo [AddReg]
Echo
HKLM,"SYSTEM\CurrentControlSet\Control\Print\Printers","DefaultSpoolDirector
y",,,
Echo
HKLM,"SYSTEM\CurrentControlSet\Control\Print\Printers","DefaultSpoolDirector
y",,"%%SystemRoot%%\System32\spool\PRINTERS"
Echo HKLM,"SYSTEM\CurrentControlSet\Control\Print\Environments\Windows
NT x86\Drivers\Version-2",,,
Echo HKLM,"SYSTEM\CurrentControlSet\Control\Print\Environments\Windows
NT x86\Drivers\Version-2","Directory",,"2"
Echo HKLM,"SYSTEM\CurrentControlSet\Control\Print\Environments\Windows
NT x86\Drivers\Version-2","MajorVersion",%%REG_DWORD%%,2
Echo HKLM,"SYSTEM\CurrentControlSet\Control\Print\Environments\Windows
NT x86\Drivers\Version-2","MinorVersion",%%REG_DWORD%%,0
Echo.
Echo [Strings]
Echo REG_SZ = 0x00000000
Echo REG_MULTI_SZ = 0x00010000
Echo REG_EXPAND_SZ = 0x00020000
Echo REG_BINARY = 0x00000001
Echo REG_DWORD = 0x00010001)>%TEMP%.\$%~n0.inf
If Not Exist %TEMP%.\$%~n0.inf (
Echo Can not write to: %TEMP%.\$%~n0.inf
Goto :EOF)
Echo Remove all printers on %COMPUTERNAME%
Echo.
Echo Press STRG-C to cancal or:
Pause
%SystemRoot%\system32\net.exe STOP SPOOLER
%SystemRoot%\system32\rundll32.exe setupapi,InstallHinfSection
DefaultInstall 128 %TEMP%.\$%~n0.inf
Del %TEMP%.\$%~n0.inf
For %%F In (%SystemRoot%\system32\spool\drivers\w32x86) Do (
%SystemRoot%\system32\attrib.exe -r -s -h %%F\*.* /S
Del /Q /S %%F\*.*)
%SystemRoot%\system32\net.exe START SPOOLER
(goto :EOF)


____________________________________________________________________________
_______________________________________________________________________


And add using VB

Dim net
Set net = CreateObject("WScript.Network")
net.AddWindowsPrinterConnection "\\server\printer"
 
Back
Top