mirror of
https://github.com/Grasscutters/GrassClipper.git
synced 2024-08-14 13:11:48 +08:00
do not require admin for install script
This commit is contained in:
parent
7fe7d649bf
commit
72ac08d0bd
@ -283,7 +283,7 @@ async function closeFirstTimePopup() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function runInstallScript() {
|
async function runInstallScript() {
|
||||||
Neutralino.os.execCommand(`${NL_CWD}/scripts/install.cmd "${NL_CWD}"`)
|
Neutralino.os.execCommand(`${NL_CWD}/scripts/install.cmd "${NL_CWD}" true`)
|
||||||
|
|
||||||
// Create an interval that will check for the proxy server installation finish
|
// Create an interval that will check for the proxy server installation finish
|
||||||
const interval = setInterval(async () => {
|
const interval = setInterval(async () => {
|
||||||
|
@ -2,11 +2,10 @@
|
|||||||
|
|
||||||
set ORIGIN=%1
|
set ORIGIN=%1
|
||||||
set ORIGIN=%ORIGIN:"=%
|
set ORIGIN=%ORIGIN:"=%
|
||||||
|
set OPEN_CONCUR=%2
|
||||||
|
|
||||||
:: Ensure admin
|
if "%OPEN_CONCUR%" EQU "true" (
|
||||||
>nul 2>&1 reg query "HKU\S-1-5-19" || (
|
cd /d "%~dp0" && ( if exist "%temp%\start.vbs" del "%temp%\start.vbs" ) && fsutil dirty query %systemdrive% 1>nul 2>nul || ( echo Set SHELL = CreateObject^("Shell.Application"^) : SHELL.ShellExecute "cmd.exe", "/k cd ""%~sdp0"" && %~s0 "%1" false", "", "", 1 >> "%temp%\start.vbs" && "%temp%\start.vbs" && exit /B )
|
||||||
set params = %*:"="""%
|
|
||||||
cd /d "%~dp0" && ( if exist "%temp%\getadmin.vbs" del "%temp%\getadmin.vbs" ) && fsutil dirty query %systemdrive% 1>nul 2>nul || ( echo Set UAC = CreateObject^("Shell.Application"^) : UAC.ShellExecute "cmd.exe", "/k cd ""%~sdp0"" && %~s0 "%1" ", "", "runas", 1 >> "%temp%\getadmin.vbs" && "%temp%\getadmin.vbs" && exit /B )
|
|
||||||
)
|
)
|
||||||
|
|
||||||
echo Downloading proxy server...
|
echo Downloading proxy server...
|
||||||
@ -42,7 +41,8 @@ echo Adding ceritifcate...
|
|||||||
|
|
||||||
:: Ensure we are elevated for certs
|
:: Ensure we are elevated for certs
|
||||||
>nul 2>&1 certutil -addstore root %USERPROFILE%\.mitmproxy\mitmproxy-ca-cert.cer || (
|
>nul 2>&1 certutil -addstore root %USERPROFILE%\.mitmproxy\mitmproxy-ca-cert.cer || (
|
||||||
echo Certificate install failed, ensure the script is running as Administrator and that the path "%USERPROFILE%\.mitmproxy" exists,
|
echo Certificate install failed, ensure the script is running as Administrator and that the path "%USERPROFILE%\.mitmproxy" exists,
|
||||||
|
echo You can also manually run this command: certutil -addstore root %USERPROFILE%\.mitmproxy\mitmproxy-ca-cert.cer
|
||||||
)
|
)
|
||||||
|
|
||||||
echo Done! You can now open GrassClipper.exe!
|
echo Done! You can now open GrassClipper.exe!
|
||||||
|
Loading…
x
Reference in New Issue
Block a user