Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

batch trigger?


shadow31's Avatar
Member
0 0

Just a question about batch programming. I am wondering if there is a way to trigger a batch program besides double clicking? I am talking about it activating if you open a specific folder or type a key word. Thanks for the help

Also, I think that the computers at my school are using batch to deactivate the command prompt. This is because it says "command prompt has been disabled by administrator" then below it, it says "press any key to continue" then when you hit anything, it closes. any ideas on how this works?


ghost's Avatar
0 0

cmd.bat pause

If you run it, it would give the "Command Prompt Not Allowed Message" then quit. Try

cmd.bat pause echo "Gets Here" pause

The quitting is what the batch file is meant to do. Bath file's (The simple ones at least) Aren't meant to stay open. They're just meant to quickly execute a number of predefined commands, then quit.

I suggest you research batch files :)

This is my online checker, if anyone is interested:

color 0E title Reelix's Online Checker echo off cls echo Trying to ping Google… ping www.google.co.za -l 1 -t pause

Just change the co.za to your appropriate country.


spyware's Avatar
Banned
0 0

That had absolutely nothing to do with his question.

To the topicstarter; you can do this with languages close to the machine. Try C++.


ghost's Avatar
0 0

@Reelix: dont try to help anyone…. ever

@topic starter: what type of trigger do you mean?


shadow31's Avatar
Member
0 0

Just something that would start a program, like a batch file, without having a person double clicking on it. I am wondering if this is possible through batch?


spyware's Avatar
Banned
0 0

shadow31 wrote: Just something that would start a program, like a batch file, without having a person double clicking on it. I am wondering if this is possible through batch?

Not through batch, you need another, more machine-level language, try C++ like I suggested before.


shadow31's Avatar
Member
0 0

ok thanks


ghost's Avatar
0 0

Well that's fun and all, but there are simpler ways that don't require you to toil over programming manuals. Make it named Microsoft Word.bat or something like that ( a commonly used app) change the icon to look like the programs icon (I don't remember the exact way, if someone could clarify that please) make the batch file run your item and then start the app so it looks legit, it does involve them clicking on it, but it's easier to pass off.

Great items to fake My Computer IE Firefox Microsoft Word or any other office app My Documents IM clients (great on teens)

hope that helped, I forgot the exact way to replace an icon, but the .ico of the program SHOULD be in its file. Thanks to anyone who can clear that, it should work.


flame_1221's Avatar
nobody
0 0

You also can run it on startup.


ghost's Avatar
0 0

that too…

Probably the best idea to hide it in the registry startup entries if you're going to do that. Harder to find.


shadow31's Avatar
Member
0 0

I like the idea idea of mimicing it to fit the icon. That would allow things to run in the background while the actual proram stsill runs. thanks for the imput.


ghost's Avatar
0 0

well, you had question about running it after opening some folder, right? Well, in folders are different kinds of hidden files, like Folder.jpg (icon of your folder can be even an image). I think in WinXP you can use even cd-like autorun.inf (just download it from some CD and update it), good luck :)