Powershell Command mit cmd.exe ausführen

Post Reply
IronStorm
Posts: 72
Joined: 19. Jun 2018, 08:19
Contact:

Powershell Command mit cmd.exe ausführen

Post by IronStorm » 06. Mar 2019, 10:00

Hallo ich habe da eine Frage bzw ein Command in einem Paket der nicht funktioniert.
Und zwar möchte ich folgenden Command ausführen.

Set CurrentAction=Dism /online /import-defaultappassociations:"%Src%\Source\CustomFileAssoc.xml"
CallHidden cmd.exe /c "powershell.exe -executionpolicy unrestricted -command "&{%CurrentAction%}""

Dieser läuft aber nicht.
Hat hier einer eine Lösung ob ich vielleicht irgendwo ein " zuviel oder zuwenig habe??

IronStorm
Posts: 72
Joined: 19. Jun 2018, 08:19
Contact:

Re: Powershell Command mit cmd.exe ausführen

Post by IronStorm » 06. Mar 2019, 10:32

Fehler gefunden.

Set CurrentAction=Dism /online /import-defaultappassociations:'%Src%\Source\CustomFileAssoc.xml'

Statt " ein ' benutzt

Kann zu

Post Reply

Return to “Paketierung”

Who is online

Users browsing this forum: No registered users and 6 guests