27 lines
968 B
Batchfile
27 lines
968 B
Batchfile
@echo off
|
|
setlocal enabledelayedexpansion
|
|
cd /d "%~dp0"
|
|
set path=%cd%\path;%path%
|
|
|
|
REM Location to your py.exe/python.exe - If the Python launcher is installed (fairly likely), py should suffice.
|
|
REM If Python does not launch, set this to the full path if your python.exe, like so:
|
|
REM set pyexe=C:\Program Files\Python38
|
|
set pyexe=py
|
|
|
|
REM Ask for wim file, if not set
|
|
set wim=%~1
|
|
if "%wim%" == "" (
|
|
set /p "wim=.wim: "
|
|
set wim=!wim:"=!
|
|
)
|
|
|
|
REM Ask for wim index, if not set
|
|
set index=%~2
|
|
if "%index%" == "" (
|
|
set /p "index=Index (* for all): "
|
|
set index=!index:"=!
|
|
)
|
|
|
|
set pyexe=%pyexe:"=%
|
|
advancedrun /exefilename "cmd.exe" /commandline '/c "set path=%path% & call "%pyexe%" run.py wim="%wim%" index=%index%"' /startdirectory "%cd%" /runas 4 /waitprocess 1 /run
|
|
advancedrun /exefilename "cmd.exe" /commandline '/c "set path=%path% & call "%pyexe%" run.py wim="%wim%" index=%index% modpath=mods-trustedInstaller"' /startdirectory "%cd%" /runas 8 /waitprocess 1 /run |