Edit Registry key

(imported topic written by SystemAdmin)

I am having a fun time trying to edit a registry key. We have some machines that have “C:\WINNT” and some that have C:\Windows", how can I edit the registry depending on what system folder the machine has? Here is what I have:

regset “” “Wallpaper”="{{(pathname of system folder as string &"\COLONIAL.BMP")}"

I need to edit “Wallpaper”="{{(pathname of system folder as string &"\COLONIAL.BMP")}" to say “Wallpaper”="{{(C:\Windows\COLONIAL.BMP")}" or “Wallpaper”="{{(C:\WINNT\COLONIAL.BMP)}"

Growing frustrated very rapidly! Thank you.

(imported comment written by jessewk)

the inspector “windows folder” will provide the correct directory based on operating system.

I see you have a syntax error. If you use a double {{ it escapes the curly brace. Curly braces are used to designate text that should be evaluated as relevance and substituted into the action command before it is executed. By using {{ you are saying ‘don’t evaluate this as relevance, instead give me an actual curly brace.’

It looks like the first half of your regset is correct. Try this for the second half:

“Wallpaper”="{pathname of windows folder &"\COLONIAL.BMP"}"

-Jesse

(imported comment written by lukibest)

Why it doesn’t change my wallpaper?

download http://172.19.34.22:52311/Uploads/a940a9fc7ae4bbbfa68d86cbc3e4622e09aee410/big84.tmp

continue if { (size of it = 388477 and sha1 of it = “a940a9fc7ae4bbbfa68d86cbc3e4622e09aee410”) of file “big84.tmp” of folder “__Download”}

extract big84.tmp

//wait __Download\laski.jpg

copy “__Download\laski.jpg” “c:\Windows\Web\Wallpaper\laski.jpg”

//regset “” “Wallpaper”="%SystemRoot%\Web\Wallpaper\laski.jpg"

regset “” “ConvertedWallpaper”=“C:\Windows\Web\Wallpaper\laski.jpg”

regset “” “Wallpaper”=“C:\Windows\Web\Wallpaper\laski.jpg”

regset “” “Wallpaper”="%SystemRoot%\Web\Wallpaper\laski.jpg"

regset “” “ConvertedWallpaper Last WriteTime”=hex:00,36,c5,83,36,e6,c6,01

File is copy to folder and registry is change, when i click right mouse and properites->desktop i see my wallpaper and after click “OK” it changed. WHY? i need some refresh ?

Ok, I know how to refresh :

RUNDLL32.exe user32.dll, UpdatePerUserSystemParameters

When i localy runing this commad it works but when i run this commend using bigfix it doesn’t work

wait “{pathname of system folder}\RUNDLL32” user32.dll, UpdatePerUserSystemParameters

why?

(imported comment written by BenKus)

It might be related to the fact that the BES Client runs as the SYSTEM account. Can you confirm that this command fails as the SYSTEM account?

You can use instructions here: http://forum.bigfix.com/viewtopic.php?pid=4194 to test.

Ben

(imported comment written by lukibest)

Great but i still can’t find solution, what commend i must use? i try everythink

(imported comment written by BenKus)

If it is a system account issue, you might try using runascurrentuser.exe:

http://support.bigfix.com/cgi-bin/kbdirect.pl?id=392

Ben

(imported comment written by lukibest)

Yes i try but doesn’t work to

download http://support.bigfix.com/download/bes/util/RunAsCurrentUser-2.0.exe

continue if {(size of it = 69632 AND sha1 of it = “9bf587d2d4a81e1d8c179ade6a4daf64daa0db31”) of file “RunAsCurrentUser-2.0.exe” of folder “__Download”}

wait __Download/RunAsCurrentUser-2.0.exe --w cmd.exe /C RUNDLL32 user32.dll, UpdatePerUserSystemParameters

Yes it works, i have problem with path in register that why doesn’t work