]> git.lyx.org Git - features.git/commitdiff
installer: set a safe guard
authorUwe Stöhr <uwestoehr@lyx.org>
Wed, 19 Feb 2014 00:14:20 +0000 (01:14 +0100)
committerUwe Stöhr <uwestoehr@lyx.org>
Wed, 19 Feb 2014 00:14:20 +0000 (01:14 +0100)
development/Win32/packaging/installer/setup/configure.nsh

index f8040ae9a9ae36b6abe8ec2492483d87268ba18e..42d6148afa5946e33a1402c7db667714a08e8924 100644 (file)
@@ -22,8 +22,10 @@ Section -InstallData
   
   # Start Menu shortcut
   SetOutPath "$INSTDIR\bin" # this is the folder in which the shortcut is executed
-  IfSilent 0 +2
-  StrCpy $StartmenuFolder "${APP_DIR}"
+  # we must assure that the folder is not empty (happens on silent install and can accidentally happen)
+  ${if} $StartmenuFolder == ""
+   StrCpy $StartmenuFolder "${APP_DIR}"
+  ${endif}
   CreateDirectory "$SMPROGRAMS\$StartmenuFolder"
   CreateShortCut "$SMPROGRAMS\$StartmenuFolder\${APP_NAME}.lnk" "$INSTDIR\${APP_RUN}" "" "$INSTDIR\${APP_RUN}" "" "" "" "${APP_INFO}"
   # Link to www.lyx.org and to the Wiki