i have been having a good time trying to add (or modify) a registry containing a system variable (%userprofile%).
what i want:
i want that the following string will appear (as is): “HKEY_LOCAL_MACHINE\SOFTWARE\SAP\SAP Shared” with value “SapWorkDir” and data “%userprofile%\SapWorkDir”
what i tried:
i tried getting to it by using both Bigfix action script regset (regset "
HKEY_LOCAL_MACHINE\SOFTWARE\SAP\SAP Shared
" “SapWorkDir”=%userprofile%\SapWorkDir)
and using the dos command in bigfix action script (dos reg add “HKLM\Software\SAP\Sap Shared” /v Sapworkdir /t REG_EXPAND_SZ /d %userprofile%\SapWorkDir /f)
what i got:
when using Bigfix action script i got a “complete” notice, but registry entry was not changed at the client side.
when using the “dos” command i got the registry value / data, but i got my own profile folder (“c:\documents and settings\shlomi\sapworkdir” instead of the variable string “%userprofile%\sapworkdir”)
if i used a hard-coded location, (for example, c:\temp\sapworkdir) it worked (of course)
however, when it didnt work i went to the CustomAuthoringTrainingGuide-6-17-2005.pdf, and there in page 64 (under “registry commands”) it had a syntax example like this: Regset <“registry key”> <“value name”>= , without the qoutes around “value”.
in any case, this way i get the “sap shared” key, but not the value “sapworkdir” or the data “%userprofile%\sapworkdir”