Jump to content

Need Help on Making Batch File


Recommended Posts

Hello

I'm new to this forum

And I'm a noob at programming (I don't even know the "C" of "C++" :))

I was messing with Batch file few monthes ago

and I found a way to use shutdown commands

I goto a school with a somewhat secured network :)

This is my code:

@echo on

cls

i -s -m \\computer-10 -t 00 -f

"computer-10" is the computer I want to shutdown remotely and the computer is in the same room as me (I can't access computers in the other rooms cuz I get the "Access denied" message)

Anyways

I want to loop this batchfile using "GOTO" command, like this:

@echo on

1:

cls

i -s -m \\computer-10 -t 00 -f

goto 1

It worked well. So, I moved on to trying to shutdown EVERYONE's computer in the room.

My friend told me about the %VAR% command so I tried this:

@echo on

set var=10

1:

cls

i -s -m \\computer-%var% -t 00 -f

goto 1

however, I wanted to use a math arithmetic, like %var%+1, but ofcourse, It doesn't work, cuz it's not written properly

I was wondering if you guys knew how to increse the VARIABLE value by 1 everytime I repeat the batch file

or If you have any other commands that would do that, plz help me:)

Thanks for your time

-cs_haxorsseh

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy