From: Uwe Stöhr Date: Wed, 19 Feb 2014 00:14:20 +0000 (+0100) Subject: installer: set a safe guard X-Git-Tag: 2.1.0rc1~187 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=0112a2f92282ae345f963f5b5eb1a69feb4ffafd;p=features.git installer: set a safe guard --- diff --git a/development/Win32/packaging/installer/setup/configure.nsh b/development/Win32/packaging/installer/setup/configure.nsh index f8040ae9a9..42d6148afa 100644 --- a/development/Win32/packaging/installer/setup/configure.nsh +++ b/development/Win32/packaging/installer/setup/configure.nsh @@ -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