|
![]() |
|
Thread Tools | Search this Thread | Display Modes |
![]() |
#1 |
Junior Member
Join Date: Apr 2018
Posts: 14
|
Registry operations
Always using NSIS as a portabilizer:
If I have a file.reg of this type: Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\...] [HKEY_USERS\S-1-5-21-...] [HKEY_CURRENT_USERS\...] Can I copy/remove/update in one shot different keys? What must I write? Thanks. |
![]() |
![]() |
![]() |
#2 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 4,697
|
The Registry plug-in on the wiki has some .reg file support IIRC and there might be a converter on the Wiki as well but NSIS itself does not support .reg files.
IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#3 |
Junior Member
Join Date: Apr 2018
Posts: 14
|
Sorry, what is IIRC?
I haven't understood the function o plugin and if is it loaded. In the NSIS console I can read: PLUG-INS Ad Splash ... Nsisdl Splash ... The registry.dll file is placed in Plugins folder... Is it loaded? How can I verify if it works correctly? About the converter: I have downloaded Reg2Nsis. It convert a .reg in a different sintax. (But I'll ask about it soon!). |
![]() |
![]() |
![]() |
#4 |
Junior Member
Join Date: Apr 2018
Posts: 14
|
Registry calls
I'm learning how to program NSIS for portabilization.
The only tutorial I have found is this: http://en.pafd.xyz/tutorial/portable...-tutorial.html I have downloaded the Audacity example (about registry) and I have read: In .nsi file: ; ************** ; === Includes === ; ************** !include "Registry.nsh" ... Function Init WriteRegDWORD HKEY_CURRENT_USER "Software\Audacity\Audacity" "WantAssociateFiles" 0x0 WriteRegStr HKEY_CURRENT_USER "Software\Audacity\Audacity\Directories" "TempDir" "$TEMP\${APP}PortableTemp\" WriteRegStr HKEY_CURRENT_USER "Software\Audacity\Audacity\MP3" "MP3LibPath" "$EXEDIR\App\LAME\lame_enc.dll" FunctionEnd And in Registry.nsh file: WriteRegDWORD HKEY_CURRENT_USER "Software\Audacity\Audacity" "WantAssociateFiles" 0x0 WriteRegStr HKEY_CURRENT_USER "Software\Audacity\Audacity\Directories" "TempDir" \ "C:\DOCUME~1\Admin\LOCALS~1\Temp\AudacityPortableTemp\" WriteRegStr HKEY_CURRENT_USER "Software\Audacity\Audacity\MP3" "MP3LibPath" \ "L:\PortableApps\AudacityPortable\App\LAME\lame_enc.dll" Are both converted with Reg2Nsis, but have different syntax... WHY??? thanks |
![]() |
![]() |
![]() |
#5 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 4,697
|
Are you talking about the \ ?
IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#6 |
Junior Member
Join Date: Apr 2018
Posts: 14
|
I'm refering about the .nsi file trace a relative path, while .nsh has the same path, but in absolute way...
What does it means? Why two? The second registry (.nsh) is important? Can I delete it? |
![]() |
![]() |
![]() |
#7 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 4,697
|
A file with $EXEDIR and other variables have probably not been converted or somebody changed "L:\PortableApps\AudacityPortable" to "$EXEDIR" by hand.
If you don't understand these simple concepts then you should not be writing portable applications IMHO. IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|