Announcement

Collapse
No announcement yet.

Replicatinnt printer drivers on other TS servers

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Replicatinnt printer drivers on other TS servers

    Hi,
    I'm trying to achieve the goal in the subject.
    For that I've used this script at the end of the post

    The drivers seems replicated but no printer is redirected. If I reinstall all drivers on the new servers everything works but this defeats the purpose of the script. Trying to troubleshoot I've reinstalled only the terminal server fallback driver (HP 500)After that I get: The printer driver is not installed on the computer. Some printer properties will be inaccessible. Do you want to install the printer driver?
    [img=http://img126.imageshack.us/img126/2848/messagefc1.th.jpg]

    What can be wrong?

    Code:
    :----------------------------------------------------------------------------------------------
    :: Script:                    :   PrinterDrivers.CMD
    :: Created by:            :   Wilco van Bragt (http://sbc.vanbragt.net/)
    ::
    :: ----------------------------------------------------------------------------------------------
    
    :: Disable Logons
    
    CHANGE LOGON /DISABLE
    
    :: SET PATH
    
    SET DRIVERPATH=\\<<FILSERVER>>\SHARE\Printerdriver\spool
    
    SET INFPATH\\<<FILSERVER>>\SHARE\Printerdriver\inf
    
    SET REGPATH\\<<FILSERVER>>\SHARE\Printerdriver\reg
    
    SET SOURCE\\<<FILSERVER>>\SHARE\Printerdriver\
    
    :: Wait 30 second to get the printer spooler services started (or put the services on manual).
    
    %SOURCE%\SLEEP.EXE 30
    
    :: Stop Print Spooler and corresponding services
    
    NET STOP "Citrix Print Manager Service" /yes
    
    NET STOP "Print Spooler" /yes
    
    :: Remove the printer registry keys
    
    %SOURCE%\REG.EXE DELETE "HKLM\SYSTEM\CurrentControlSet\Control\Print\Environments\Windows NT x86\Drivers" /F
    
    ::Remove all printer drivers from the spool directory
    
    DEL /s /Q /F %SYSTEMROOT%\system32\spool
    
    :: Import driverpackage registry keys
    
    %SYSTEMROOT%\REGEDIT.EXE /S "%REGPATH%\PrinterDrivers.REG"
    
    %SYSTEMROOT%\REGEDIT.EXE /S "%REGPATH%\monitors.REG"                                                                                        
    
    :: Replicate the printerdrivers 
    
    %SOURCE%\ROBOCOPY.EXE "%DRIVERPATH%" "%systemroot%\system32\spool" /MIR /R:1 /W:1 /NP                                
    
    XCOPY "%INFPATH%" "%systemroot%\INF" /E /C /I /Q /H /R /Y
    
    :: Start the print services (again)
    
    NET START "Print Spooler"                                                                                                   
    
    NET START "Citrix Print Manager Service"
    
    :: Enable Logons
    
    CHANGE LOGON /ENABLE
    
    :: End of script
    
    GOTO :EOF

    Code:
    Supplement
    
    Store the folder %SYSTEMROOT%\system32\spool on file://filserver/SHARE/printerdriver/spool
    Store the .INF and .PNF files on file://filserver/SHARE/printerdriver/spool
    Store the registry export of [HKLM]\System\CurrentControlSet\Control\Print\Environments as printerdrivers.reg on file://filserver/SHARE/printerdriver/REG
    Store the registry export of [HKLM]\System\CurrentControlSet\Control\Print\Monitors as monitors.reg on file://filserver/SHARE/printerdriver/REG
    Last edited by alexban; 8th December 2008, 14:35. Reason: spelling error

  • #2
    Re: Replicatinnt printer drivers on other TS servers

    Flagged for move to Scripting forum.
    Gareth Howells

    BSc (Hons), MBCS, MCP, MCDST, ICCE

    Any advice is given in good faith and without warranty.

    Please give reputation points if somebody has helped you.

    "For by now I could have stretched out my hand and struck you and your people with a plague that would have wiped you off the Earth." (Exodus 9:15) - I could kill you with my thumb.

    "Everything that lives and moves will be food for you." (Genesis 9:3) - For every animal you don't eat, I'm going to eat three.

    Comment


    • #3
      Re: Replicatinnt printer drivers on other TS servers

      Originally posted by gforceindustries View Post
      Flagged for move to Scripting forum.
      I'm not sure about moving this to scripting forum. This is more a problem of printer drivers.
      My problem is what to check(registry or files) to make sure the printer drivers are installed correctly.
      I could have done all of that easily without a script.
      Thank you,
      Alexban

      Comment


      • #4
        Re: Replicatinnt printer drivers on other TS servers

        Fair enough, your original post suggested to me that the problem was with the script, rather than what the script was trying to achieve.
        Gareth Howells

        BSc (Hons), MBCS, MCP, MCDST, ICCE

        Any advice is given in good faith and without warranty.

        Please give reputation points if somebody has helped you.

        "For by now I could have stretched out my hand and struck you and your people with a plague that would have wiped you off the Earth." (Exodus 9:15) - I could kill you with my thumb.

        "Everything that lives and moves will be food for you." (Genesis 9:3) - For every animal you don't eat, I'm going to eat three.

        Comment

        Working...
        X