Re: Printer Starup Script successfull for Win2k, but not for XP



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 ########################

"Springside" <Springside@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:BD68B923-6E91-4A0F-887D-9135C3FD1FA4@xxxxxxxxxxxxxxxx
> 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!
>
>


.



Relevant Pages

  • Re: script log file (how)
    ... The problem with my original script was that it didn't keep any logs of what ... echo copy files into archive ... if %1$==$ GOTO:Error ... REM instead of GEQ you could substitute: ...
    (microsoft.public.windows.server.scripting)
  • RE: Help for Windows Vista.
    ... just add a username and password to your command. ... Echo Loggin into our company ... REM *** drev w ... Did you run the Script as Administrator? ...
    (microsoft.public.windows.vista.general)
  • Re: script log file (how)
    ... Maybe I'll just have the script ... create log archives after they grow to a certain size and purge the oldest ... echo copy files into archive ... REM instead of GEQ you could substitute: ...
    (microsoft.public.windows.server.scripting)
  • Re: COMMAND SHELL PROGRAMMING.
    ... The first comment claims to get user's input but never prompts for ... Another comment claims to delete the script file but only empties it. ... Long ago I read:REM is quicker then REM. ... Echo some text here>outputfile.txt ...
    (bit.listserv.ibm-main)
  • Re: Asign default printer
    ... @echo off ... REM Script is to set up printers on users ... REM workstations ... REM workstation to install and remove printers ...
    (microsoft.public.windows.server.scripting)