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 | 2926 (2421) | poweroff |
| » | batch fajl iz txt (strani: 1 2 )Oddelek: Programiranje | 11408 (10069) | b3D_950 |
| » | .vbs & .batOddelek: Programiranje | 1187 (1107) | darkolord |
| » | Login scriptOddelek: Programiranje | 1223 (1157) | Mercier |
| » | Pomoč pri nastavitvah NTbackup.exe v win xpOddelek: Programska oprema | 1833 (1562) | XWY |