+ Post New Thread
Page 1 of 2 12 LastLast
Results 1 to 15 of 22
Windows Thread, Can printer script be applied to a Computer in Group Policy? in Technical; Hi guys, I'm sure this is simple. I have a .vbs script that basically just sets the default printer to ...
  1. #1

    Join Date
    Mar 2006
    Location
    Greater Manchester
    Posts
    218
    Thank Post
    5
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Can printer script be applied to a Computer in Group Policy?

    Hi guys,

    I'm sure this is simple.

    I have a .vbs script that basically just sets the default printer to be "ITSuiteLaser". I want it to run on all computers in the Devices/ITSuite OU so that then whenever anybody logs onto the computers in the IT Suite, regardless of their username (y1 -y6, teacher) the default printer is the Laser in the IT Suite.

    I have created a new GPO called 'Default Printer' which is applied to the IT Suite OU. In it the only setting is a logon script - itsuiteprinter.vbs. This policy is supposed to apply to both IT Suite OU and the ITSuitePCs group. Secuirty settings seem fine (apply group policy and read are both ticked), but it doesn't run!

    I have tried using the GPMC modelling tool, and it shows that the policies applied are - Default Domain Policy and 'Default Printer'.

    So why is it not running?

    I have tried gpupdate /force and rebooted the PC but it makes no difference..

    Please help!

    Thanks

  2. #2
    Guest

    Re: Can printer script be applied to a Computer in Group Policy?

    You need to enable loopback processing so that user GPO settings can be applied to computer OUs.

    Look under

    Computer Configuration/Administrative Templates/System/Group Policy/User Group Policy loopback processing mode

    Enable and set to merge.

  3. #3
    mark's Avatar
    Join Date
    Jun 2005
    Posts
    3,958
    Thank Post
    248
    Thanked 49 Times in 45 Posts
    Blog Entries
    2
    Rep Power
    46

    Re: Can printer script be applied to a Computer in Group Policy?

    Loopback can be tempramental tho' - others here have had no problems, but i've had loads. Better IMHO to do it via scripting instead.

  4. #4

    Join Date
    Mar 2006
    Location
    Greater Manchester
    Posts
    218
    Thank Post
    5
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Re: Can printer script be applied to a Computer in Group Policy?

    Thanks

    If others like me don't have a clue what loopback is - have a look here:

    http://grouppolicy.editme.com/Loopback

    Thanks again!
    Cm786

    PS Does this also have to be enabled when assigning software to a OU of computers too or only for scripts?

  5. #5
    Guest

    Re: Can printer script be applied to a Computer in Group Policy?

    It is for any User based setting and you need to apply to a machine OU

  6. #6

    bossman's Avatar
    Join Date
    Nov 2005
    Location
    England
    Posts
    3,898
    Thank Post
    1,182
    Thanked 1,053 Times in 748 Posts
    Rep Power
    327

    Re: Can printer script be applied to a Computer in Group Policy?

    Is there another group policy at the domain level which is taking precedence before the ITsuite OU and have you checked the order in which these have been applied to the actual ITsuite OU. Not trying to teach granny to suck eggs but just tryin to help. Loopbacks tend to be last resort so i would stay clear if you can help it as it will come and bite yer on the ar-e when you least expect it OK

  7. #7

    Join Date
    Jul 2005
    Location
    North Wales
    Posts
    54
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Re: Can printer script be applied to a Computer in Group Policy?

    Why do people use loopback processing for logon scripts where there's the "run these programs at logon" option in computer management->admin templates -> system -> logon?

  8. #8

    Join Date
    Mar 2006
    Location
    Greater Manchester
    Posts
    218
    Thank Post
    5
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Re: Can printer script be applied to a Computer in Group Pol

    Quote Originally Posted by bossman
    Is there another group policy at the domain level which is taking precedence before the ITsuite OU and have you checked the order in which these have been applied to the actual ITsuite OU. Not trying to teach granny to suck eggs but just tryin to help. Loopbacks tend to be last resort so i would stay clear if you can help it as it will come and bite yer on the ar-e when you least expect it OK
    I still need to learn to suck eggs! :P Any help is appreciated mate!

    I'm not at the school today, but as far as I remember the order of precdence for GPOs that affect the ITsuite OU are:

    Default Domain Policy,
    Default Printer

    Thats it.

    Other policies such as Student LockDown, Proxy and Folder redirection are appliced to the Students OU.

  9. #9
    ChrisH's Avatar
    Join Date
    Jun 2005
    Location
    East Lancs
    Posts
    4,996
    Thank Post
    120
    Thanked 280 Times in 258 Posts
    Rep Power
    106

    Re: Can printer script be applied to a Computer in Group Policy?

    Have a look in the scripts section for printer logon scripts that will add printers according to hostnames or what OU they are in. It's alot easier in the long run. Its also useful to have that bit of code to run in a startup script as well to get the printer drivers installed as a normal user wont be able to if an admin hasnt logged onto that machine etc.

  10. #10

    Join Date
    Mar 2006
    Location
    Greater Manchester
    Posts
    218
    Thank Post
    5
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Re: Can printer script be applied to a Computer in Group Policy?

    After reading another thread on here about Microsoft Visualisation Server, I have downloaded it at home and setup two virtual PCs - one Server and one client. Its abit slow and lots of pagefile activity, but I can now try these suggestions at home!

    Looking at the printer script now.

    Thanks everyone!

  11. #11

    Join Date
    Mar 2006
    Location
    Greater Manchester
    Posts
    218
    Thank Post
    5
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Re: Can printer script be applied to a Computer in Group Policy?

    Back at the school today, and even with loopback enabled it still didn't work.

    I have just used Ric_'s excellent printer script and I have now achieved what I want so thanks!

    However, I was wondering, if the PC is not called "ITSUITE" would it be possible to set the local printer using the USB001 port as the default instead?

    This is becasue in classes we have loads of different printers, so setting the one using the USB001 port to default would be great, then when they are in the IT Suite and login the defult printer becomes the ITSuite laser.

    As a side thing - I was at my local college checking something out recenlty and when a student/staff member logged in, a windows ballon tip appeared saying "You are connected to ****** Printer" and then disapeared. Thought that was pretty cool. It just makes it clear to the user, which printer they are able to print from. Is their an easy way to achieve this?

    Thanks

  12. #12

    plexer's Avatar
    Join Date
    Dec 2005
    Location
    Norfolk
    Posts
    13,272
    Thank Post
    614
    Thanked 1,567 Times in 1,407 Posts
    Rep Power
    412

    Re: Can printer script be applied to a Computer in Group Policy?

    Yup just use the msgbox function I use it to say default printer is .....

    Dim MyVar

    MyVar = MsgBox ("Hello World!", 0, "MsgBox Example")

    Ben

  13. #13
    mark's Avatar
    Join Date
    Jun 2005
    Posts
    3,958
    Thank Post
    248
    Thanked 49 Times in 45 Posts
    Blog Entries
    2
    Rep Power
    46

    Re: Can printer script be applied to a Computer in Group Policy?

    A WSH example with a timeout:

    Set oShell = CreateObject("WScript.Shell")
    oShell.Popup "You are connected to Room IT1 Laser Printer", 5, "Information"

  14. #14

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    9,680
    Thank Post
    3,210
    Thanked 1,030 Times in 955 Posts
    Rep Power
    361

    Re: Can printer script be applied to a Computer in Group Policy?

    Using WSH just makes a msgbox appear and having the MyVar seems a waste to me because its not like you are returning anything into the variable ie if there was a yes , no and a cancel button then fair enough since you would need to check whether the end user pressed yes, no or cancel by using vbYes, vbNo or vbCancel ( which also has its numerical representations which Im not sure of off the top of my head )

    ie

    Dim MyResult

    MyResult = MsgBox("Are you sure you want to quit?", 0, "End Program!")

    If MyResult = vbYes Then
    End
    Else
    EndIf

    or something along those lines ( Not sure if that works in vbscript but you get the point )

    Correct me if I am wrong ?

    So from that I would say you could just do something like so :

    MsgBox "Text you want here", 0,"Title for the msgbox"

    That way you are not using a variable when you dont need it, you still get the info across to the user and you dont need to create an object to make it happen ( less coding ).

    Just as effective ( I am sure it probably has its down sides and it would be nice to know what they are if there are any at all

    I found an OCX on pscode.com that said it could be used in vbscript as well as visual basic, whether thats the case or not I dont know.

  15. #15

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,802
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224

    Re: Can printer script be applied to a Computer in Group Policy?

    This is becasue in classes we have loads of different printers, so setting the one using the USB001 port to default would be great, then when they are in the IT Suite and login the defult printer becomes the ITSuite laser.
    Yes just do:

    Code:
    Printer.SetDefaultPrinter "HP 1120C"
    In the relevant case statement.

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

Similar Threads

  1. Replies: 5
    Last Post: 7th December 2007, 09:07 PM
  2. Replies: 2
    Last Post: 2nd December 2007, 05:35 PM
  3. Replies: 4
    Last Post: 12th July 2007, 08:11 PM
  4. Group Policy not being applied
    By faza in forum Windows
    Replies: 23
    Last Post: 7th July 2006, 04:19 PM
  5. Replies: 0
    Last Post: 23rd May 2006, 10: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
  •