This is an old revision of the document!


Dynamics Navision 2009 Client

Das Skript scheint doch noch fehlerbehaftet zu sein. Arbeite daran. Ggf. erfordert die Install Adminrechte.

Versions
By Matteo Cristofaro 2012/10/19 21:33

Tested with opsi 4.0.1.36
requiredWinstVersion >= 4.10.8.6 By Matteo Cristofaro 2012/10/19 21:33

Das Setup-File wird im ScriptPath in einem Unterverzeichnis “setup” abgelegt, also “CLIENT_DATA\setup\Nav2009R2…”

Das Verzeichnis Nav2009R2 entspricht der DVD; in diesem Verzeichnis befinden sich die erforderlichen Setup-Dateien.

Um die Automatisierung zu ermöglichen, muss vorab eine Konfigurations-/Antwortdatei erstellt werden. Hierzu muss teilweise das Setup des Client einmal durchlaufen werden

1. „Setup.exe“ ausführen 2. „weiter“ klicken und “Ich akzeptiere“ klicken 3. „Wählen Sie die Installationsoption“ und „Benutzerdefinierte Komponenten“ 4. Wählen Sie die Clients aus (RTC oder Classic) und geben Sie den Zieldordner an 5. Beim RTC den DB-Server-Parameter, also den Servernamen und den Port vorgeben 6. Und „Speichern der Konfiguration“ und Xml-Datei abspeichern

Die Konfig-dAtei heißt bei mir: dynamics_navision_2009_clientconfig.xml

Tree:
delsub32.ins
navision2009.jpeg
setup\Nav2009R2\…
setup\dynamics_navision_2009_clientconfig.xml
setup32.ins
uninstall32.ins

setup32.ins

[Actions]
requiredWinstVersion >= "4.10.8.6"
 
DefVar $UninstallProgram32$
DefVar $LogDir$
DefVar $ProductId$  
DefVar $MinimumSpace$
DefVar $InstallDir32$
DefVar $Setupfile$
DefVar $Logo$
DefVar $ExitCode$
DefVar $INST_SystemType$
DefVar $INST_architecture$
 
Set $INST_SystemType$ = GetSystemType
set $INST_architecture$ = GetProductProperty("install_architecture","system specific")
 
Set $LogDir$ 			= "%SystemDrive%\tmp"
Set $ProductId$       	= "microsoft-nav-2009-client"
Set $MinimumSpace$    	= "200 MB"
Set $InstallDir32$      = "%ProgramFiles32Dir%\Microsoft Dynamics NAV"
Set $Setupfile$			= "setup.exe"
Set $Logo$				= "navision2009.jpeg"
; ----------------------------------------------------------------
 
if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$))
	LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$
	isFatalError
	; Stop process and set installation status to failed
else
	comment "Show product picture"
	ShowBitmap "%ScriptPath%\" + $Logo$ $ProductId$
 
	if FileExists("%ScriptPath%\_delsub32.ins")
		comment "Start uninstall sub section"
		Sub "%ScriptPath%\delsub32.ins"
	endif
 
 
	comment "installing"
 
	if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only")
		Message "Installing " + $ProductId$ + " 32 Bit..."
 
		Message "Installiere jetzt Dynamics Navision 2009 Client..."
		Winbatch_install_32
		Sub_check_exitcode		
	endif
	ExitWindows /Reboot
endif
 
 
[Winbatch_install_32]
%ScriptPath%\setup\Nav2009R2\$Setupfile$ /quiet /config %ScriptPath%\setup\dynamics_navision_2009_clientconfig.xml
;/log '$InstallDir32$'
 
 
 
[Sub_check_exitcode]
comment "Test for installation success via exit code"
set $ExitCode$ = getLastExitCode
; informations to exit codes see
; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx
; http://msdn.microsoft.com/en-us/library/aa368542.aspx
if ($ExitCode$ = "0")
	comment "Looks good: setup program gives exitcode zero"
else
	comment "Setup program gives a exitcode unequal zero: " + $ExitCode$
	if ($ExitCode$ = "1605")
		comment "ERROR_UNKNOWN_PRODUCT	1605	This action is only valid for products that are currently installed."
		comment "Uninstall of a not installed product failed - no problem"
	else
		if ($ExitCode$ = "1641")
			comment "looks good: setup program gives exitcode 1641"
			comment "ERROR_SUCCESS_REBOOT_INITIATED	1641	The installer has initiated a restart. This message is indicative of a success."
		else
			if ($ExitCode$ = "3010")
				comment "looks good: setup program gives exitcode 3010"
				comment "ERROR_SUCCESS_REBOOT_REQUIRED	3010	A restart is required to complete the install. This message is indicative of a success."
			else
				logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$
				isFatalError
			endif
		endif
	endif
endif

delsub32.ins

Set $UninstallProgram32$ = "%ScriptPath%\setup\Nav2009R2\" + $Setupfile$
 
if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only")
	Message "Uninstalling " + $ProductId$ + " 32 Bit..."
 
	if FileExists($UninstallProgram32$)
		comment "Uninstall program found, starting uninstall"
		Winbatch_uninstall_32
		sub_check_exitcode
	endif
endif
 
[Winbatch_uninstall_32]
"$UninstallProgram32$" /quiet /uninstall
 
 
[Sub_check_exitcode]
comment "Test for installation success via exit code"
set $ExitCode$ = getLastExitCode
; informations to exit codes see
; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx
; http://msdn.microsoft.com/en-us/library/aa368542.aspx
if ($ExitCode$ = "0")
	comment "Looks good: setup program gives exitcode zero"
else
	comment "Setup program gives a exitcode unequal zero: " + $ExitCode$
	if ($ExitCode$ = "1605")
		comment "ERROR_UNKNOWN_PRODUCT	1605	This action is only valid for products that are currently installed."
		comment "Uninstall of a not installed product failed - no problem"
	else
		if ($ExitCode$ = "1641")
			comment "looks good: setup program gives exitcode 1641"
			comment "ERROR_SUCCESS_REBOOT_INITIATED	1641	The installer has initiated a restart. This message is indicative of a success."
		else
			if ($ExitCode$ = "3010")
				comment "looks good: setup program gives exitcode 3010"
				comment "ERROR_SUCCESS_REBOOT_REQUIRED	3010	A restart is required to complete the install. This message is indicative of a success."
			else
				logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$
				isFatalError
			endif
		endif
	endif
endif

uninstall32.ins

[Actions]
requiredWinstVersion >= "4.10.8.6"
 
DefVar $UninstallProgram32$
DefVar $LogDir$
DefVar $ExitCode$
DefVar $ProductId$
DefVar $InstallDir32$
DefVar $Setupfile$
DefVar $Logo$
DefVar $INST_SystemType$
DefVar $INST_architecture$
 
Set $INST_SystemType$ = GetSystemType
set $INST_architecture$ = GetProductProperty("install_architecture","system specific")
 
Set $LogDir$ 			= "%SystemDrive%\tmp"
Set $ProductId$      	= "microsoft-nav-2009-client"
Set $InstallDir32$    	= "%ProgramFiles32Dir%\Microsoft Dynamics NAV"
Set $Setupfile$			= "setup.exe"
Set $Logo$				= "navision2009.jpeg"
; ----------------------------------------------------------------
 
comment "Show product picture"
ShowBitmap "%ScriptPath%\" + $Logo$ $ProductId$
 
Message "Uninstalling " + $ProductId$ + " ..."
 
if FileExists("%ScriptPath%\delsub32.ins")
	comment "Start uninstall sub section"
	Sub "%ScriptPath%\delsub32.ins"
endif
ExitWindows /Reboot

QR Code
QR Code userspace:dynamics_navision_2009_client (generated for current page)