MD-Desktop-Client für Windows über OPSI verteilen

Hallo,

ich würde bei uns in der Firma den MD-Desktop-Client für Windows gerne mit OPSI verteilen. Wenn ich das Installierte Softwarpaket aus %localappdata%\MobyDickClient\ benutze und die etc\md_client.conf anpasse, wird der Client aber nicht gestartet. hat das schon wer erfolgreich geschafft? muss ich noch irgendwo einen schalter setzen den ich vergessen habe? habe ich murks in meiner config? die md_client.conf sowie das messages.log habe ich angehängt. meine javakenntnisse sind im besten fall dürftig. ich hasse kaffee…


-------------------------------------------------------------------------------
>Log Session: Friday, July 3, 2015 9:36:57 AM CEST
>System Info: 
  Product Version         = mobydick Client 201310111528
  Operating System        = Windows 8 version 6.2 running on x86
  Java; VM; Vendor        = 1.8.0_45; Java HotSpot(TM) Client VM 25.45-b02; Oracle Corporation
  Runtime                 = Java(TM) SE Runtime Environment 1.8.0_45-b14
  Java Home               = C:\Users\xxx\AppData\Local\MobyDickClient\jre
  System Locale; Encoding = de_DE (md_client); Cp1252
  Home Directory          = C:\Users\xxx
  Current Directory       = C:\Users\xxx\AppData\Local\MobyDickClient
  User Directory          = C:\Users\xxx\AppData\Roaming\MobyDickClient
  Cache Directory         = C:\Users\xxx\AppData\Roaming\MobyDickClient\var\cache
  Installation            = C:\Users\xxx\AppData\Local\MobyDickClient\platform
                            C:\Users\xxx\AppData\Local\MobyDickClient\md_client
                            C:\Users\xxx\AppData\Local\MobyDickClient\platform
  Boot & Ext. Classpath   = C:\Users\xxx\AppData\Local\MobyDickClient\jre\lib\resources.jar;C:\Users\xxx\AppData\Local\MobyDickClient\jre\lib\rt.jar;C:\Users\xxx\AppData\Local\MobyDickClient\jre\lib\sunrsasign.jar;C:\Users\xxx\AppData\Local\MobyDickClient\jre\lib\jsse.jar;C:\Users\xxx\AppData\Local\MobyDickClient\jre\lib\jce.jar;C:\Users\xxx\AppData\Local\MobyDickClient\jre\lib\charsets.jar;C:\Users\xxx\AppData\Local\MobyDickClient\jre\lib\jfr.jar;C:\Users\xxx\AppData\Local\MobyDickClient\jre\classes;C:\Users\xxx\AppData\Local\MobyDickClient\jre\lib\ext\access-bridge-32.jar;C:\Users\xxx\AppData\Local\MobyDickClient\jre\lib\ext\access-bridge.jar;C:\Users\xxx\AppData\Local\MobyDickClient\jre\lib\ext\cldrdata.jar;C:\Users\xxx\AppData\Local\MobyDickClient\jre\lib\ext\dnsns.jar;C:\Users\xxx\AppData\Local\MobyDickClient\jre\lib\ext\jaccess.jar;C:\Users\xxx\AppData\Local\MobyDickClient\jre\lib\ext\jfxrt.jar;C:\Users\xxx\AppData\Local\MobyDickClient\jre\lib\ext\localedata.jar;C:\Users\xxx\AppData\Local\MobyDickClient\jre\lib\ext
ashorn.jar;C:\Users\xxx\AppData\Local\MobyDickClient\jre\lib\ext\sunec.jar;C:\Users\xxx\AppData\Local\MobyDickClient\jre\lib\ext\sunjce_provider.jar;C:\Users\xxx\AppData\Local\MobyDickClient\jre\lib\ext\sunmscapi.jar;C:\Users\xxx\AppData\Local\MobyDickClient\jre\lib\ext\sunpkcs11.jar;C:\Users\xxx\AppData\Local\MobyDickClient\jre\lib\ext\zipfs.jar
  Application Classpath   = C:\Users\xxx\AppData\Local\MobyDickClient\platform\lib\boot.jar;C:\Users\xxx\AppData\Local\MobyDickClient\platform\lib\org-openide-modules.jar;C:\Users\xxx\AppData\Local\MobyDickClient\platform\lib\org-openide-util-lookup.jar;C:\Users\xxx\AppData\Local\MobyDickClient\platform\lib\org-openide-util.jar;C:\Users\xxx\AppData\Local\MobyDickClient\platform\lib\locale\boot_ja.jar;C:\Users\xxx\AppData\Local\MobyDickClient\platform\lib\locale\boot_pt_BR.jar;C:\Users\xxx\AppData\Local\MobyDickClient\platform\lib\locale\boot_ru.jar;C:\Users\xxx\AppData\Local\MobyDickClient\platform\lib\locale\boot_zh_CN.jar;C:\Users\xxx\AppData\Local\MobyDickClient\platform\lib\locale\org-openide-modules_ja.jar;C:\Users\xxx\AppData\Local\MobyDickClient\platform\lib\locale\org-openide-modules_pt_BR.jar;C:\Users\xxx\AppData\Local\MobyDickClient\platform\lib\locale\org-openide-modules_ru.jar;C:\Users\xxx\AppData\Local\MobyDickClient\platform\lib\locale\org-openide-modules_zh_CN.jar;C:\Users\xxx\AppData\Local\MobyDickClient\platform\lib\locale\org-openide-util-lookup_ja.jar;C:\Users\xxx\AppData\Local\MobyDickClient\platform\lib\locale\org-openide-util-lookup_pt_BR.jar;C:\Users\xxx\AppData\Local\MobyDickClient\platform\lib\locale\org-openide-util-lookup_ru.jar;C:\Users\xxx\AppData\Local\MobyDickClient\platform\lib\locale\org-openide-util-lookup_zh_CN.jar;C:\Users\xxx\AppData\Local\MobyDickClient\platform\lib\locale\org-openide-util_ja.jar;C:\Users\xxx\AppData\Local\MobyDickClient\platform\lib\locale\org-openide-util_pt_BR.jar;C:\Users\xxx\AppData\Local\MobyDickClient\platform\lib\locale\org-openide-util_ru.jar;C:\Users\xxx\AppData\Local\MobyDickClient\platform\lib\locale\org-openide-util_zh_CN.jar
  Startup Classpath       = C:\Users\xxx\AppData\Local\MobyDickClient\platform\core\core.jar;C:\Users\xxx\AppData\Local\MobyDickClient\platform\core\org-openide-filesystems.jar;C:\Users\xxx\AppData\Local\MobyDickClient\platform\core\locale\core_ja.jar;C:\Users\xxx\AppData\Local\MobyDickClient\platform\core\locale\core_pt_BR.jar;C:\Users\xxx\AppData\Local\MobyDickClient\platform\core\locale\core_ru.jar;C:\Users\xxx\AppData\Local\MobyDickClient\platform\core\locale\core_zh_CN.jar;C:\Users\xxx\AppData\Local\MobyDickClient\platform\core\locale\org-openide-filesystems_ja.jar;C:\Users\xxx\AppData\Local\MobyDickClient\platform\core\locale\org-openide-filesystems_pt_BR.jar;C:\Users\xxx\AppData\Local\MobyDickClient\platform\core\locale\org-openide-filesystems_ru.jar;C:\Users\xxx\AppData\Local\MobyDickClient\platform\core\locale\org-openide-filesystems_zh_CN.jar;C:\Users\xxx\AppData\Local\MobyDickClient\md_client\core\locale\core_md_client.jar
-------------------------------------------------------------------------------
INFO [org.netbeans.core.startup.NbEvents]: Turning on modules:
	org.openide.util.lookup [8.22.1 201310111528]
	org.openide.util [8.33.1 201310111528]
	org.openide.modules [7.39.1 201310111528]
	org.openide.filesystems [8.8.1 201310111528]
	org.netbeans.bootstrap/1 [2.63.1 201310111528]
	org.netbeans.core.startup/1 [1.51.1 201310111528]

md_client.conf


# ${HOME} will be replaced by user home directory according to platform
default_userdir="${HOME}/MobyDickClient"

# options used by the launcher by default, can be overridden by explicit
# command line switches
default_options="--branding md_client -J-Xms64m -J-Xmx160m -J-DembeddedJre=true -J-Djava.library.path='c:/Program Files (x86)/MobyDickClient/jre/bin' -J-DsoftphonePath='c:/Program Files (x86)/MobyDickClient/mdsoftphone/mdsoftphone.exe'"
# for development purposes you may wish to append: -J-Dnetbeans.logger.console=true -J-ea

# default location of JDK/JRE, can be overridden by using --jdkhome <dir> switch
jdkhome=jre

# clusters' paths separated by path.separator (semicolon on Windows, colon on Unices)
#extra_clusters=

Update: Client Version (noch): 3.04.01.R

gruß sven

Hallo Sven,

warum willst Du denn ein installiertes Paket nehmen. Du kannst doch mit OPSI einfache den Installer Installieren. Mache ich bei vielen Kunden und klappt eigentlich immer.

Gruß Markus

hallo markus,

Weil die Installdatei in das Homeverzeichnis des Users installiert und nicht systemweit. wenn es einen schalter gibt, der mir den client systemweit installiert und/oder das er systemweit (unter c:\program files (x86)) installiert wenn SYSTEM den install startet, dann soll mir das auch reichen.

gruß sven

Hallo Sven,

ja das geht mit MobyDickInstaller.exe /S /D=c:\MobyDickClient

Gruß Markus

hallo markus,

/D=<path to mobydick> geht leider nicht. er ignoriert den schalter und installiert trotzdem unter “%localappdata%\MobyDickClient”

Also keine Ahnung im OPSI noch nie probiert aber mit nem Batch Script geht das.

doch, der schalter funktioniert. nur darf das verzeichnis NICHT in anführungszeichen stehen. auch dann nicht, wenn der verzeichnisname ein leerzeichen enthält.
geht:


MobyDickClient-setup-3.05.00.R.exe /S /D=C:\Program Files (x86)\MobyDickClient2

geht nicht:


MobyDickClient-setup-3.05.00.R.exe /S /D="C:\Program Files (x86)\MobyDickClient2"

etwas gewöhnungsbedürftig. schön wäre auch eine möglichkeit, die autoupdate-erinnerung abzuschalten, wenn die software zentral verteilt wird.

Für die, die es Interessiert, habe ich hier mal meine OPSI-Scripte hinterlegt:
Installiert wird der MD-Client in %ProgramFiles(x86)%.
der uninstall wird nur über das löschen der gelöst, da der uninstaller 1. nicht silent ist (pascom bitte nacharbeiten!) und 2. auch die einstllungen des users auf jeden fall löscht. im derzeitigen stand der dinge, hinterläßt dieses OPSI-Script vermutlich noch einen rest in der registry. womit ich aber leben kann. habe es aber auch noch nicht kontrolliert, ob dieser rest bleibt.

Filestruktur:


CLIENT_DATA\
           +files\
           |      +MobyDickClient-setup-3.05.00.R.exe
           +delsub32.ins               
           +mobydickclient.png
           +setup32.ins
           +uninstall32.ins

delsub32.ins


Message "Uninstalling " + $ProductId$ + " ..."

killtask "md_client.exe"
killtask "mdsoftphone.exe"

Files_uninstall /32Bit

LinkFolder_uninstall

[Files_uninstall]
del -sf "$InstallDir$\"

[LinkFolder_uninstall]
set_basefolder common_startup
set_subfolder ""
delete_element $ProductId$

[Sub_check_exitcode]
comment "Test for installation success via exit code"
set $ExitCode$ = getLastExitCode
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

setup32.ins


[Actions]
requiredWinstVersion >= "4.11.2.6"

DefVar $UninstallProgram$
DefVar $LogDir$
DefVar $ProductId$  
DefVar $MinimumSpace$
DefVar $InstallDir$
DefVar $ExitCode$
DefVar $Version$

Set $LogDir$ = "%SystemDrive%	mp"
Set $ProductId$       = "MobyDickClient"
Set $MinimumSpace$    = "1 MB"
Set $Version$         = "3.05.00.R"
Set $InstallDir$      = "%ProgramFiles32Dir%\"+ $ProductId$

if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$))
	LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$
	isFatalError "No Space"
	; Stop process and set installation status to failed
else
	comment "Show product picture"
	ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$
	if FileExists("%ScriptPath%\delsub32.ins")
		comment "Start uninstall sub section"
		Sub "%ScriptPath%\delsub32.ins"
	endif
	Message "Installing " + $ProductId$ + " ..."
	comment "Start setup program"
	ChangeDirectory "%SCRIPTPATH%"
	Winbatch_install
	Sub_check_exitcode
	comment "Create shortcuts"
	LinkFolder_install
endif

[Winbatch_install]
"%ScriptPath%\files\MobyDickClient-setup-$Version$.exe" /S /D=$InstallDir$

[LinkFolder_install]
set_basefolder common_startup
set_link
	name: $ProductId$
	target: $InstallDir$\bin\md_client.exe
	parameters:
	working_dir: $InstallDir$\bin\
	icon_file: $InstallDir$\bin\client.ico
	icon_index:
end_link

[Sub_check_exitcode]
comment "Test for installation success via exit code"
set $ExitCode$ = getLastExitCode
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.11.2.6"

DefVar $LogDir$
DefVar $ExitCode$
DefVar $ProductId$
DefVar $InstallDir$

Set $LogDir$ = "%SystemDrive%	mp"
Set $ProductId$       = "MobyDickClient"
Set $InstallDir$      = "%ProgramFiles32Dir%\"+ $ProductId$

comment "Show product picture"
ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$

Message "Uninstalling " + $ProductId$ + " ..."

if FileExists("%ScriptPath%\delsub32.ins")
	comment "Start uninstall sub section"
	Sub "%ScriptPath%\delsub32.ins"
endif

Hallo,

also der MobyDick Client selber hinterlässt keine Reste in der Registry meines Wissens.
Das Deinstallieren ist meines Wissens wirklich nur das löschen des Programmordners
und den Einstellungen unter %username%\AppData\Roaming\MobyDickClient
und natürlich der Verknüpfung im Startmenü (ist ja nur Java) muss also nicht wirklich per Uninstaller gemacht werden.

Gruß Markus

der installer legt einen key namen “mobyDick Client” unter [HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall] an. wie das aussieht, wenn SYSTEM (der “opsi user”) die installation durchführt, weiss ich nicht. und es tangiert mich auch nicht wirklich :smiley:

@markus: das ist schon richtig. ABER: wenn ein uninstaller mitgeliefert wird, sollte dieser nach möglichkeit auch benutzt werden, da dieser, wenn er vernünftig gemacht wurde und kein cripple-/bad-/spy-/addware ist, auch wirklich alles entfernt aus dem system, das sein installer draufgepackt hat. und so kann es auch nicht passieren, das man vergisst, den startmenüeintrag zu entfernen. (wie ich es z.b. vergessen habe :rolleyes: muss ich bei gelegenheit mal wieder überarbeiten. jetzt sind aber erstmal noch andere dinge zu realisieren…)

Hallo,

Der Uninstaller funktioniert ja auch nur halt nicht Silent wie du sagst.
Habe ich bis jetzt noch nie probiert, da ich ganz ehrlich noch nie einen MobyDick Client per Script oder OPSI deinstalliert habe.
Das Update kann der User ja eh selber machen und deshalb ist das aus meiner Sicht im OPSI Paket auch nicht wichtig da ich das Update eh nicht über OPSI mache.
Oder halt ich lösche beim Update den einen Programmordner per OPSI und bügle das neue Paket wieder drauf.
Dann bleiben auch alle Einstellungen erhalten.

Ich glaube es geht auch das der Installer ohne deinstallation das neuen Paket Silent drüberinstalliert ist ja wie gesagt kein MSI was vorher deinstalliert werden muss sondern nur ein reines Kopieren was der Installer macht.

Gruß Markus

Hallo zusammen,

um mich hier kurz einzuschalten. Der Windows-Installer sollte, wenn er merkt das im Zielverzeichnis bereits ein MobydickClient installiert ist, das ganze einfach wie ein Update behandeln. Also insofern sollte ein vorheriger Uninstall unnötig sein.

Grüße,
Jan