Forum » Programiranje » Python - klic PowerShell
Python - klic PowerShell
dunda ::
Se komu sanja, kaj je narobe pri tem klicu:
Popravljal sem v drugem delu programa, potem pa se je pri testiranju pojavilo:
lnkTarget = subprocess.check_output(["C:\\WINDOWS\\system32\\WindowsPowerShell\\v1.0\\powershell.exe", ". \"./SamplePowershell\";", "(New-Object -ComObject WScript.Shell).CreateShortcut('" + wordFile + "').TargetPath"], shell=True)Popravljal sem v drugem delu programa, potem pa se je pri testiranju pojavilo:
The term './SamplePowershell' is not recognized as the name of a cmdlet, function, script file, or operable program
. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:3
+ . "./SamplePowershell"; (New-Object -ComObject WScript.Shell).CreateS ...
+ ~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (./SamplePowershell:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
https://www.kacnje.eu
Vredno ogleda ...
| Tema | Ogledi | Zadnje sporočilo | |
|---|---|---|---|
| Tema | Ogledi | Zadnje sporočilo | |
| » | Zanimiv ...hm... problemOddelek: Programska oprema | 2830 (2325) | poweroff |
| » | batch fajl iz txt (strani: 1 2 )Oddelek: Programiranje | 10953 (9614) | b3D_950 |
| » | .vbs & .batOddelek: Programiranje | 1154 (1074) | darkolord |
| » | Login scriptOddelek: Programiranje | 1188 (1122) | Mercier |
| » | Pomoč pri nastavitvah NTbackup.exe v win xpOddelek: Programska oprema | 1785 (1514) | XWY |