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 ...
-
7th July 2006, 12:31 PM #1
- 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
-
-
IDG Tech News
-
7th July 2006, 12:35 PM #2 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.
-
-
7th July 2006, 12:55 PM #3 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.
-
-
7th July 2006, 01:03 PM #4
-
-
7th July 2006, 01:08 PM #5 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
-
-
7th July 2006, 01:21 PM #6 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
-
-
7th July 2006, 01:34 PM #7
- 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?
-
-
7th July 2006, 01:38 PM #8
- Rep Power
- 0
Re: Can printer script be applied to a Computer in Group Pol

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.
-
-
7th July 2006, 04:00 PM #9 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.
-
-
7th July 2006, 04:14 PM #10
- 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!
-
-
10th July 2006, 06:34 PM #11
-
-
10th July 2006, 06:41 PM #12 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
-
-
10th July 2006, 09:33 PM #13 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"
-
-
10th July 2006, 10:07 PM #14 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.
-
-
10th July 2006, 11:12 PM #15 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:
Similar Threads
-
By link470 in forum Windows
Replies: 5
Last Post: 7th December 2007, 10:07 PM
-
By link470 in forum Windows
Replies: 2
Last Post: 2nd December 2007, 06:35 PM
-
By FN-GM in forum Windows
Replies: 4
Last Post: 12th July 2007, 08:11 PM
-
Replies: 23
Last Post: 7th July 2006, 04:19 PM
-
By ajbritton in forum Windows
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
-
Forum Rules