Help - Search - Members - Calendar
Full Version: using %systemroot% in the registry..
MSFN Forums > Unattended Windows Discussion & Support > Application Installs

   
Google Internet Forums Unattended CD/DVD Guide
evilkwan
i dont no how to explain but..

i wanna register a file using the %SYSTEMROOT% way.. but instead of showing %SYSTEMROOT% in the registry value i want it to locate the real directory instead..

everyone is lost? lol i dont even noe wat im saying myself..

ummm...

the bsplay.REG file look like this..
CODE
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\BST\BSplayer]
"skin"=""
"AutoPlay"=dword:00000001
"AppPath"="%systemroot%\\bsplayer\\bsplay.exe"

registry view...


if anyone get what im trying to say and knows how to do it, can you please tell me.
thnx..
Jainoxi
QUOTE (evilkwan @ May 19 2004, 01:04 AM)
i dont no how to explain but..

i wanna register a file using the %SYSTEMROOT% way.. but instead of showing %SYSTEMROOT% in the registry value i want it to locate the real directory instead..

everyone is lost? lol i dont even noe wat im saying myself..

ummm...

the bsplay.REG file look like this..
CODE
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\BST\BSplayer]
"skin"=""
"AutoPlay"=dword:00000001
"AppPath"="%systemroot%\\bsplayer\\bsplay.exe"

registry view...


if anyone get what im trying to say and knows how to do it, can you please tell me.
thnx..

I believe you should use %%systemroot%% instead of %systemroot%...
Bâshrat the Sneaky
It's not possible to use variables in the registry..
maxXPsoft
Yes you can but it has to be REG_EXPAND_SZ

CODE
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\*\shell\ResHack]

[HKEY_CLASSES_ROOT\*\shell\ResHack\command]
@=hex(2):25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,00,6f,00,74,00,25,\
 00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,52,00,65,00,\
 73,00,48,00,61,00,63,00,6b,00,65,00,72,00,2e,00,65,00,78,00,65,00,20,00,25,\
 00,31,00,00,00


My command says %systemroot%\System32\ResHacker.exe %1
That gives me right click ResHacker
evilkwan
QUOTE (maxXPsoft @ May 19 2004, 03:47 PM)
My command says %systemroot%\System32\ResHacker.exe %1
That gives me right click ResHacker


Why is there a %1 at the end for? wat does that do?

thumbup.gif
jrzycrim
That's a variable which resolves to the name of the particular file you are opening.
Google Internet Forums Unattended CD/DVD Guide
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.