is there a possibility to make a batch file that opens when clicking on a program like a browser?
thnx
batch file opens when clicking on a program.
Moderator: DosItHelp
-
- Posts: 100
- Joined: 16 Dec 2016 22:31
Re: batch file opens when clicking on a program.
Maybe without hacking the software itself it's tough to achive. Though if you are using it for yourself or someone who is little literate in computer you can do this-
1) write the batch file you want to run when clicked in the software and save it in the software directory.
2) Write another batch file that would open the batch file and then the software
2.5) *optional* use any bat to exe converter and convert the 2nd file to exe
3) Change the 2nd batch file's icon to the software icon and then replace all the shortcuts to the software to the 2nd batch file.
It's absolutely not a solution but if you want to do this to trick your friends this may work.
Sounak
1) write the batch file you want to run when clicked in the software and save it in the software directory.
2) Write another batch file that would open the batch file and then the software
2.5) *optional* use any bat to exe converter and convert the 2nd file to exe
3) Change the 2nd batch file's icon to the software icon and then replace all the shortcuts to the software to the 2nd batch file.
It's absolutely not a solution but if you want to do this to trick your friends this may work.
Sounak
Re: batch file opens when clicking on a program.
No. A not-running code doesn't do anything and thus, can't run itself.a batch file that opens
You would need something that observes the running processes and raises an event. This event can be used to run a batch file.
E.g. you could enable the Audit Process Creation in the group policy and create a scheduled task that is waiting for a certain event and runs the batch script.
Another possibility would be running a script without a window (VBScript, JScript, ...) that observes process creation events using WMI and runs your batch script if a certain process was created.
Steffen