Quantcast
Channel: Indigo Rose Software Forums - Forums
Viewing all articles
Browse latest Browse all 2105

Problem adding registry keys

$
0
0
I am having a problem adding registry keys. The following code is not doing the job...

Code:
Registry.CreateKey(HKEY_CLASSES_ROOT, "MyApp", "NoName", "MyApp", REG_SZ);
Registry.CreateKey(HKEY_CLASSES_ROOT, "MyApp", "DefaultIcon", SessionVar.Expand("%AppFolder%\\MyApp.exe,1"), REG_SZ);
Registry.CreateKey(HKEY_CLASSES_ROOT, "MyApp", "URL Protocol", "", REG_SZ);
Registry.CreateKey(HKEY_CLASSES_ROOT, "MyApp\\CurVer", "NoName", "34.3.0", REG_SZ);
Registry.CreateKey(HKEY_CLASSES_ROOT, "MyApp\\shell\\open\\command", "", SessionVar.Expand("%AppFolder%\\MyApp.exe \"%1\""), REG_SZ);​
​
Problem is that CurVer is blank, DefaultIcon is blank and the "command" value is blank. It needs to read like...
"C:\Program Files (x86)\MyApp\MyApp.exe" "%1"

Viewing all articles
Browse latest Browse all 2105

Trending Articles