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

Natxo Asenjo natxo.asenjo at gmail.com
Thu Mar 25 08:42:53 CET 2010


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



More information about the wpkg-users mailing list