![]() |
#1 |
Member
Join Date: Nov 2009
Location: Mangalore-Karnataka-India
Posts: 87
|
Error while importing registry entries in NSIS
I am making the wrapper for my application through NSIS setup. In the wrapper I need to do some registry entries for my application. The entries will be in the registry path “HKLM\SOFTWARE\Wow6432Node\Microsoft” and “HKLM\SOFTWARE\ Microsoft”.
The problem is when I am importing the registry through the [ExecWait ”regedit.exe /s registry.reg”] command in the NSIS, the registry entry will not be added to the path “HKLM\SOFTWARE\ Microsoft”, only in other entry it will be added. And along with this in NSIS setup there will be a new entry in the path “HKLM\SOFTWARE\Wow6432Node\Wow6432Node \Microsoft” which is come from nowhere, because I did not include any registry entry mentioned like that in the registry file. I checked the registry file and there was no problem in it. I tried by directly running the registry file and also tried the same command directly in a bat file as well as CMD (regedit.exe /s registry.reg ). All are working fine. Only in NSIS it is not working. Any help would be great... Edit: Operating system: windows 7, 64 Bit NSIS version: 2.46 Last edited by winman2004; 2nd November 2016 at 09:49. Reason: updates |
![]() |
![]() |
![]() |
#2 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,356
|
You failed to mention that this is on a 64-bit OS! You failed to provide any version information at all in fact. Instead you wasted time by changing the font size of your post for no reason, forcing me to edit it.
Executing Regedit.exe from a 32-bit application like NSIS will run the 32-bit version of Regedit. Why can't you just use WriteRegStr and SetRegView? IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#3 |
Member
Join Date: Nov 2009
Location: Mangalore-Karnataka-India
Posts: 87
|
Updated the Operating system and nsis version details.
I am trying to create an application of x86, and i am not able identify the whether installed nsis is 32 or 64 bit. "Why can't you just use WriteRegStr and SetRegView?" --> i already have the reg file which contains more than 500 lines. I tried converting the registry for nsis format 'WriteRegStr' with the 'Reg2Nsis' converter but this converter is not working correctly for all the reg entries, it fails when the value of the key is as follows. reg file: code: Converted: code: For this error i droped the option of using WriteRegStr and SetRegView |
![]() |
![]() |
![]() |
#4 | |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,356
|
Fixing Reg2Nsis is the best solution.
You can also do: Quote:
Stackoverflow dupe IntOp $PostCount $PostCount + 1 |
|
![]() |
![]() |
![]() |
#5 |
Member
Join Date: Nov 2009
Location: Mangalore-Karnataka-India
Posts: 87
|
I don't know why "DisableX64FSRedirection" is not working as well as "RunningX64" also not working which is of x64.nsh.
Now the problem solved when i manually redirecting wherever required. |
![]() |
![]() |
![]() |
|
Tags |
regedit, registry, wow64 |
Thread Tools | Search this Thread |
Display Modes | |
|
|