[wpkg-users] Packages without checks installing every time

Malte Starostik malte at malte.homeip.net
Thu Mar 11 11:07:04 CET 2010


Am Donnerstag, 11. März 2010 10:41:54 schrieb Thomas Wootten:
> I've been having trouble with some packages without checks installing
> every time wpkg runs. Here are a couple of the packages:
> 
> <package id="drop_admin" name="Remove Administrator privileges from IT
> Technician account" revision="1" reboot="false" priority="1">
> <install cmd="\\192.168.2.150\wpkg\drop_admin.bat">
> <exit code="0" /><exit code="2" />
> </install>
> <upgrade cmd="\\192.168.2.150\wpkg\drop_admin.bat">
> <exit code="0" /><exit code="2" />
> </upgrade>
> </package>
> 
> <package id="disable_au" name="Disable Windows Automatic Updates"
> revision="1" reboot="false" priority="1">
> <install cmd='regedit /s
> "\\192.168.2.150\wpkg\Disable_Windows_Update.reg"' />
> </package>
> 
> If I add execute=once to the package tag, will that fix the problem. But
> then if I bump the revision number, will the upgrade command be run. (In
> other words, does 'once' mean once ever, or once as long as the revision
> remains the same.)

The latter, i.e. a revision bump will run the upgrade or downgrade commands 
accordingly.

As for disabling autoupdates, here's a version with check that will re-disable 
the service on each sync if neccessary:

    <package id="config/no-autoupdate" name="Einstellungen: Automatische 
Updates deaktivieren" revision="20091106">
        <check type="registry" condition="equals" 
path="HKLM\SYSTEM\CurrentControlSet\Services\wuauserv\Start" value="4"/>

        <install cmd="sc config wuauserv start= disabled"/>
        <install cmd="sc stop wuauserv"/>

        <upgrade cmd="sc config wuauserv start= diabled"/>
        <upgrade cmd="sc stop wuauserv"/>

        <remove cmd="sc config wuauserv start= auto"/>
        <remove cmd="sc start wuauserv"/>
    </package>

Cheers,
Malte



More information about the wpkg-users mailing list