» »

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
282249 (1744) poweroff
»

batch fajl iz txt (strani: 1 2 )

Oddelek: Programiranje
658866 (7527) b3D_950
»

.vbs & .bat

Oddelek: Programiranje
7952 (872) darkolord
»

Login script

Oddelek: Programiranje
51023 (957) Mercier
»

Pomoč pri nastavitvah NTbackup.exe v win xp

Oddelek: Programska oprema
291593 (1322) XWY

Več podobnih tem