Jump to content

Minecraft startup script help (english)

LittleCham
Go to solution Solved by wanderingfool2,
On 6/13/2021 at 10:57 AM, Sauron said:

If you're on wifi then you can make it so Windows automatically reconnects to the network as soon as the wifi adapter is available - just check the "Connect automatically" box. If you're on wired you don't even need to set that up, it happens automatically.

I don't know about minecraft, but I've come across a few programs that would fail to load if the internet connection started working after the program was launched.

 

On 6/13/2021 at 10:52 AM, LittleCham said:

I'm using windows 10 but I would like a script that could also check other things like making sure internet is connected. So I don't have to go to it and connect to internet anytime my computer restarts. 

You can try a batch file, and putting it in the startup folder (which gets run automatically)

 

e.g.

@echo off

:CheckInternet
REM Calling Ping, where ping waits for 5 seconds
REM Ping will set errorlevel 1 if its not connected
REM If no internet if found, try finding it again (so it repeats checking about every 30 seconds, until you stop it or it finds a connection)
REM if connection is found goto the launchProgram
echo Attempting to find internet connection
ping www.google.com -n 1 -w 1000

if errorlevel 1 (
TIMEOUT /T 30
goto CheckInternet )
if errorlevel 0 ( goto LaunchProgram )

:LaunchProgram
echo Launching program
[PUT YOUR LAUNCH CODE HERE...something like C:\MineCraft\start.exe]

pause

 

Hello, I am looking for a script I can make so If my computer turns off or restarts it automatically starts my Minecraft server and if possible makes sure internet is connected before it starts. I am a noob when it comes to scripting I'm used to HTML code.

Link to comment
Share on other sites

Link to post
Share on other sites

What operating system are you using? This shouldn't require any scripting, just either adding a shortcut to the autostart folder in Windows (assuming it's not already in the autostart list) or enabling a systemd service if you're on Linux.

Don't ask to ask, just ask... please 🤨

sudo chmod -R 000 /*

Link to comment
Share on other sites

Link to post
Share on other sites

19 minutes ago, Sauron said:

What operating system are you using? This shouldn't require any scripting, just either adding a shortcut to the autostart folder in Windows (assuming it's not already in the autostart list) or enabling a systemd service if you're on Linux.

I'm using windows 10 but I would like a script that could also check other things like making sure internet is connected. So I don't have to go to it and connect to internet anytime my computer restarts. 

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, LittleCham said:

I'm using windows 10 but I would like a script that could also check other things like making sure internet is connected. So I don't have to go to it and connect to internet anytime my computer restarts. 

If you're on wifi then you can make it so Windows automatically reconnects to the network as soon as the wifi adapter is available - just check the "Connect automatically" box. If you're on wired you don't even need to set that up, it happens automatically.

Don't ask to ask, just ask... please 🤨

sudo chmod -R 000 /*

Link to comment
Share on other sites

Link to post
Share on other sites

On 6/13/2021 at 10:57 AM, Sauron said:

If you're on wifi then you can make it so Windows automatically reconnects to the network as soon as the wifi adapter is available - just check the "Connect automatically" box. If you're on wired you don't even need to set that up, it happens automatically.

I don't know about minecraft, but I've come across a few programs that would fail to load if the internet connection started working after the program was launched.

 

On 6/13/2021 at 10:52 AM, LittleCham said:

I'm using windows 10 but I would like a script that could also check other things like making sure internet is connected. So I don't have to go to it and connect to internet anytime my computer restarts. 

You can try a batch file, and putting it in the startup folder (which gets run automatically)

 

e.g.

@echo off

:CheckInternet
REM Calling Ping, where ping waits for 5 seconds
REM Ping will set errorlevel 1 if its not connected
REM If no internet if found, try finding it again (so it repeats checking about every 30 seconds, until you stop it or it finds a connection)
REM if connection is found goto the launchProgram
echo Attempting to find internet connection
ping www.google.com -n 1 -w 1000

if errorlevel 1 (
TIMEOUT /T 30
goto CheckInternet )
if errorlevel 0 ( goto LaunchProgram )

:LaunchProgram
echo Launching program
[PUT YOUR LAUNCH CODE HERE...something like C:\MineCraft\start.exe]

pause

 

3735928559 - Beware of the dead beef

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×