Seite 1 von 2

DosBatch Installation schlägt Fehl

Verfasst: 06 Jun 2019, 12:06
von Starlord
Guten Tag,

ich habe ein Problem bei der Deinstallation eines Programmes,Ich werde gefragt ob ich mir sicher bin dies zu deinstallieren und muss mit Ja bestätigen kann man dies mit Hilfe eines Befehls oder Skriptes umgehen ? ein Parameter für die Silent Installation wurde bereits gesetzt hat aber nicht funktioniert.

Re: Deinstallations Probleme

Verfasst: 06 Jun 2019, 12:18
von AlexB
Servus,

hast es mal über WMIC mit "nointeractive" probiert?
Ansonsten geht der Weg nur noch über Autoit oder einer eigenen Deinstallationsroutine.

Re: Deinstallations Probleme

Verfasst: 06 Jun 2019, 13:06
von Starlord
Wir haben es gerade ausprobiert, leider ist es aber so das das Programm keine MSI Datei ist bzw aufgrunddessen wird die bei wmic nicht mit aufgelistet.

Re: Deinstallations Probleme

Verfasst: 07 Jun 2019, 09:47
von SisterOfMercy
Well, what kind of installer is it then?
Can I download it somewhere to see?

Re: Deinstallations Probleme

Verfasst: 17 Jun 2019, 12:30
von n.wenselowski
Hi,
Starlord hat geschrieben:Guten Tag,

ich habe ein Problem bei der Deinstallation eines Programmes,Ich werde gefragt ob ich mir sicher bin dies zu deinstallieren und muss mit Ja bestätigen kann man dies mit Hilfe eines Befehls oder Skriptes umgehen ? ein Parameter für die Silent Installation wurde bereits gesetzt hat aber nicht funktioniert.
Sowas wird im Getting Started beschrieben - dort wird mittels AutoIt ein ähnliches Fenster weggeclickt.

Re: Deinstallations Probleme

Verfasst: 17 Jun 2019, 16:06
von Starlord
Hallo, kurzes Update

wir haben das Problem gelöst mithilfe dieses Beitrages

I've been struggling with the silent uninstaller for a while, and finally came to a solution that works for me in most cases, both for InstallShield v6 and v7.
1. First (as it was mentioned above), you have to generate an InstallShield Response file (e.g. uninstall.iss). In order to do that you have to launch your setup.exe with parameters:
> setup.exe -x -r -f1"C:\Your\Installer\Location\uninstall.iss"
This will go through the normal uninstall wizard and generate a Response file for you: uninstall.iss
2. Then, before trying your silent uninstaller, I guess, you should re-install the software.
3. And finally, run your silent uninstaller playing back the recently generated Response file:
> setup.exe -x -s -l0x9 -ARP -f1"C:\Your\Installer\Location\uninstall.iss"
That's it.
Now, a few important notes:
Note 1: I'm working with a 3-rd party installation package that I didn't build myself.
Note 2: I use dashes (-) instead of slashes (/) to define parameters. For some reason it doesn't work with slashes for me. Weird but true.
Note 3: The -ARP and -l switches are required for some installation packages to manage the software removal from the Add/Remove Programs list and to preset the default input language accordingly.
Successful silent uninstallation is all about the correct parameters! So keep exploring, the correct parameters vary depending on a specific package and installer version.
I hope my input was helpful.


Wir konnten die Deinstallation erfolgreich durchführen, jedoch stehen wir jetzt vor dem Problem, dass wir wenn wir das Script über Opsi als System User starten eine Fehlermeldung bekommen. Exitcode 1620 kann damit vielleicht jemand was anfangen ?

Re: Deinstallations Probleme

Verfasst: 17 Jun 2019, 18:57
von SisterOfMercy
Starlord hat geschrieben:1. First (as it was mentioned above), you have to generate an InstallShield Response file (e.g. uninstall.iss). In order to do that you have to launch your setup.exe with parameters:
Uh, wasn't installshield also capable to contain an msi? Then that's the installer I don't use. Run the installer on a test machine, grab the msi file from the temp directory, and use that.
In some cases they need the isscript.msi installed first, but I've only had that with one package.
Starlord hat geschrieben:Wir konnten die Deinstallation erfolgreich durchführen, jedoch stehen wir jetzt vor dem Problem, dass wir wenn wir das Script über Opsi als System User starten eine Fehlermeldung bekommen. Exitcode 1620 kann damit vielleicht jemand was anfangen ?
https://docs.microsoft.com/en-us/window ... rror-codes says:
"ERROR_INSTALL_PACKAGE_INVALID 1620 This installation package could not be opened. Contact the application vendor to verify that this is a valid Windows Installer package."

So, show your uninstall script. :)

Re: Deinstallations Probleme

Verfasst: 19 Jun 2019, 07:38
von Starlord

Code: Alles auswählen

[Actions]

requiredWinstVersion >= "4.10.8.12"

Winbatch_install_exe
Winbatch_install_exe_1
DosBatch_install





[Winbatch_install_exe]

msiexec.exe /x "\\location\of\the\msi\file\ Client.msi" /qn 

[Winbatch_install_exe_1]
"C:\Program Files (x86)\InstallShield Installation Information\{A0ED3DA1-421C-4E16-85BE-310B21ED538A}\setup.exe" -x -s -l0x9 -ARP -f1"\\location\of\the\uninstall\file\uninstall.iss" -runfromtemp -removeonly

[DosBatch_install]
"\\location\of\the\common\batch\installationfile\pa-client.bat" /qn
Um nochmal das Problem zu schildern:
Wenn ich das Script als Admin starte per Hand, dann wird es Einwand frei ausgeführt und funktioniert. Wenn ich das Skript jedoch über den opsi-config editor zuweise auf einem Rechner, wird das Skript dort Fehlerhaft ausgeführt. Wir glauben an Berechtigungsprobleme. Ich habe nach Möglichen Lösungen geguckt, wie zum Beispiel Opsi-template-with-admin, jedoch kann ich dies nicht nachvollziehen bzw. bräuchte hierfür eine genaue erklärung wie ich dies mache, da ich aus dem Handbuch nicht schlau werde.

Re: Deinstallations Probleme

Verfasst: 19 Jun 2019, 09:50
von AlexB
Servus,

würde dir raten Setups immer erst auf den Clienten zu kopieren, da Remote-Setups gerne genaua zu solchen Problemen führen.

VG

Re: Deinstallations Probleme

Verfasst: 19 Jun 2019, 09:54
von SisterOfMercy
I think you want to search the manual for %scriptpath%. ;)
https://download.uib.de/opsi4.0/doc/htm ... anual.html

Code: Alles auswählen

[Winbatch_install_exe]
msiexec.exe /x "%scriptpath%\files\Client.msi" /qn

[Winbatch_install_exe_1]
"C:\Program Files (x86)\InstallShield Installation Information\{A0ED3DA1-421C-4E16-85BE-310B21ED538A}\setup.exe" -x -s -l0x9 -ARP -f1"%scriptpath%\files\uninstall.iss" -runfromtemp -removeonly

[DosBatch_install]
"%scriptpath%\files\pa-client.bat" /qn
This assumes you have created a directory in your opsi package (in the directory where the .opsiscript files reside), and put your client.msi, uninstall.iss and pa-client.bat there