-1
0
I want to run a .bat
file when any .exe
file (such as Firefox) is double clicked. I want to run this .bat
file when Firefox runs. Is there any way to do this?
I tried with this batch code:
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\firefox.exe" /v Debugger /d "D:\Desktop\m.bat" /f
Here, m.bat
is the file which I want to run when Firefox runs.
1
Relevant: I want to intercept a given program before it runs and run my own program first
– DavidPostill – 2017-04-21T12:13:52.680ok but how do that – Muhammad Khaled – 2017-04-21T12:18:38.767
1The answer in the link tells you ... – DavidPostill – 2017-04-21T12:19:52.760
ok I understand the solution and appaly it but there is no any thing happen – Muhammad Khaled – 2017-04-21T12:54:25.493
1You didn't run the
reg add
command correctly. In the screen shot of your registry where it shows m.bat it should sayfirefox.exe
. Also, the data of your Debugger value should beD:\Desktop\m.bat
, not the dash you currently have. Look more closely at the proposed duplicate answer. – I say Reinstate Monica – 2017-04-21T18:32:36.403thank you very much but the code is running m.bat instead of firefox I don't want that I want firefox run and m.bat running in background – Muhammad Khaled – 2017-04-22T10:06:34.400