0

I'm trying to run and print mypowershell script from python Or run cmd command and print result in python 2 file is in directory "C:\workspace\test" --> program.ps1 And program.py

powershell script --> program.ps1 :

Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | Select-Object DisplayName, DisplayVersion, Publisher, InstallDate | Format-Table –AutoSize

cmd command:

powershell -noexit "& ""C:\workspace\test\program.ps1"""

both commands print installed programs in windows how i can run one of the two command in python? ه'm grateful you give an example

David
  • 21
  • 1
  • 6

0 Answers0