1

My .reg:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\cultest]
@="URL:cultest Protocol"
"URL Protocol"=""

[HKEY_CLASSES_ROOT\cultest\DefaultIcon]
@="%APPDATA%\\musicDownloader\\test.bat,0"

[HKEY_CLASSES_ROOT\cultest\shell]

[HKEY_CLASSES_ROOT\cultest\shell\open]

[HKEY_CLASSES_ROOT\cultest\shell\open\command]
@="%APPDATA%\\musicDownloader\\test.bat \"%1\""

Using cultest://something doesn't work. But IF I replaced %APPDATA% with static path It worked.

sepp2k
  • 363,768
  • 54
  • 674
  • 675
Yas
  • 351
  • 2
  • 17

1 Answers1

2

I found a solution:

Just use REG_EXPAND_SZ instead of REG_SZ when you want to embed environment variables in the registry key value.

Using windows environment variables as registry values in Visual Studio Installer

Community
  • 1
  • 1
Yas
  • 351
  • 2
  • 17