Thanks Mark, I'll give that a try. I tried manually changing the variable
and it didn't produce the expected results with the application so I'm
waiting to hear back from them. If it doesn't work with a manual edit the
script won't doing anything even if I can find the right context/tool.
Paul
"Mark V" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> In microsoft.public.win2000.registry Climberpm wrote:
>
>> I'm having a problem adding a registry key by logon script.
>> Actually the key adds OK but it just adds the wrong value.
>>
>> The script loads a .reg file however it doesn't replace the
>> %USERNAME% variable with the actual username but instead uses
>> USERNAME. So I end up with a folder named "%USERNAME% and not
>> "jdoe"
>>
>> Here is the content of the .reg file, which I load from the
>> script by the "regedit /s loadkey.reg" command
>>
>> Windows Registry Editor Version 5.00
>>
>> [HKEY_CURRENT_USER\Software\Creative Solutions\Practice
>> Management] "LocalPath"="n:\\wincsi.net\\ps\\%USERNAME%"
>>
>> Any thoughts ?
>
> To get variables to be resolved, the value's Type must be
> REG_EXPAND_SZ (Expand String). As REG_SZ the %USERNAME% is treated
> literally.
>
> Consider REG.EXE MS Tool perhaps.
>
|