Hello .
this is old Topic but I have problem Exist.
i tried to Debug Problem As this ways
First :
Kill.exe When You Pass it hostName and User ID it Will Kill User From RAS
Like : Kill.exe 127.0.0.1 Cafe123
1- i run Command(CMD) from Run Menu and inside it Tried This
d:\wwwroot\Kill.exe 127.0.0.1 Cafe20
and resault(output) is Like This
cafe10
cafe13
Cafe16
New23
cafe20 -x-
...
Then This User Was Disconnected From Ras
if User Dos not Exist Above list Will show but Without -x-
this is Good .
now I try this
d:\wwwroot\kill.exe 127.0.0.1 cafe20 >> d:\wwwroot\kill.txt
bomb... this File Created and Have above Resault inside
now i exit Command env....
in My Script i tried This :
Set Shell = Server.CreateObject("Wscript.Shell") Shell.Run "CMD /c Dir c:\ >> d:\wwwroot\kill.txt"
|
Resault is OK and List Of Drive c:\ is in the File
then i tried this Folow Codes But no Resault Except an Empty kill.txt File
(The File Kill.txt was Created But Empty)
Set Shell = Server.CreateObject("Wscript.Shell") strKilluser = Server.MapPath("execute\Kill.exe") strKilluser = "CMD /c "&strKilluser & " 127.0.0.1 " & user &" >> d:\wwwroot\kill.txt" Shell.Run strKilluser
|
And This Changed Lines
strKillUser = "CMD /c d:\wwwroot\kill.exe 127.0.0.1 test >> d:\wwwroot\kill.txt"
|
strKillUser ="CMD /c ""d:\wwwroot\kill.exe 127.0.0.1 test >> d:\wwwroot\kill.txt"""
|
After Each Test I Deleted Kill.txt File To Ensure Command Run Status
The Resault : Kill.txt File Was Created But is Empty Yet
(in Command Prompt i tried this : c:\>CMD /c DIR >> tst.txt (OK) )