[ros-diffs] [dreimer] 27653: Forget thoese gotos

dreimer at svn.reactos.org dreimer at svn.reactos.org
Sat Jul 14 15:03:41 CEST 2007


Author: dreimer
Date: Sat Jul 14 17:03:40 2007
New Revision: 27653

URL: http://svn.reactos.org/svn/reactos?rev=27653&view=rev
Log:
Forget thoese gotos

Modified:
    trunk/tools/RosBE-Windows/RosBE.nsi

Modified: trunk/tools/RosBE-Windows/RosBE.nsi
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Windows/RosBE.nsi?rev=27653&r1=27652&r2=27653&view=diff
==============================================================================
--- trunk/tools/RosBE-Windows/RosBE.nsi (original)
+++ trunk/tools/RosBE-Windows/RosBE.nsi Sat Jul 14 17:03:40 2007
@@ -227,53 +227,42 @@
                "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" \
                "DisplayVersion"
     ${If} $R1 == "${PRODUCT_VERSION}"
-        goto SameVersion
+        messageBox MB_OK|MB_ICONEXCLAMATION \
+            "You already have the ${PRODUCT_NAME} v${PRODUCT_VERSION} installed. Please manually uninstall the ${PRODUCT_NAME} v${PRODUCT_VERSION} if you want to reinstall."
+        Quit
     ${EndIf}
     ${If} $R0 == ""
-        goto NoPreviousVersion
+        Return
     ${EndIf}
     MessageBox MB_YESNO|MB_ICONQUESTION  \
                "A previous version of the ${PRODUCT_NAME} was found. You must uninstall it before installing this version.$\n$\nDo you want to do that now?" \
                IDNO UninstallPrevious_no \
                IDYES UninstallPrevious_yes
     Abort
-    SameVersion:
-        messageBox MB_OK|MB_ICONEXCLAMATION \
-                   "You already have the ${PRODUCT_NAME} v${PRODUCT_VERSION} installed. Please manually uninstall the ${PRODUCT_NAME} v${PRODUCT_VERSION} if you want to reinstall."
-        Quit
     UninstallPrevious_no:
         Quit
     UninstallPrevious_yes:
         ExecWait '$R0 _?=$INSTDIR'
-    NoPreviousVersion:
 FunctionEnd
 
 Function CheckAdminOrCurrent
     userInfo::getAccountType
     pop $R0
     ${If} $R0 == "Admin"
-        goto IsAdmin
+        Return
     ${else}
-        goto IsNotAdmin
-    ${EndIf}
-    IsAdmin:
-        Return
-    IsNotAdmin:
         messageBox MB_OK|MB_ICONEXCLAMATION \
-                   "You do not have administrative privileges. Installing on NonAdmin Account is working now, but it's not tested well yet. NO Vista Support possible!"
-        Return
+            "You do not have administrative privileges. Installing on NonAdmin Account is working now, but it's not tested well yet. NO Vista Support possible!"
+        Return
+    ${EndIf}
 FunctionEnd
 
 Function un.CheckAdminOrCurrent
     userInfo::getAccountType
     pop $R0
     ${If} $R0 == "Admin"
-        goto IsAdmin
+        Return
     ${else}
-        goto IsNotAdmin
-    ${EndIf}
-    IsAdmin:
-        Return
-    IsNotAdmin:
-        Return
-FunctionEnd
+        Return
+    ${EndIf}
+FunctionEnd




More information about the Ros-diffs mailing list