Wrong spot probably but, meh, help with anti-virus for pc

Okay, I can whip up something in a few hours or less (Just got home, going to rest for a while). Could you send me the batch file you already have (or just the code)? I need the exe names if I am going to do something ready-to-use.

MalBytes

Never got a reply so I needed to use placeholders. Got this working:

@echo off
If exist %HOMEPATH%\Desktop\test.bat start %HOMEPATH%\Desktop\test.bat && goto countdown
exit

:countdown
echo Press [1] key to execute early, Press [2] key to abort and close program.
choice /n /c 12 /d 1 /t 60
IF ERRORLEVEL ==1 goto terminate
IF ERRORLEVEL ==2 exit

exit

:terminate
taskkill /IM horizon.exe 
taskkill /IM paintdotnet.exe
pause
exit

It will check if the launcher exists and if it does it will start it.
After it has started a dialogue promt will appear and tell you to pick either 1 or 2. 1 will automatically be picked after 60 seconds.
pressing 1 will kill the programs and pressing 2 will just close the batch file. You need to have the cmd windows in focus in order for it to register your key strokes.

Shouldn’t be very hard to modify the code to work for your situation but let me know if you can’t get it to work.

1 Like

Sorry, I am using free WiFi place that close, but I can fix that right up. Thank you.

Sometimes it refuses to close all of them, so how would you fully force it to close all 3?

[Code]
@echo off
If exist “C:\Program Files (x86)\Minecraft\MinecraftLauncher.exe” start “C:\Program Files (x86)\Minecraft\MinecraftLauncher.exe” && goto countdown
exit

:countdown
echo Press [1] key to execute early, Press [2] key to abort and close program.
choice /n /c 12 /d 1 /t 60
IF ERRORLEVEL ==1 goto terminate
IF ERRORLEVEL ==2 exit

exit

:terminate
taskkill /IM MinecraftLauncher.exe
taskkill /IM MinecraftLauncher.exe
taskkill /IM MinecraftLauncher.exe
pause
exit

I did that and pops up a cmd that says it’s minecraft but doesn’t actually load the launcher, what am I doing wrong. I also tried to modify it so it would open a different launcher but ti wouldn’t shut down all the cmds. Sorry.

C:Users\Public\Desktop\Minecraft.lnk
C:\Program Files \Minecraft\MinecraftLauncher.exe

the thing I had was just this

Taskkill /f IM MinecraftLauncher

I hope this helps. Apparently I’m not as handy as I thought I was.

1 Like

Do mcpatcher have its own launcher? If it does you want to either target the startup exe (found in the main install folder) or the shortcut for it (normally placed on the desktop and/or taskbar). Also use the the same address for both “if exists” and “start”. The if exist part is just there to hide the “file not found” error incase it doesn’t exist. When I think about it you are probably better of removing that part and just leave
@echo off
Start [insert directory] && goto countdown

And for the taskkill part:
Wasn’t the issue that mcpatcher would launch two unnecessary background tasks?

Im going to assume mcpatcher does have its own launcher. Than again I don’t launch through mcpatcher, I launch through the actual new launcher microsoft made for minecraft, which I hate. But I do have mods installed, so it could be mcpatcher launching to launchers instead of the launcher itself, how would you figure that out?

If I use the word start, it opens a folder, not the program. But If I cut off the start, it loads the program but doesn’t give me any options on the cmd. I hope this helps somehow.

Okay let’s take a step back.

I assumed it was a mcpatcher launcher causing the 2 extra launchers. I also assumed that the two extra launchers needed two seperate taskkill, one for each. You don’t need two commands in the batch if a single one will take out both launchers.

If the microsoft launcher will start up minecraft (with mcpatcher), target the microsoft launcher with the start command.

The batch is ment to function as a minecraft launcher shortcut that closes the two extra launchers after the game has had time to boot up properly.

All I want is to close all launchers that are open, I tried everything you said.

If I use the word start, it opens a folder, not the program. But If I cut off the start, it loads the program but doesn’t give me any options on the cmd. I hope this helps somehow.

I think at this point its my computer being a tard, well windows 7.

Oh ■■■■, try run.

Tried that, than it skipped past launching and closed everything.

Googled it, I need a /d in there.

Did the batch skip it? Remove @echo off and replace goto countdown with pause. It will show you the error.

now it’s pausing a new cmd and closing the other one. ugh. my computer hates me.

Oh right, replace && with &.

I’m going to record what’s happening, It’s really annoying. I even cut off everything and it still loads 2 cmds.

error
can’t find

‘C:\Program’

does that mean it’s hidden?

path file is this

C:\Program Files (x86)\Minecraft\MinecraftLauncher.exe

Getting the same issues so I’m looking into it. Will let you know when I get it working

I fixed it. put quotes first than the link not in quotes.

Start “” link && goto countdown
If I hit one though, it only closes one launcher

Here is a pastebin as my computer gets 403 error when trying to post on here now…

Https://pastebin.com/3GfGyVvf

Do the launchers have different names? It that’s the case you need two seperate taskkills for each. you could also try adding /T (tree kill) .

Also, this is my fixed code for the start issue:

@echo off
cd "C:\Program Files (x86)\Minecraft"
start MinecraftLauncher.exe && goto countdown || pause
goto error

:countdown
echo Press [1] key to execute early, Press [2] key to abort and close program.
choice /n /c 12 /d 1 /t 60
IF ERRORLEVEL ==1 goto terminate
IF ERRORLEVEL ==2 exit
goto error

:terminate
taskkill /IM horizon.exe 
taskkill /IM paintdotnet.exe
exit

:error
echo Something went wrong, fix the code.
pause
exit
2 Likes

I got it fixed, sent you pastebin link and now my computer hates posting on your website, 403 error.

I’m using my mobile phone to reply. Lol

Are you still have issues? I am a little confused now tbh.

The taskkills are not supposed to be identical nor be launched before the game has fully booted up.

Nope, no issues with launcher now. I got it all good. My only issue is your website gives me a 403 error when I try post anything on it through my computer. Probably will be fixed upon reload of my computer though. Thank you ever so much for your help, giving me to load one thing is much easier.