-
Install
GCC
. -
Run the following command to compile:
gcc -Wall -Wextra -s -mwindows -Ofast LaunchSteam.c -lWininet -o LaunchSteam.exe
Last active
January 29, 2023 15:22
-
-
Save Aetopia/62e7eba283a57acae02621b2e9756543 to your computer and use it in GitHub Desktop.
Wait for an internet connection then launch a minimal instance of Steam.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
#include <wininet.h> | |
#include <libgen.h> | |
int main(__attribute__((unused)) int argc, char *argv[]) | |
{ | |
SetCurrentDirectory(dirname(argv[0])); | |
while (!InternetGetConnectedState(NULL, 0)) | |
Sleep(1); | |
// Steam Command Line Parameters: https://developer.valvesoftware.com/wiki/Command_Line_Options | |
ShellExecute(0, | |
"open", | |
"steam.exe", | |
"-silent -forceservice -no-browser -nofriendsui -no-dwrite -nocache -noverifyfiles -noreactlogin", | |
NULL, | |
SW_HIDE); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment