Bug 716045 - "Run As" dialog appears after every Nightly install. r=rstrong
authorBrian R. Bondy <netzen@gmail.com>
Sun, 22 Jan 2012 16:07:58 -0500
changeset 85080 9a67d6f21b3de20f348562aa16d8193dd0aee239
parent 85079 10c3bb782afffebe365e5dc5800ccf40557bc1c2
child 85081 224d1d26ce18ffaadbea2552859ab48ba7a051b3
child 85082 5ad0ee32f855a7740cdbc0467c5c2452d6c44391
push id21896
push userphilringnalda@gmail.com
push dateMon, 23 Jan 2012 02:09:39 +0000
treeherdermozilla-central@ee922e0041e1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrstrong
bugs716045
milestone12.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 716045 - "Run As" dialog appears after every Nightly install. r=rstrong
browser/installer/windows/nsis/shared.nsh
--- a/browser/installer/windows/nsis/shared.nsh
+++ b/browser/installer/windows/nsis/shared.nsh
@@ -133,20 +133,22 @@
     ; the service (i.e. service is failing), updater.exe will do the update of 
     ; the service.  The reasons we do not do it here is because we don't want 
     ; to have to prompt for limited user accounts when the service isn't used 
     ; and we currently call the PostUpdate twice, once for the user and once
     ; for the SYSTEM account.  Also, this would stop the maintenance service
     ; and we need a return result back to the service when run that way.
     ${If} $5 == ""
       ; An install of maintenance service was never attempted.
-      ; We call ExecShell (which is ShellExecute) with the verb "runas"
-      ; to ask for elevation if the user isn't already elevated.  If the user 
-      ; is already elevated it will just launch the program.
-      ExecShell "runas" "$INSTDIR\maintenanceservice_installer.exe"
+      ; We know we are an Admin and that we have write access into HKLM
+      ; based on the above checks, so attempt to just run the EXE.
+      ; In the worst case, in case there is some edge case with the 
+      ; IsAdmin check and the permissions check, the maintenance service
+      ; will just fail to be attempted to be installed. 
+      nsExec::Exec "$INSTDIR\maintenanceservice_installer.exe" 
     ${EndIf}
   ${EndIf}
 !endif
 
 !macroend
 !define PostUpdate "!insertmacro PostUpdate"
 
 !macro SetAsDefaultAppGlobal