Krikov Posted February 4, 2006 Share Posted February 4, 2006 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. Krikov [topic="63488"][font="Arial"]Krikov Tray Quick Menu[/font][/topic] Link to comment Share on other sites More sharing options...
neogia Posted February 4, 2006 Share Posted February 4, 2006 $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 Link to comment Share on other sites More sharing options...
Krikov Posted February 4, 2006 Author Share Posted February 4, 2006 Thaks But it Didnt Work Krikov [topic="63488"][font="Arial"]Krikov Tray Quick Menu[/font][/topic] Link to comment Share on other sites More sharing options...
Krikov Posted February 4, 2006 Author Share Posted February 4, 2006 Please Any Help ? [topic="63488"][font="Arial"]Krikov Tray Quick Menu[/font][/topic] Link to comment Share on other sites More sharing options...
w0uter Posted February 4, 2006 Share Posted February 4, 2006 (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 February 4, 2006 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 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now