» »

Python - klic PowerShell

Python - klic PowerShell

dunda ::

Se komu sanja, kaj je narobe pri tem klicu:
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

dunda ::

Rešeno, izpustil sem tisti nesrečni parameter, pa je delovalo :-)
https://www.kacnje.eu


Vredno ogleda ...

TemaSporočilaOglediZadnje sporočilo
TemaSporočilaOglediZadnje sporočilo
»

Zanimiv ...hm... problem

Oddelek: Programska oprema
282453 (1948) poweroff
»

batch fajl iz txt (strani: 1 2 )

Oddelek: Programiranje
659697 (8358) b3D_950
»

.vbs & .bat

Oddelek: Programiranje
71031 (951) darkolord
»

Login script

Oddelek: Programiranje
51091 (1025) Mercier
»

Pomoč pri nastavitvah NTbackup.exe v win xp

Oddelek: Programska oprema
291667 (1396) XWY

Več podobnih tem