Solved i want make script help me on that plz.

September 12, 2017 at 02:34:53
Specs: Windows 7
hi guys i want script start when i start my pc start firefox automatically with script and if i close firefox shutdown my pc .

See More: i want make script help me on that plz.

Reply ↓  Report •

#1
September 12, 2017 at 02:36:05
1. start when i start my pc
2. start firefox automatically
3. if i close firefox shutdown my pc .

Reply ↓  Report •

#2
September 12, 2017 at 03:25:34
✔ Best Answer
place startup.bat in your startup folder, located in:
C:\Users\USERNAME\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

------------startup.bat--------------
@echo off&mode 14,0
setlocal enabledelayedexpansion
start firefox
:loop
set test=nothing
timeout 5 >nul
for /f "tokens=1 skip=3" %%a in ('tasklist /FI "IMAGENAME eq firefox.exe"') do set "test=%%a"
if "!test!"=="firefox.exe" (goto loop) else (shutdown /s /t 0)
exit /b
-----------------end-------------------

Simple solutions are often the best

message edited by hidde663


Reply ↓  Report •

#3
September 12, 2017 at 04:11:46
after close firefox pc not shutdown

Reply ↓  Report •

Related Solutions

#4
September 12, 2017 at 05:13:50
ive added a few lines, maby that'll fix it.

replace the file & restart your pc

i will try it myself when i get home from work.

Simple solutions are often the best

message edited by hidde663


Reply ↓  Report •

Ask Question