cmd with JS

Questions about programming languages and debugging
Post Reply
User avatar
l0ngb1t
Fame ! Where are the chicks?!
Fame ! Where are the chicks?!
Posts: 598
Joined: 15 Apr 2009, 16:00
15
Contact:

cmd with JS

Post by l0ngb1t »

am experimenting with some JS
we can make the JS execute some DOS command
but i wanna know how to capture the results
as for example if the script executed a "dir" command
how can i capture the results ?
There is an UNEQUAL amount of good and bad in most things, the trick is to work out the ratio and act accordingly. "The Jester"

User avatar
leetnigga
Fame ! Where are the chicks?!
Fame ! Where are the chicks?!
Posts: 447
Joined: 28 Jul 2009, 16:00
14

Post by leetnigga »

How are you executing the command in the first place?

User avatar
l0ngb1t
Fame ! Where are the chicks?!
Fame ! Where are the chicks?!
Posts: 598
Joined: 15 Apr 2009, 16:00
15
Contact:

Post by l0ngb1t »

leetnigga wrote:How are you executing the command in the first place?

Code: Select all

new ActiveXObject('WScript.Shell').exec('C:\\Windows\\system32\\shutdown.exe -s -t 60');
Edit: am not sure if it's available for the standard JS but i am working ona script for msnPlus and they have there own classes so i don't knw if it only works with msnPlus
There is an UNEQUAL amount of good and bad in most things, the trick is to work out the ratio and act accordingly. "The Jester"

Post Reply