Sign in to follow this  
Followers 0
Krikov

@ComSpec Eror Syntax

5 posts in this topic

Hello

i have a script that when i press the button it take two Var and try to Kill a running process

on a remote computer with pskill.exe

this is the line

$CompName = "\\MyPC"
$ListItem = "Notepad.exe"
RunWait(@ComSpec & '/c c:\temp\pskill.exe -t '& $CompName & ' -u username -p password ' & $ListItem)

This is Run Error

RunWait(@ComSpec & '/c c:\temp\pskill.exe -t ' & $CompName & ' -u username -p password' & $ListItem)

The system cannot find the path specified.

:lmao:

Krikov


[topic="63488"][font="Arial"]Krikov Tray Quick Menu[/font][/topic]

Share this post


Link to post
Share on other sites



$CompName = "\\MyPC"
$ListItem = "Notepad.exe"
RunWait(@ComSpec & '/c c:\temp\pskill.exe -t '& $CompName & ' -u username -p password ' & $ListItem)
I'm not completely familiar, but try this:

$CompName = "\\MyPC"
$ListItem = "Notepad.exe"
RunWait(@ComSpec & '/c Start c:\temp\pskill.exe -t '& $CompName & ' -u username -p password ' & $ListItem)

[u]My UDFs[/u]Coroutine Multithreading UDF LibraryStringRegExp GuideRandom EncryptorArrayToDisplayString"The Brain, expecting disaster, fails to find the obvious solution." -- neogia

Share this post


Link to post
Share on other sites

Thaks But it Didnt Work

Krikov


[topic="63488"][font="Arial"]Krikov Tray Quick Menu[/font][/topic]

Share this post


Link to post
Share on other sites

Please Any Help ?


[topic="63488"][font="Arial"]Krikov Tray Quick Menu[/font][/topic]

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

you shouldnt bump your post like that

try:

RunWait('C:\temp\pskill.exe -t ' & $CompName & ' -u username -p password ' & $ListItem)

The bug in your old code was the missing space before '/c' if you cared.

But running it directly is better.

Edited by w0uter

My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0