I got bored of having to launch 'Main.py' Through the admin cmd prompt.
So with a little help from google I compiled a .bat that does the job for you.
Not uploading the .bat because everybody knows not to run .bat you're unsure of.
Make what you will of this, Don't use it if you don't trust it.
I just thought I'd share this as I find it useful myself.
What is this?
The initial part of the code allows the script to be run as admin (Still requires you to allow it to be run as admin)
It saves you time by not forcing you to open command prompt every time you want to add or change a mod.
Code: Select all
@echo off
:: BatchGotAdmin
:-------------------------------------
REM --> Check for permissions
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
REM --> If error flag set, we do not have admin.
if '%errorlevel%' NEQ '0' (
echo Requesting administrative privileges...
goto UACPrompt
) else ( goto gotAdmin )
:UACPrompt
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
set params = %*:"=""
echo UAC.ShellExecute "%~s0", "%params%", "", "runas", 1 >> "%temp%\getadmin.vbs"
"%temp%\getadmin.vbs"
exit /B
:gotAdmin
if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
pushd "%CD%"
CD /D "%~dp0"
:--------------------------------------
cd "Location\Of\Folder\Containing\ModManager"
start main.py
exit
- Open Notepad.
- Paste the code above inside.
- Replace "Location\Of\Folder\Containing\ModManager" with the location of your mod manager files (Keep ")
- Go to save as and save the file as 'Loader.bat' and where you see 'Text Documents(*txt)' change to all files.
- Hit save.
- Launch!