[vlc-commits] [Git][videolan/vlc][3.0.x] package/win32: always use $INSTDIR with double quotes

Steve Lhomme (@robUx4) gitlab at videolan.org
Mon Nov 23 07:34:41 UTC 2026



Steve Lhomme pushed to branch 3.0.x at VideoLAN / VLC


Commits:
ae82d8c6 by Steve Lhomme at 2026-11-20T06:14:43+01:00
package/win32: always use $INSTDIR with double quotes

The install path may contain spaces.

Fixes #30428

Reported-by: Eliezer Binyam (XBrutalPandaX)
(cherry picked from commit 2e9a78d148dd0439990d5d85205ae65866afdad4)
Signed-off-by: Steve Lhomme <robux4 at ycbcr.xyz>

- - - - -


2 changed files:

- extras/package/win32/NSIS/helpers/utils.nsh
- extras/package/win32/NSIS/vlc.win32.nsi.in


Changes:

=====================================
extras/package/win32/NSIS/helpers/utils.nsh
=====================================
@@ -33,7 +33,7 @@ Function AppExecAs
   ${If} ${AtLeastWinVista}
     Exec '"$WINDIR\explorer.exe" "$INSTDIR\vlc.exe"'
   ${Else}
-    Exec '$INSTDIR\vlc.exe'
+    Exec '"$INSTDIR\vlc.exe"'
   ${Endif}
 FunctionEnd
 


=====================================
extras/package/win32/NSIS/vlc.win32.nsi.in
=====================================
@@ -323,7 +323,7 @@ skip_uninstall32_cleanup:
 @BUILD_LUA_TRUE@     !insertmacro InstallFolder lua
 
   ; Generate the cache and add it to uninstall.log
-  nsExec::ExecToStack '"$INSTDIR\vlc-cache-gen.exe" $INSTDIR\plugins'
+  nsExec::ExecToStack '"$INSTDIR\vlc-cache-gen.exe" "$INSTDIR\plugins"'
   FindFirst $0 $1 "$INSTDIR\plugins\*.dat"
   FileWrite $UninstallLog "plugins\$1$\r$\n"
   FindClose $0
@@ -570,9 +570,9 @@ ${Else}
     Goto WinTooOld
 ${Endif}
 
-ReadRegStr $INSTDIR HKLM "${PRODUCT_DIR_REGKEY}" "InstallDir"
-StrCmp $INSTDIR "" 0 WinOk
-StrCpy $INSTDIR "$@PROGRAMFILES@\VideoLAN\VLC"
+ReadRegStr "$INSTDIR" HKLM "${PRODUCT_DIR_REGKEY}" "InstallDir"
+StrCmp "$INSTDIR" "" 0 WinOk
+StrCpy "$INSTDIR" "$@PROGRAMFILES@\VideoLAN\VLC"
 Goto WinOk
 
 WinTooOld:
@@ -730,7 +730,7 @@ Function RunUninstaller
 
   IfFileExists "$INSTDIR\uninstall.exe" 0 no_remove_uninstaller
     Delete "$R1"
-    RMDir $INSTDIR
+    RMDir "$INSTDIR"
 
   no_remove_uninstaller:
 FunctionEnd
@@ -777,7 +777,7 @@ FunctionEnd
 ;; End function
 Section -Post
   WriteUninstaller "$INSTDIR\uninstall.exe"
-  WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "InstallDir" $INSTDIR
+  WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "InstallDir" "$INSTDIR"
   WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "Version" "${VERSION}"
   WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\vlc.exe"
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/ae82d8c65f1f3bb8196e206b258b8c441a21ab57

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/ae82d8c65f1f3bb8196e206b258b8c441a21ab57
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help




More information about the vlc-commits mailing list