[wpkg-users] Install for 'just me' or 'everyone'?i

Marco Gaiarin gaio at sv.lnf.it
Thu Apr 26 10:34:42 CEST 2007


Mandi! Dave Ewart
  In chel di` si favelave...

> I think I need to reinstall WPKG on each client using ALLUSERS, (or
> 'Everyone' in the GUI installer).

I've done that. I've setup a batch script and put on 'Autorun' folder
of Administrator user, because i need to made a journey to all computer
for an inventory, so while wriding down serial numbers i've logon as
administrator and leave the script run.

But you can run it with psexec or something like that, my script do
simply:

 @echo off
 :: an hack script that upgrade WPKG...
 ::

 :: some environment variable
 ::
 set WPKGROOT=\\FILE\wpkg
 set SOFTWARE=\\MEDIA\Software
 set WPKGMSI=%SOFTWARE%\WPKG\WPKGSetup-0.90.msi
 set PRODUCTCODE={BD368683-C6EB-480A-B497-56CE35D59D28}
 set SETTINGSFILE=%WPKGROOT%\settings.xml

 :: Ask for user confirmation...
 ::
 echo Premi un tasto per iniziare l'aggiornamento di WPKG
 pause

 :: Boh, permission got scrambled, restore it
 ::
 cacls %PROGRAMFILES%\wpkg /t /c /e /g BUILTIN\Administrators:f
 cacls %PROGRAMFILES%\wpkg /t /c /e /g SYSTEM:f

 :: first things, for max safety we stop wpkg service
 ::
 net stop "WPKG Service"

 :: We try to remove WPKG, this seems to fail if we have installed it as
 :: another user insted of the current one.
 :: we cannot upgrade, because upgrade will put WPKG in a unusable state,
 :: while remove simply fail.
 :: If we have successfully removed it, we install it.
 ::
 msiexec /qb /x %PRODUCTCODE%
 if %ERRORLEVEL% equ 0 (
        msiexec /qb /i %WPKGMSI% SETTINGSFILE=%SETTINGSFILE% ALLUSERS=1
        if %ERRORLEVEL% equ 0 goto exit
 )
 goto error


 :exit

 :: delete desktop shortcut and myself, job done
 ::
 del /f /q "C:\Documents and Settings\All Users\Desktop\WPKG Parameters.lnk"
 exit 0

 :error

 echo "error"

-- 
dott. Marco Gaiarin				    GNUPG Key ID: 240A3D66
  Associazione ``La Nostra Famiglia''                http://www.sv.lnf.it/
  Polo FVG  -  Via della Bontà, 7 - 33078  -  San Vito al Tagliamento (PN)
  marco.gaiarin(at)sv.lnf.it	  tel +39-0434-842711  fax +39-0434-842797


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