[wpkg-users] remove xps printer (winxp/win2k3)

Kevin Keane subscription at kkeane.com
Fri Mar 26 06:32:05 CET 2010


I'm not sure if you can remove printers on a systemwide basis; it's a per-user setting. You may want to do this in a logon script instead of using wpkg.

> -----Original Message-----
> From: wpkg-users-bounces at lists.wpkg.org [mailto:wpkg-users-
> bounces at lists.wpkg.org] On Behalf Of Natxo Asenjo
> Sent: Thursday, March 25, 2010 12:43 AM
> To: wpkg-users at lists.wpkg.org
> Subject: [wpkg-users] remove xps printer (winxp/win2k3)
> 
> hi,
> 
> I have been at it for a few hours but I do not get it to work.
> 
> This is in my packages.xml:
> 
> <!-- remove the xps printer that comes with windows update -->
>     <package
>         id="deletexpsprinter"
>         name="Remove the xps document printer"
>         revision="1"
>         reboot="false"
>         priority="2" >
> 
>         <check      type="execute"
> path='%SOFTWARE%\rmprinter\rmxps.cmd' condition="exitcodeequalto"
> value="1" />
> <!--        <install    cmd='cscript //nologo
> "%windir%\system32\prnmngr.vbs" -d -p "Microsoft XPS Document Writer"
> ' />        -->
>         <install    cmd='rundll32 printui.dll,PrintUIEntry /dl /n
> "Microsoft XPS Document Writer" /q' />
> 
>         <remove     cmd='echo 0' />
> 
>     </package>
> 
> The check executes this script::
> 
> @echo off
> 
> cscript //nologo "%windir%\system32\prnmngr.vbs" -l | findstr /i xps
> 
> If the strig 'xps' is not found,  %ERRORLEVEL% is1, hence
> condition="exitcodeequalto" value="1" .
> 
> So if the printer is installed,  %ERRORLEVEL% will be 0 and the
> condition will not be true and the package will be 'installed' and in
> this case the printer shoul be removed. I have checked the commands
> and the remove the printer when I execute them interactively, but they
> do not work from the service.
> 
> Any hints appreciated, I have started one week ago with wpkg and
> already loving it :-)
> --
> Groeten,
> J.Asenjo
> -----------------------------------------------------------------------
> --
> wpkg-users mailing list archives >>
> http://lists.wpkg.org/pipermail/wpkg-users/
> _______________________________________________
> wpkg-users mailing list
> wpkg-users at lists.wpkg.org
> http://lists.wpkg.org/mailman/listinfo/wpkg-users



More information about the wpkg-users mailing list