ralus67
Goto Top

Installshield Deinstallation über Powershell

Hallo Forenmitglieder

Ich habe folgende Herausforderung.

Über Powershell muss ich eine Applikation deinstallieren, welche das InstallShield Setup verwendet. Führe ich die Installation über die cmd aus, wird das Programm korrekt deinstalliert.

setup.exe -x -s -uninst -f1"C:\Program Files (x86)\InstallShield Installation Information\{DD67D657-61AF-4958-97DF-808BABC64504}\uninstall.iss"

Unter Powershell klappt das nicht. Hier ein Auszug aus meinem Skript

$AppPath = "${env:ProgramFiles(x86)}\InstallShield Installation Information\{DD67D657-61AF-4958-97DF-808BABC64504}"
$uninst = "setup.exe"
$UnInf = "uninstall.iss"


$InstallArguments = @(
"-x"
"-s"
"-uninst"
"-f1$AppPath\$UnInf"
)

Start-Process $AppPath\$uninst -ArgumentList $InstallArguments -NoNewWindow -Wait


Beim -f1 Parameter habe ich auch versucht den effektiven Pfad anzugeben. Leider funktioniert auch das nicht.

Was ist im Skript falsch?

Content-Key: 1100614632

Url: https://administrator.de/contentid/1100614632

Printed on: April 23, 2024 at 13:04 o'clock

Mitglied: 143611
143611 Jul 29, 2021 at 15:33:40 (UTC)
Goto Top
Moin,

wenn ich dass richtig sehe, ist die Zeile
$AppPath = "${env:ProgramFiles(x86)}\InstallShield Installation Information\{DD67D657-61AF-4958-97DF-808BABC64504}"  
das Problem; es müsste $(<Variable>) lauten und keine geschweiften Klammern zum Auflösen der Variable verwendet werden.
Dein f1-Parameter weicht ebenfalls ab...

Lass Dir den Kram doch auf der Konsole ausgeben, dann bist Du sicher...

Viel Erfolg!
Member: Ralus67
Ralus67 Jul 30, 2021 at 06:39:02 (UTC)
Goto Top
Hi Schleeke

Nein, leider hat das nicht funktioniert
Member: mayho33
Solution mayho33 Jul 30, 2021 at 18:19:44 (UTC)
Goto Top
Mach folgendes:

$appPath = "der root des Setup"  
Start-Process -Filename "cmd.exe" -Argumentlist ("/c " + [char]34 + "$appPath\Setup.exe" + [char]34 + " -x -s -f1:" + [char]34 + "$appPath\Setup.iss" + [char]34)  

Grüße