Hi all,

I have a batch script that I need to run that sets the default printer, it
contains the following line:

rundll32 printui.dll,PrintUIEntry /y /n "115 Lab 4200"

My thinking is that I would make an OU for the Room 115 lab and put all of
the machines in that lab in the OU. I then made a GPO for that OU and added
the script to User Configuration -> logon Scripts, hoping it would execute
this script along with the logon script set in the properties of the users.
However, it does not. What am I doing wrong?

Any help is appreciated, thanks.

Re: GPO Queston by Florian

Florian
Wed May 07 07:24:10 PDT 2008

Howdie!

supersonic_oasis schrieb:
> I have a batch script that I need to run that sets the default printer, it
> contains the following line:
>
> rundll32 printui.dll,PrintUIEntry /y /n "115 Lab 4200"
>
> My thinking is that I would make an OU for the Room 115 lab and put all of
> the machines in that lab in the OU. I then made a GPO for that OU and added
> the script to User Configuration -> logon Scripts, hoping it would execute
> this script along with the logon script set in the properties of the users.
> However, it does not. What am I doing wrong?

Are users allowed to add printers to the machine? If not, try to
implement that as a machine startup script under Computer Configuration.
Those run in the SYSTEM context.

cheers,

Florian
--
Microsoft MVP - Windows Server - Group Policy.
eMail: prename [at] frickelsoft [dot] net.
blog: http://www.frickelsoft.net/blog.
Use a newsreader! http://www.frickelsoft.net/news.html

Re: GPO Queston by supersonicoasis

supersonicoasis
Wed May 07 07:46:01 PDT 2008

Hello

The printer is already installed on the machine, the script just sets it as
default. I logged in as a user and connected to the sysvol on the DC
manually and ran the script. It came up with a prompt that said "This
program cannot be verified are you sure you want to run it?" I click yes and
it executes fine. However, I know it does not run when I logon, because I
put a pause at the beginning of the script, and I never get prompted for it.
Does the fact that it's not verified cause an issue?

"Florian Frommherz [MVP]" wrote:

> Howdie!
>
> supersonic_oasis schrieb:
> > I have a batch script that I need to run that sets the default printer, it
> > contains the following line:
> >
> > rundll32 printui.dll,PrintUIEntry /y /n "115 Lab 4200"
> >
> > My thinking is that I would make an OU for the Room 115 lab and put all of
> > the machines in that lab in the OU. I then made a GPO for that OU and added
> > the script to User Configuration -> logon Scripts, hoping it would execute
> > this script along with the logon script set in the properties of the users.
> > However, it does not. What am I doing wrong?
>
> Are users allowed to add printers to the machine? If not, try to
> implement that as a machine startup script under Computer Configuration.
> Those run in the SYSTEM context.
>
> cheers,
>
> Florian
> --
> Microsoft MVP - Windows Server - Group Policy.
> eMail: prename [at] frickelsoft [dot] net.
> blog: http://www.frickelsoft.net/blog.
> Use a newsreader! http://www.frickelsoft.net/news.html
>

Re: GPO Queston by supersonicoasis

supersonicoasis
Wed May 07 07:52:01 PDT 2008

I went into the properties of a Domain User and set their logon script to my
script that sets the default printer (printer.bat) and it ran fine. But I
need it to run when it's set in the User Configuration of an OU that contains
only machines. Is that not possible?

"supersonic_oasis" wrote:

> Hello
>
> The printer is already installed on the machine, the script just sets it as
> default. I logged in as a user and connected to the sysvol on the DC
> manually and ran the script. It came up with a prompt that said "This
> program cannot be verified are you sure you want to run it?" I click yes and
> it executes fine. However, I know it does not run when I logon, because I
> put a pause at the beginning of the script, and I never get prompted for it.
> Does the fact that it's not verified cause an issue?
>
> "Florian Frommherz [MVP]" wrote:
>
> > Howdie!
> >
> > supersonic_oasis schrieb:
> > > I have a batch script that I need to run that sets the default printer, it
> > > contains the following line:
> > >
> > > rundll32 printui.dll,PrintUIEntry /y /n "115 Lab 4200"
> > >
> > > My thinking is that I would make an OU for the Room 115 lab and put all of
> > > the machines in that lab in the OU. I then made a GPO for that OU and added
> > > the script to User Configuration -> logon Scripts, hoping it would execute
> > > this script along with the logon script set in the properties of the users.
> > > However, it does not. What am I doing wrong?
> >
> > Are users allowed to add printers to the machine? If not, try to
> > implement that as a machine startup script under Computer Configuration.
> > Those run in the SYSTEM context.
> >
> > cheers,
> >
> > Florian
> > --
> > Microsoft MVP - Windows Server - Group Policy.
> > eMail: prename [at] frickelsoft [dot] net.
> > blog: http://www.frickelsoft.net/blog.
> > Use a newsreader! http://www.frickelsoft.net/news.html
> >

Re: GPO Queston by Joseph

Joseph
Wed May 07 08:17:37 PDT 2008

In order to do that, you'll need to set the loopback policy to either merge
or replace. See the following article:

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

--
Joseph T. Corey MCSE, Security+
Systems Administrator
jcorey@cmu.edu


"supersonic_oasis" <supersonicoasis@discussions.microsoft.com> wrote in
message news:4DF16F76-EB82-4CA5-BCA5-65BB9CADAF4E@microsoft.com...
>I went into the properties of a Domain User and set their logon script to
>my
> script that sets the default printer (printer.bat) and it ran fine. But I
> need it to run when it's set in the User Configuration of an OU that
> contains
> only machines. Is that not possible?
>
> "supersonic_oasis" wrote:
>
>> Hello
>>
>> The printer is already installed on the machine, the script just sets it
>> as
>> default. I logged in as a user and connected to the sysvol on the DC
>> manually and ran the script. It came up with a prompt that said "This
>> program cannot be verified are you sure you want to run it?" I click yes
>> and
>> it executes fine. However, I know it does not run when I logon, because
>> I
>> put a pause at the beginning of the script, and I never get prompted for
>> it.
>> Does the fact that it's not verified cause an issue?
>>
>> "Florian Frommherz [MVP]" wrote:
>>
>> > Howdie!
>> >
>> > supersonic_oasis schrieb:
>> > > I have a batch script that I need to run that sets the default
>> > > printer, it
>> > > contains the following line:
>> > >
>> > > rundll32 printui.dll,PrintUIEntry /y /n "115 Lab 4200"
>> > >
>> > > My thinking is that I would make an OU for the Room 115 lab and put
>> > > all of
>> > > the machines in that lab in the OU. I then made a GPO for that OU
>> > > and added
>> > > the script to User Configuration -> logon Scripts, hoping it would
>> > > execute
>> > > this script along with the logon script set in the properties of the
>> > > users.
>> > > However, it does not. What am I doing wrong?
>> >
>> > Are users allowed to add printers to the machine? If not, try to
>> > implement that as a machine startup script under Computer
>> > Configuration.
>> > Those run in the SYSTEM context.
>> >
>> > cheers,
>> >
>> > Florian
>> > --
>> > Microsoft MVP - Windows Server - Group Policy.
>> > eMail: prename [at] frickelsoft [dot] net.
>> > blog: http://www.frickelsoft.net/blog.
>> > Use a newsreader! http://www.frickelsoft.net/news.html
>> >