[MERGE] forward port of branch 7.0 up to revid 5270 chs@openerp.com-20140403084524...
[odoo/odoo.git] / setup.nsi
index 87a6202..859ebdb 100644 (file)
--- a/setup.nsi
+++ b/setup.nsi
@@ -21,7 +21,7 @@
 #\r
 # You should have received a copy of the GNU General Public License\r
 # along with this program; if not, write to the Free Software\r
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\r
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\r
 #####################################################################################\r
 \r
 !include 'MUI2.nsh'\r
@@ -160,7 +160,7 @@ LangString DESC_PostgreSQL_Username ${LANG_FRENCH} "Utilisateur"
 LangString DESC_PostgreSQL_Password ${LANG_FRENCH} "Mot de passe"\r
 \r
 Section -StopService\r
-    nsExec::Exec "net stop openerp-server-6.1"\r
+    nsExec::Exec "net stop openerp-server-7.0"\r
     sleep 2\r
 SectionEnd\r
 \r
@@ -202,7 +202,7 @@ Section OpenERP_Server SectionOpenERP_Server
 SectionEnd\r
 \r
 Section -RestartServer\r
-    nsExec::Exec "net start openerp-server-6.1"\r
+    nsExec::Exec "net start openerp-server-7.0"\r
     sleep 2\r
 SectionEnd\r
 \r
@@ -226,7 +226,7 @@ SectionEnd
 \r
 Section "Uninstall"\r
     ; Stop the NT Service\r
-    nsExec::Exec "net stop openerp-server-6.1"\r
+    nsExec::Exec "net stop openerp-server-7.0"\r
     sleep 2\r
 \r
     ; Uninstall the OpenERP Service\r
@@ -291,9 +291,10 @@ Function .onInit
     !insertmacro MUI_LANGDLL_DISPLAY\r
 \r
     ClearErrors\r
-    EnumRegKey $0 HKLM "SOFTWARE\PostgreSQL" 0\r
+    EnumRegKey $0 HKLM "SOFTWARE\PostgreSQL\Installations" 0\r
     IfErrors DoInstallPostgreSQL 0\r
-        StrCpy $HasPostgreSQL 1\r
+    StrCmp $0 "" DoInstallPostgreSQL\r
+    StrCpy $HasPostgreSQL 1\r
 \r
     DoInstallPostgreSQL:\r
 FunctionEnd\r