Bram, as Rainer says it is easier to use a cmd or bat file to do it. I looked up some info about wsus deployment and found something that said to use a bat file. This is my wsus.bat (followed by my wsus wpkg package).
@echo off :: Echo Save the batch file as "WSUS.bat". This batch file will do the following: Echo 1. Stops the Automatic Update Service (wuauserv) service. Echo 2. Imports WUA settings for workstations in workgroup to detect/download/install updates from WSUS. Echo 3. Starts the Automatic Update Service (wuauserv) service. Echo 4. Force update detection. Echo 5. More information on http://msmvps.com/Athif REM INSTRUCTIONS: REM Place both the files (WSUS.reg and WSUS.bat) in same location (single folder) REM Double-click WSUS.bat to import WSUS.reg which contains Windows Update Agent (WUA) settings. REM for WUA in a workgroup environment. In this sample, WSUS.reg and WSUS.bat REM are placed in 'c:\'. REM Author:- Mohammed Athif Khaleel :- Date April 30, 2006 rem Pause Net Stop "wuauserv" Echo Importing WSUS.reg %windir%\Regedit.exe /s \\myserver.com\wpkg\files\wsus\WSUS.reg Echo WSUS.reg imported succesfully Net Start "wuauserv" Echo Forcing update detection wuauclt /detectnow rem Pause <package id="wsus" name="WSUS registration" revision="1" reboot="false" priority="20" execute="once"> <install cmd='%SOFTWARE%\wsus\wsus.bat' /> </package> Good luck Paul -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bram Bosboom Sent: 08 December 2008 11:32 To: [email protected] Subject: [wpkg-users] Registry key import Howdy, I just discovered something where registry imports fail if a variable is used (the software variable which works for normal installs for example). I do see some examples on the wiki where a variable is used to import a key so I guess I am missing something here.. A simple example package I have is where I want to import some WSUS keys to deploy on some workstations; *snap* <check type="registry" condition="exists" path="HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpda te" /> <install cmd='regedit /s "%SOFTWARE%\wsus\securewsus.reg"' /> *snap* The regfile itself is working OK. And whole package does get run. On the debug the command it says the import is done successfully but actually it doesn't happen! (Now I know 'regedit /s' always returns a 'success' even if the path doesnt excist but I though it would be worth mentioning) I tried without the quotes under -%SOFTWARE%\wsus\securewsus.reg- which shouldn't be necessary but that also fails. Now when I do use the full unc path to the registry key location it is working fine?? So I assume it has something to do with the variable. Now I though their perhaps would be a need of a system variable cause WPKG is just starting a command prompt or something so I have set a system variable 'software' to the same path. The variable works, but the script still fails to import the key.. :[ Searched the bug on the bug tracker but I could not find anything related. Anyone knows what's up? I use latest dev release client (1.3.6) and stable server script (1.0.2). Summary: Executing command : regedit /s "%SOFTWARE%\securewsus.reg" Command in installation of WSUS Register sleutel set returned exit code [0]. Suc cess. ^FAILS^ Executing command : regedit /s "\\pathtoregkey\securewsus.reg" Command in installation of WSUS Register sleutel set returned exit code [0]. Suc cess. ^WORKS^ Thanks in advance! Regards, Bram ------------------------------------------------------------------------ - wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/ _______________________________________________ wpkg-users mailing list [email protected] http://lists.wpkg.org/mailman/listinfo/wpkg-users ------------------------------------------------------------------------- wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/ _______________________________________________ wpkg-users mailing list [email protected] http://lists.wpkg.org/mailman/listinfo/wpkg-users
