- NSIS Discussion
- can't write in the registry
Archive: can't write in the registry
slickgoonie
15th May 2007 19:46 UTC
can't write in the registry
Hi:
For some reason I'm not being able to write in the registry, any ideas? here is the call:
WriteRegStr HKCR "CLSID\{1339B54C-3453-11D2-93B9-000000000000}\Implemented Categories\" "" ""
It never gets to write "Implemented Categories" for some reason I can't write on the CLSID entry, because, if I change CLSID for something else, it does create the entry. Is this a permission problem? how can i get around?
Thanks.
goldy1064
15th May 2007 20:27 UTC
Is your installer running as an Administrator?
...
RequestExecutionLevel admin
...
Afrow UK
15th May 2007 20:34 UTC
...assuming the machine is running Windows Vista.
Stu
slickgoonie
15th May 2007 22:23 UTC
No windows vista. Just XP. Yeah, I think I'm running as admin.
slickgoonie
16th May 2007 23:35 UTC
So I made sure that I put that line of code for being executed as admin, but still no luck. I also tried this:
Since my installer is silent, once its done copying all the files, I would call to execute a .reg file that would put thos e entries in the registry. but no luck either. Any ideas?
thanks.
slickgoonie
17th May 2007 00:32 UTC
Nevermind, executing the reg file works. Still ask for user interaction and I can't do that, my installer has to be silent.
demiller9
17th May 2007 03:31 UTC
Did you add the "/s" switch when you run the reg file? it won't have any interaction (on XP) if you do that.
slickgoonie
18th May 2007 00:30 UTC
this is what i have on that line:
ExecShell "/s" "open" "$INSTDIR\mozactivex.reg"
as soon as I include the /s it won't run the reg file.
Red Wine
18th May 2007 00:38 UTC
Inappropriate usage of ExecShell,
http://nsis.sourceforge.net/Docs/Chapter4.html#4.9.1.3
slickgoonie
22nd May 2007 00:05 UTC
I tried ExecShell "open" /s "$INSTDIR\mozactivex.reg" but it won't write it. any ideas?
Red Wine
22nd May 2007 05:18 UTC
Exec 'regedit.exe /s "$INSTDIR\mozactivex.reg"'