Unable to read a regisgtry key
I'm new to using NSIS. I've written some Word 2010 templates and I want to write a script that will read the registry key to determine the location of the User's personal template folder, copy the new templates to this folder. I do not need an uninstaller, I do not need anything installed in Program files, no entries in the start menu, and no entries in the control panel. I've started by trying to read the registry key using the following code
# name testinstaller
outFile "testinstaller.exe"
!Define PerTempKey "Software\Microsoft\Office\14.0\Word\Security\Trusted Locations\Location0"
Var PerTempFolder
# default section start
section
readRegStr $PerTempFolder HKCU PerTempKey "Path"
messagebox MB_OK $PerTempFolder
sectionEnd
The registry key is not returned. I know the key has a value, because I can see it in regedit. Using HM NIS Edite 2.0.3, the code compiles but generates an execution error,
WIN32 Code 740. Requires elevation. I'm not sure what this means. I tried adding the command RequestExecutionLevel admin, but this did not resolve my problem.
Any help would be appreciated.
Gail