+ Post New Thread
Results 1 to 6 of 6
Windows 7 Thread, Printers via script in Windows 7 not mapping in Technical; Hi! I`m having a problem mapping printers via script in my network. I have three domain controllers: primary 2008, sec ...
  1. #1

    Join Date
    Sep 2010
    Posts
    9
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Printers via script in Windows 7 not mapping

    Hi! I`m having a problem mapping printers via script in my network. I have three domain controllers: primary 2008, sec 2008 R2 and third 2003 R2.
    We are currently mapping our printers via script as below:

    rundll32 printui.dll PrintUIEntry /in /ga /n \\printserver\A203Pntr

    We have it for all printers we got. It works perfectly fine with XP but not does not map printers in Win 7 (currently +-110 machines). I have disabled UAC, I have tried few registry fixes as well:

    1.
    Windows Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Contro l\Lsa]
    "lmcompatibilitylevel"=dword:00000002

    2.
    Windows Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr entVersion\Policies\System]
    "ConsentPromptBehaviorAdmin"=dword:00000000
    "ConsentPromptBehaviorUser"=dword:00000003
    "EnableInstallerDetection"=dword:00000001
    "EnableLUA"=dword:00000000
    "EnableSecureUIAPaths"=dword:00000001
    "EnableUIADesktopToggle"=dword:00000000
    "EnableVirtualization"=dword:00000001
    "PromptOnSecureDesktop"=dword:00000000
    "ValidateAdminCodeSignatures"=dword:00000000
    "dontdisplaylastusername"=dword:00000000
    "legalnoticecaption"=""
    "legalnoticetext"=""
    "scforceoption"=dword:00000000
    "shutdownwithoutlogon"=dword:00000001
    "undockwithoutlogon"=dword:00000001
    "FilterAdministratorToken"=dword:00000000
    "EnableLinkedConnections"=dword:00000001

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr entVersion\Policies\System\UIPI]

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr entVersion\Policies\System\UIPI\Clipboard]

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr entVersion\Policies\System\UIPI\Clipboard\Exceptio nFormats]
    "CF_TEXT"=dword:00000001
    "CF_BITMAP"=dword:00000002
    "CF_OEMTEXT"=dword:00000007
    "CF_DIB"=dword:00000008
    "CF_PALETTE"=dword:00000009
    "CF_UNICODETEXT"=dword:0000000d
    "CF_DIBV5"=dword:00000011

    In some cases I`m able to see the printer, some printers does not map at all,
    Has any of you have similar problem when migrating to Win 7?

  2. #2

    3s-gtech's Avatar
    Join Date
    Mar 2009
    Location
    Wales
    Posts
    3,104
    Thank Post
    161
    Thanked 655 Times in 588 Posts
    Rep Power
    169
    Our printer scripts caused Windows 7 to fail the logon. They were ditched in favour of GPP printers, been pretty good really, on both XP and 7.

  3. #3


    Join Date
    Mar 2009
    Location
    Leeds
    Posts
    7,059
    Thank Post
    232
    Thanked 925 Times in 794 Posts
    Rep Power
    308
    ive found script for printers on win7 arent worth the effort i deploy them via group policy (available from 2003 r2 server inwards)

  4. #4
    somabc's Avatar
    Join Date
    Oct 2007
    Location
    London
    Posts
    2,337
    Thank Post
    83
    Thanked 388 Times in 258 Posts
    Rep Power
    112
    You can use powershell
    Code:
    $PrinterPath = "\\machine\printer"
    ([wmiclass]"Win32_Printer").AddPrinterConnection($PrinterPath)
    or
    Code:
    $PrinterPath = "\\machine\printer"
    (New-Object -ComObject WScript.Network).AddWindowsPrinterConnection($PrinterPath)

  5. #5
    NorthernNoel's Avatar
    Join Date
    Sep 2010
    Posts
    16
    Thank Post
    0
    Thanked 2 Times in 2 Posts
    Rep Power
    9
    We added a logon script with a loopback policy for example:

    Code:
    		Set WshNetwork = CreateObject("Wscript.network")
    		PrinterPath1 = "\\srv-print-a\IT1-HP3525MONO"
    		PrinterPath2 = "\\srv-print-a\IT1-HP3525nCOLOUR"
    		PrinterDriver1 = "HP LaserJet 3525 Black"
    		PrinterDriver2 = "HP LaserJet 3525 Colour"
    		Wshnetwork.addwindowsprinterconnection Printerpath1, Printerdriver1
    		Wshnetwork.addwindowsprinterconnection Printerpath2, Printerdriver2
    		Wshnetwork.setdefaultprinter "\\srv-print-a\IT1-HP3525MONO"
    PCL5 drivers appear to work best and we also enabled the following group policy as non signed drivers would not work without.

    Computer Config/Policies/Admin Templates/Printers/Point and Print Restrictions setting is disabled.

  6. #6

    sparkeh's Avatar
    Join Date
    May 2007
    Posts
    7,230
    Thank Post
    1,446
    Thanked 1,859 Times in 1,252 Posts
    Blog Entries
    22
    Rep Power
    559
    I also dumped login scripts for GPPs, no need to muck around with scripts anymore.

    edit: straight forward guide here
    Last edited by sparkeh; 30th September 2010 at 11:27 AM.



SHARE:
+ Post New Thread

Similar Threads

  1. Printers not mapping correctly???
    By actech in forum Windows Server 2000/2003
    Replies: 3
    Last Post: 19th June 2009, 12:57 PM
  2. mapping printers via .vbs & GPO
    By techie211 in forum Windows Server 2000/2003
    Replies: 16
    Last Post: 12th June 2009, 10:46 AM
  3. Citrix not mapping client printers
    By Andi in forum Thin Client and Virtual Machines
    Replies: 0
    Last Post: 7th November 2008, 01:02 PM
  4. Help with drive mapping script edit
    By Andie in forum Scripts
    Replies: 2
    Last Post: 6th October 2008, 10:05 AM
  5. Mapping Printers based on Location
    By NeoNemesis in forum Windows
    Replies: 11
    Last Post: 6th August 2007, 09:03 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •