views:

69

answers:

3

I have a VS Web setup project.

I want to register the physical path of the application.

In the setup project, I created a new key in HKLM, named Software, then I created a new key named "MyCompany", then in the mycompany key, I add the key Installation Folder with value [TARGETDIR].

But when I try my installer, and go to regedit after successful installation, the registry-key is not there. Am I missing something?

+1  A: 

I got the answer myself:
if Wow64 then
HKEY_LOCAL_MACHINE\SOFTWARE\ = HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\
else
HKEY_LOCAL_MACHINE\SOFTWARE\ = HKEY_LOCAL_MACHINE\SOFTWARE\

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\YourCompany]
"Installation Folder"="C:\inetpub\wwwroot\UsersInstallFolder\"

Quandary
A: 

WHERE SHOULD I WRITE THIS CODE

SWATI
You don't have to write this code. MS does it for you (without telling you).<br>It will read the key just fine, just if you check with regedit, you won't see it in HKLM\software, but in HKLM\software\wow6432node...<br>You register registry keys in the setup project.
Quandary
A: 

my code works for foledrs and not for image files or text files .what should i do????????????

SWATI