PDA

View Full Version : I can't edit the ConvertedWallpaper value in the registry!



Goldenclaw
07-18-2006, 12:44 AM
I made the following .reg file:


Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Control Panel\Desktop]
"ConvertedWallpaper"="C:\Documents and Settings\User\My Documents\My Pictures\cool* copy.jpg"

Despite a "this has been written successfully to the registry" box popping up, this will not work. It seems that for some reason the "ConvertedWallpaper" value cannot be edited by a .reg or by a .bat file. The only way I could figure out how to change it was to manually modify it using regedit, which is useless.

Can anyone help me figure out how this value can be edited? It's strange because I can make another value and edit other things in the exact same folder. For some reason I can't touch "ConvertedWallpaper", though.

I'm using XP Home Edition SP2.

SyntaXmasteR
07-18-2006, 08:18 PM
Couple things to try in order to eliminate each potential problem:

*. Try to name your file without spaces.
2. I've read something about paths in a .reg need to have double \\ - Try that also.

So first try this:


REGEDIT4
[HKEY_CURRENT_USER\Control Panel\Desktop]
"ConvertedWallpaper"="C:\\Documents and Settings\\User\\My Documents\\My Pictures\\cool*copy.jpg"


Then try this:


REGEDIT4
[HKEY_CURRENT_USER\Control Panel\Desktop]
"ConvertedWallpaper"="C:\Documents and Settings\User\My Documents\My Pictures\cool*copy.jpg"

123456
07-18-2006, 08:21 PM
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Control Panel\Desktop]
"Wallpaper"="C:\Documents and Settings\User\My Documents\My Pictures\cool* copy.jpg"

Syntax****** is wrong on this occasion I think, try the above.

123456
07-18-2006, 08:22 PM
You also need to reboot after editing the registry value for it take effect. The reason why Syntax****** was wrong is because the filepath is inside " " so that will be enough. The location of the registry you tried to edit is also NOT the correct location, pay particular attention to the location I gave

SyntaXmasteR
07-18-2006, 08:34 PM
*2*456

You do not get the point. Reread the post. The KEY wasnt CREATED. This means something was wrong in the code. And you do not need to reboot before a registry key is change. This is false. Once a registry key has been created or change you can view it in the current session. To activate the key sometimes a reboot is needed.

123456
07-18-2006, 08:37 PM
Point taken.

But, either way altering that registry value will not work, trust me :D That value will not affect the wallpaper.

SyntaXmasteR
07-18-2006, 08:39 PM
He did not say he was having trouble altering his wallpaper. He said he could not get the value "ConvertedWallpaper" to change with the registry file he created.

Actually I just tested this code on my computer for you:


REGEDIT4
[HKEY_CURRENT_USER\Control Panel\Desktop]
"ConvertedWallpaper"="C:\\Documents and Settings\\User\\My Documents\\My Pictures\\cool*copy.jpg"


It adds the value to the registry and points it to the correct location. So your problem was with the doulbe \\ in the path.

123456
07-18-2006, 08:53 PM
Hmmm, do you not need a space between REGEDIT4 and the rest i.e.

REGEDIT4

[HKEY_CURRENT_USER\Control Panel\Desktop]
"ConvertedWallpaper"="C:\\Documents and Settings\\User\\My Documents\\My Pictures\\cool*copy.jpg"

SyntaXmasteR
07-19-2006, 10:41 AM
A space or a hard return? You do need * hard return after just like in the code I posted.

Ezekiel
07-19-2006, 12:54 PM
To some posts further up the page:

'\\' is an escape sequence for the character '\'. Escape sequences are used to specify characters that perhaps can't be expressed with a key***rd, binary and hexadecimal numbers, or characters are already used for something else.

For example, when I was coding some windows c++ programs, I couldn't use the character '\' to specify file locations, because the backslash character is already used to give escape codes, like '\n' for newline, '\r' for carriage return, and so on. If I used '\' alone, the compiler would think I wanted to specify an escape sequence, and would not accept it as the actual character '\'. Thus, in c++ you have to use '\\' for the character '\', as it is the escape sequence for that character.

I don't know if windows uses anything like the same system for escape codes, but if you see a '\\', it is most likely expressing the character '\' in escape sequence form. It means exactly the same thing.