Skip to forum content

You are not logged in. Please login or register.


forums.pvpgn.pro → [EN] Diablo → [Guide] How to set the server on startup in windows

Pages 1

You must login or register to post a reply

RSS topic feed

Posts: 3

1 (edited by itarachiu 16.04.2019 20:08)

Topic: [Guide] How to set the server on startup in windows

In my case I'm using Windows 2012 server and I was forced to manually connect everytime to start the server via RDP so I made a script to do this.

Install autologon
Link: https://docs.microsoft.com/en-us/sysint … /autologon

Set your username and password with the tool to log in automatically when windows starts.(user Administrator in my case)


Run this command in cmd under administrator access.

%SystemRoot%\System32\reg.exe add HKCU\Software\Microsoft\Windows\CurrentVersion\Run /v "Diablo II Server" /d "\"C:\Users\Administrator\Desktop\Startup\d2server.bat\""

Modify the path according to your needs.

Next, create a folder on your desktop called Startup and create a shortcut for PvPGN.exe, d2cs.exe, d2dbs.exe, D2GS.exe and put them all toghether in the Startup folder.

Now, create a file called d2server.bat and paste the next following code:

@echo off
title Diablo II Server Startup

:: Set the Startup folder path directory.
set root=C:\Users\Administrator\Desktop\Startup
if "%root:~-1%"=="\" ( set root=%root:~0,-1% )

echo Sleep for 5 minutes...
ping 127.0.0.1 -n 301 > nul

echo Run PvPGN
start "" "%root%\PvPGN.lnk"
ping 127.0.0.1 -n 6 > nul

echo Run d2cs
start "" /min "%root%\d2cs.lnk"
ping 127.0.0.1 -n 6 > nul

echo Run d2dbs
start "" /min "%root%\d2dbs.lnk"
ping 127.0.0.1 -n 6 > nul

echo Run D2GS
start "" "%root%\D2GS.lnk"
ping 127.0.0.1 -n 6 > nul

The script will sleep for 5 minutes after the windows boots up, but you can delete those lines. in my case if I have a power loss, the server will boot faster than the router will sync with the ISP and the PvPGN server will not translate the ip address correctly.

Last step, set in your BIOS to power on the machine if is a power loss which means you are not forced to press the button to turn on the machine so if there is a power loss and the machine gets power it will automatically turn on.

RNYBattle.net - Diablo II Private Server.

2

Re: [Guide] How to set the server on startup in windows

The default way is to use a Windows service. Services start with Windows independent of login a user.
https://pvpgn.pro/d2gs_installation.html (section Start Service)

Do not ask for support in PM.

3

Re: [Guide] How to set the server on startup in windows

HarpyWar wrote:

The default way is to use a Windows service. Services start with Windows independent of login a user.
https://pvpgn.pro/d2gs_installation.html (section Start Service)

Ah, I didn't know there is already a tutorial for this.

RNYBattle.net - Diablo II Private Server.

Posts: 3

Pages 1

You must login or register to post a reply

Who now at forum

Currently view post: 1 guest, 0 registered users

forums.pvpgn.pro → [EN] Diablo → [Guide] How to set the server on startup in windows