Home All Groups Group Topic Archive Search About

Printer Starup Script successfull for Win2k, but not for XP



Author
10 May 2005 6:08 PM
Springside
Hello,

I am currently running a printer startup script via a batch file off of a
Win2k server for Win2k clients, however when I attempt to run the startup
script for WinXP clients I am unsuccessfull.  The batch I use is below:

Create a batch file (e.g. printers.bat) containing lines of the following
form (the PrintUIEntry bit is case-sensitive):

rundll32 printui.dll,PrintUIEntry /in /n \\printserver\printer1
rundll32 printui.dll,PrintUIEntry /in /n \\printserver\printer2
rundll32 printui.dll,PrintUIEntry /in /n \\printserver\printer3

Is there any reason the script will run for Win2k but not for XP?  If so,
does anyone know a workaround?

Thanks in advance!

Author
11 May 2005 3:38 AM
wocka
Gidday,

I tried a few years ago to make adding a printer via the "PrintUIEntry", but
maybe I wasn't case sensitive.  Might have to re-visit that one.

So I used the NT Resource Kit file "con2prt.exe" and the following script:

################ Start Script ########################
@echo off

REM *****************************************
REM Created by Wocka 26/10/04
REM Script is to set up printers on users
REM workstations
REM *****************************************

REM ***************************************
REM copy con2prt.exe to the root dir of the
REM workstation to install and remove printers
REM for the user.
REM /c connects the printer to the workstation
REM /cd Connects the printer to the workstation and makes it the default
REM ***************************************

echo ******************************************
echo.
echo Please wait while the Network Printers are
echo         added to your computer
echo.
echo ******************************************

IF NOT EXIST c:\con2prt.exe copy %logonserver%\netlogon\con2prt.exe c:\

REM ***************************************
REM To set up a printer
REM ***************************************

c:
cd\

con2prt /f

cls

echo ******************************************
echo.
echo Please wait while the Network Printers are
echo         added to your computer
echo.
echo ******************************************

con2prt /cd \\server\hp2300
con2prt /c \\server\s4500


exit
################ End Script ########################

Show quote
"Springside" <Springs***@discussions.microsoft.com> wrote in message
news:BD68B923-6E91-4A0F-887D-9135C3FD1FA4@microsoft.com...
> Hello,
>
> I am currently running a printer startup script via a batch file off of a
> Win2k server for Win2k clients, however when I attempt to run the startup
> script for WinXP clients I am unsuccessfull.  The batch I use is below:
>
> Create a batch file (e.g. printers.bat) containing lines of the following
> form (the PrintUIEntry bit is case-sensitive):
>
> rundll32 printui.dll,PrintUIEntry /in /n \\printserver\printer1
> rundll32 printui.dll,PrintUIEntry /in /n \\printserver\printer2
> rundll32 printui.dll,PrintUIEntry /in /n \\printserver\printer3
>
> Is there any reason the script will run for Win2k but not for XP?  If so,
> does anyone know a workaround?
>
> Thanks in advance!
>
>
Author
11 May 2005 3:24 PM
Yimin Wei
Springside wrote:
Show quote
> Hello,
>
> I am currently running a printer startup script via a batch file off of a
> Win2k server for Win2k clients, however when I attempt to run the startup
> script for WinXP clients I am unsuccessfull.  The batch I use is below:
>
> Create a batch file (e.g. printers.bat) containing lines of the following
> form (the PrintUIEntry bit is case-sensitive):
>
> rundll32 printui.dll,PrintUIEntry /in /n \\printserver\printer1
> rundll32 printui.dll,PrintUIEntry /in /n \\printserver\printer2
> rundll32 printui.dll,PrintUIEntry /in /n \\printserver\printer3
>
> Is there any reason the script will run for Win2k but not for XP?  If so,
> does anyone know a workaround?
>
> Thanks in advance!
>
>

The script runs fine on my XP machines. What's the error message you got?

Yimin Wei
Author
11 May 2005 4:23 PM
Springside
It is strange, I do not get an error message. The script seems to run fine,
upon startup you see startup script run, it searches for the printers, then
when I logon the printers are not there?

Show quote
"Yimin Wei" wrote:

> Springside wrote:
> > Hello,
> >
> > I am currently running a printer startup script via a batch file off of a
> > Win2k server for Win2k clients, however when I attempt to run the startup
> > script for WinXP clients I am unsuccessfull.  The batch I use is below:
> >
> > Create a batch file (e.g. printers.bat) containing lines of the following
> > form (the PrintUIEntry bit is case-sensitive):
> >
> > rundll32 printui.dll,PrintUIEntry /in /n \\printserver\printer1
> > rundll32 printui.dll,PrintUIEntry /in /n \\printserver\printer2
> > rundll32 printui.dll,PrintUIEntry /in /n \\printserver\printer3
> >
> > Is there any reason the script will run for Win2k but not for XP?  If so,
> > does anyone know a workaround?
> >
> > Thanks in advance!
> >
> >
>
> The script runs fine on my XP machines. What's the error message you got?
>
> Yimin Wei
>
Author
12 May 2005 7:45 PM
Yimin Wei
Did you schedule the script to run during system startup under admin
credential? If so, the printers would be added under that admin account
but not your account.

Springside wrote:
Show quote
> It is strange, I do not get an error message. The script seems to run fine,
> upon startup you see startup script run, it searches for the printers, then
> when I logon the printers are not there?
>
> "Yimin Wei" wrote:
>
>
>>Springside wrote:
>>
>>>Hello,
>>>
>>>I am currently running a printer startup script via a batch file off of a
>>>Win2k server for Win2k clients, however when I attempt to run the startup
>>>script for WinXP clients I am unsuccessfull.  The batch I use is below:
>>>
>>>Create a batch file (e.g. printers.bat) containing lines of the following
>>>form (the PrintUIEntry bit is case-sensitive):
>>>
>>>rundll32 printui.dll,PrintUIEntry /in /n \\printserver\printer1
>>>rundll32 printui.dll,PrintUIEntry /in /n \\printserver\printer2
>>>rundll32 printui.dll,PrintUIEntry /in /n \\printserver\printer3
>>>
>>>Is there any reason the script will run for Win2k but not for XP?  If so,
>>>does anyone know a workaround?
>>>
>>>Thanks in advance!
>>>
>>>
>>
>>The script runs fine on my XP machines. What's the error message you got?
>>
>>Yimin Wei
>>
Author
13 May 2005 1:21 PM
Springside
Yes I did schedule the script under admin credential, but I am an admin, so
that should not matter, correct?  In addtion, the script works great as a
logon script rather then a startup scritp in XP, I'm begining to think that a
logon script is the only way to make it work.

Show quote
"Yimin Wei" wrote:

> Did you schedule the script to run during system startup under admin
> credential? If so, the printers would be added under that admin account
> but not your account.
>
> Springside wrote:
> > It is strange, I do not get an error message. The script seems to run fine,
> > upon startup you see startup script run, it searches for the printers, then
> > when I logon the printers are not there?
> >
> > "Yimin Wei" wrote:
> >
> >
> >>Springside wrote:
> >>
> >>>Hello,
> >>>
> >>>I am currently running a printer startup script via a batch file off of a
> >>>Win2k server for Win2k clients, however when I attempt to run the startup
> >>>script for WinXP clients I am unsuccessfull.  The batch I use is below:
> >>>
> >>>Create a batch file (e.g. printers.bat) containing lines of the following
> >>>form (the PrintUIEntry bit is case-sensitive):
> >>>
> >>>rundll32 printui.dll,PrintUIEntry /in /n \\printserver\printer1
> >>>rundll32 printui.dll,PrintUIEntry /in /n \\printserver\printer2
> >>>rundll32 printui.dll,PrintUIEntry /in /n \\printserver\printer3
> >>>
> >>>Is there any reason the script will run for Win2k but not for XP?  If so,
> >>>does anyone know a workaround?
> >>>
> >>>Thanks in advance!
> >>>
> >>>
> >>
> >>The script runs fine on my XP machines. What's the error message you got?
> >>
> >>Yimin Wei
> >>
>

AddThis Social Bookmark Button