+ Post New Thread
Page 1 of 2 12 LastLast
Results 1 to 15 of 25
Windows 7 Thread, Windows 7 printer vbs in Technical; Hi guys, I have recently ordered 30 new laptops. SMT would like me to install Windows 7 to see what ...
  1. #1

    Join Date
    Feb 2007
    Posts
    332
    Thank Post
    160
    Thanked 28 Times in 25 Posts
    Rep Power
    36

    Windows 7 printer vbs

    Hi guys,

    I have recently ordered 30 new laptops. SMT would like me to install Windows 7 to see what people think of it. I have a Server 2003 Domain controller, so using group policy preferences and client side extensions in server 2008 is not really an option.

    Does anyone have an up-to-date vb script to map network printers in Windows 7?

    Many thanks,

    DGardner

  2. #2

    LeMarchand's Avatar
    Join Date
    Jan 2008
    Location
    The deepest pits of hell
    Posts
    2,197
    Thank Post
    303
    Thanked 339 Times in 241 Posts
    Rep Power
    143
    Same setup as you (Server 2003 - as the LEA don't support 2008 yet!) and just put a load of W7 laptops out.

    Our standard VB script worked but (you knew it was coming...) there was some problem (with UAC?) that prevented the log on script running as it needed permission to install the drivers. I ran the script manually and allowed the drivers through and since then it's been fine.

    Anyway, your old script may work if the drivers are pre-installed (though as it was the second iteration of the image, it should have had them). I was wondering if a startup rather than log on script might do better, but with only 2x2.5 hours/week at that school and the fact that the teachers have been provided the laptops as "home work" machines (don't go there) I haven't made any further investigations.

  3. #3


    Join Date
    Mar 2009
    Location
    Leeds
    Posts
    6,647
    Thank Post
    229
    Thanked 865 Times in 743 Posts
    Rep Power
    297
    if its a 2003 r2 then the print console there works nicely on win 7 all i use a vbs script for is to set default printer

  4. #4

    SYNACK's Avatar
    Join Date
    Oct 2007
    Posts
    11,225
    Thank Post
    874
    Thanked 2,717 Times in 2,302 Posts
    Blog Entries
    11
    Rep Power
    780
    You can easily get rid of the UAC on adding printers with VBS scripts with a simple change to group policy even under server 2003 see here:

    http://www.edugeek.net/forums/window...tml#post223322

  5. #5

    Join Date
    Jan 2010
    Posts
    101
    Thank Post
    0
    Thanked 7 Times in 7 Posts
    Rep Power
    11
    ok

    how do you get that option on windows 2k3 active directory ? so my windows 7 machines get the right settings?

    i have point to print but limited number of options to just the standard ones listed in 2k3 non r2

    thanks
    andy

  6. #6

    Join Date
    Jan 2010
    Posts
    101
    Thank Post
    0
    Thanked 7 Times in 7 Posts
    Rep Power
    11
    been thinking on this over night and just testing a solution now will report back

  7. #7

    Join Date
    Aug 2005
    Location
    London
    Posts
    3,157
    Thank Post
    116
    Thanked 529 Times in 452 Posts
    Blog Entries
    2
    Rep Power
    124
    Quote Originally Posted by dgardner View Post
    Hi guys,

    I have recently ordered 30 new laptops. SMT would like me to install Windows 7 to see what people think of it. I have a Server 2003 Domain controller, so using group policy preferences and client side extensions in server 2008 is not really an option.
    Oh yes it is :-)

    You don't need Server 2008 to use GPP - you just need server 2003. The confusion comes about because it wasn't introduced until Server 2008 and you can't manage it unless you've got at least one machine with Server 2008, Vista or Windows 7.

  8. #8

    LeMarchand's Avatar
    Join Date
    Jan 2008
    Location
    The deepest pits of hell
    Posts
    2,197
    Thank Post
    303
    Thanked 339 Times in 241 Posts
    Rep Power
    143
    Quote Originally Posted by SYNACK View Post
    You can easily get rid of the UAC on adding printers with VBS scripts with a simple change to group policy even under server 2003 see here:

    http://www.edugeek.net/forums/window...tml#post223322
    User Configuration -> Policies -> Administrative Templates -> Control Panel -> Printers : Point and Print Restrictions
    Setting: Enabled

    In its Config Tab:
    Do not specify any servers to restrict Point and Print to so it will continue to work for any server without specifying every one

    Security Prompts:
    When Installing drivers for a new connection:
    -Do not show warning or elevation prompt
    -Show warning and elevation prompt

    When updating drivers for an existing connection:
    -Do not show warning or elevation prompt
    -Show warning and elevation prompt
    -Show warning only
    Do you need to install RSAT on the W7 machines? I get as far as finding the policy, but the bits in italics don't seem to be an option.

  9. #9

    Join Date
    Jan 2010
    Posts
    101
    Thank Post
    0
    Thanked 7 Times in 7 Posts
    Rep Power
    11
    Quote Originally Posted by LeMarchand View Post
    Do you need to install RSAT on the W7 machines? I get as far as finding the policy, but the bits in italics don't seem to be an option.
    you getting more along than me then - i have installed the rsat for windows 7 on a windows 7 machine and it till not connect to the server .

  10. #10

    garethedmondson's Avatar
    Join Date
    Oct 2008
    Location
    Gowerton, Swansea
    Posts
    2,263
    Thank Post
    965
    Thanked 324 Times in 192 Posts
    Blog Entries
    11
    Rep Power
    165
    Here is the script we use - not for Windows 7 but for Windows XP. Try it. It was written by one of our LEA script gurus so I have left his name in.

    Code:
    'Name : addprinter.vbs
    'Author : Matt Davies
    'Date : 22/03/2006
    'Description :  - Used to add printers for a user
    '   - Used inconjunction with group policy at Workstation level so it runs per room
    '   - Needs to be run under "USER" Logon scripts 
    Option Explicit
    Dim objNetwork
    'declare the printer names - add as necessary
    Dim strUNCPrinter1
    Dim strUNCPrinter2
    'set the UNC path to the printers you want mapped - add as necessary
    strUNCPrinter1 = "\\ygg-printers\2700-Cymraeg"
    strUNCPrinter2 = "\\ygg-printers\5170-Cymraeg"
    Set objNetwork = CreateObject("WScript.Network")
    'remove old printer(s) first
    'for debugging comment out next line only
    on error resume next
    objNetwork.RemovePrinterConnection strUNCPrinter1
    objNetwork.RemovePrinterConnection strUNCPrinter2
    'Wait 3 seconds whilst windows removes the old printers
    wscript.sleep(3000)
    'Add the printer to the computer - add as necessary
    objNetwork.AddWindowsPrinterConnection strUNCPrinter1
    objNetwork.AddWindowsPrinterConnection strUNCPrinter2
    ' Here is where we set the default printer - change if necessary
    objNetwork.SetDefaultPrinter strUNCPrinter1
    'End the script
    Wscript.Quit

  11. #11

    SYNACK's Avatar
    Join Date
    Oct 2007
    Posts
    11,225
    Thank Post
    874
    Thanked 2,717 Times in 2,302 Posts
    Blog Entries
    11
    Rep Power
    780
    I have updated my page here with more information required for Windows 7:
    http://www.edugeek.net/forums/window...tml#post223322

  12. #12

    Join Date
    Jan 2010
    Posts
    101
    Thank Post
    0
    Thanked 7 Times in 7 Posts
    Rep Power
    11
    just to add i have now resolved the issue with windows 7

    i have stopped using vbs and moved to kix scripts to call the printers.

    i have uninstalled all the older drivers from my server for my HP products (laserjet 1200) was the one which was crashing out the print spooler on the windows 7 machine on attempting to install.

    i installed the HP universal pcl5/pcl6 driver on the machine which is now pulled to the windows 7 machine and it works fine.

    i do still have the pop up asking if i trust the printer driver i am installing but without changing to windows 2k3 r2 i dont have any way of changing that .

  13. #13

    Join Date
    Aug 2007
    Posts
    818
    Thank Post
    101
    Thanked 65 Times in 47 Posts
    Rep Power
    26
    deploy printers with group policy works perfectly.
    I think you need R2 if your running server 2003

  14. #14

    Join Date
    Mar 2008
    Location
    Doncaster
    Posts
    11
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    I have a similar problem. We have got 30 Win7 netbooks on a Server 2003 domain. My VB printer script works fine on the XP machines. On the 7 machines, my printers are mapped when logged on as admin but not when I log on as a user.
    Gpresult says the policy with the script in it "is applied", but the printers aren't mapped.
    I have got RSAT installed on the 7 machines and done the point to print restriction policy as described by SYNACK.
    I can install the printers when logged on as a user in the normal way, so the drivers are there and there aren't any restrictions.

  15. #15

    SYNACK's Avatar
    Join Date
    Oct 2007
    Posts
    11,225
    Thank Post
    874
    Thanked 2,717 Times in 2,302 Posts
    Blog Entries
    11
    Rep Power
    780
    @Windy08, are you using a vbs or a bat file to map printers, I had issues with bat file based printer adding even with the restrictions turned off so had to use a VBS based one. Also are the Windows 7 machines 64bit and if so do you have 64bit drivers shared out on your print server for them to use?

SHARE:
+ Post New Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. Windows 2003 R2 Printer Management
    By Simcfc73 in forum Windows Server 2000/2003
    Replies: 50
    Last Post: 4th February 2010, 02:44 PM
  2. Windows 7 Printer Scripting HELP!!
    By Scottyboy99 in forum Windows 7
    Replies: 13
    Last Post: 6th November 2009, 01:44 PM
  3. VBS to remove Windows Firewall exception
    By simons2009 in forum Scripts
    Replies: 9
    Last Post: 3rd June 2009, 08:18 AM
  4. Printing to Windows Printer
    By ahunter in forum Mac
    Replies: 4
    Last Post: 1st February 2008, 12:35 PM
  5. Replies: 7
    Last Post: 27th September 2006, 08:19 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
  •