View Single Post
Old 17th April 2018, 12:05   #4
Gluck
Senior Member
 
Join Date: Apr 2018
Posts: 103
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
Gluck is offline   Reply With Quote