none
Win7 does not map printers with GPO script

    Question

  • Hi,

    I'm with some troubles mapping the printers in WIN7. 

    I have a script that runs in GPO that maps all drives and printers and with WIN7 it only maps the drives. The printers i have to install it manually. 

    I have already tried to solve the problem adding the regestry DWORD "EnableProtocols" with value 6. But it still the same.

    Could someone help me?

    Best Regards,

    Wednesday, November 21, 2012 12:20 PM

Answers

All replies

  • If you are using windows 7 x64 bit your drivers have to be digitaly signed.

    If you are using vbscript you can use a .bat wrapper that calls vbscript and on the compatiblity mode you could set it to run as XP and "run this program as an administrator".

    I am using group policy preferences in our environment and everything works fine.

    User Configuration

    Preferences

    Control Panel Settings

    Printers

    Wednesday, November 21, 2012 2:16 PM
  • We are using 32bit. 

    We use a bat file in the GPO that when the computers start they load that .bat file and map all the drivers and printers.

    With XP it works fine but with WIN7 it doesn't work.

    Wednesday, November 21, 2012 5:08 PM
  • One major difference between XP and W7 is UAC (user access control).

    So if your users don't have admin rights and UAC might blocking them from installing. (try disabling UAC and see if works, or try giving them temp local admin rights).

    The other thing that could make difference is "Allways wait for the network at computer startup / logon" GPO setting. Make sure that this option is enabled on your Windows 7 compuers in GPOs.

    Try disabling this setting
    Point and Print Restrictions
    Setting Path:
    Computer Configuration/Administrative Templates/Printers
    • Edited by Brano Lukic Thursday, November 22, 2012 2:15 PM
    Thursday, November 22, 2012 7:32 AM
  • i think the problem is unload script but you said run the map network drive

    please show the script code for my checking . The key technique is rundll32 printui.dll,PrintUIEntry.

    1) This installs printer quietly

    rundll32 printui.dll,PrintUIEntry /in /q /n\\servername\printername

    2) This deletes the networked printer from the machine being logged onto, and does so quietly.
    rundll32 printui.dll,PrintUIEntry /dn /q /n\\servename\printername

    3) This Sets the default printer
    rundll32 printui.dll,PrintUIEntry /y /n\\servername\printername


    so then you can add printer in client with poweshell code

    http://blogs.technet.com/b/heyscriptingguy/archive/2009/05/19/how-can-i-use-wmi-to-add-a-printer-connection-by-using-windows-powershell.aspx

    http://wsh2.uw.hu/ch11c.html

    http://support.microsoft.com/kb/263226


    MCSE | MCITP [x2] | ISMS27001


    • Edited by omid.koushki Thursday, November 22, 2012 2:02 PM
    Thursday, November 22, 2012 2:01 PM
  • Hi,


    You can also refer to the following thread to check the result.


    Windows 7 Printer Deployment using Group Policy though Windows Server 2008 

    http://social.technet.microsoft.com/Forums/zh/winserverGP/thread/73902adb-cdf2-45ab-94e5-6be8450672bf


    In addition, since this issue is related to script, you can also check it in Script forum for more help.


    Regards,


    Vincent Wang
    TechNet Community Support

    Friday, November 23, 2012 2:59 AM