[wpkg-users] Registry key import

Bram Bosboom b.bosboom at prompt.nl
Mon Dec 8 12:32:15 CET 2008


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\WindowsUpdate"
/>
   
    <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



More information about the wpkg-users mailing list