Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- rem Autor: JWLLEWELYN
- rem Description: script that allows to enable the execution of programs.
- 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 %params%", "", "runas", 1 >> "%temp%\getadmin.vbs" && "%temp%\getadmin.vbs" && exit /B )
- :check
- IF EXIST "%~dp0overlay.xml" (
- goto apply
- ) ELSE (
- echo.
- color 4F
- echo "The file "overlay.xml" can not be found in the root directory."
- timeout /t 10
- exit
- )
- :apply
- IF EXIST "%PROGRAMDATA%\CafeAgent\overlay.xml" (
- copy /y /v /b "%~dp0overlay.xml" "%PROGRAMDATA%\CafeAgent"
- echo.
- color 2F
- echo "The settings have been saved correctly."
- timeout /t 10
- ) ELSE (
- echo.
- color 4F
- echo "The CafeAgent is not installed. you can not apply the settings."
- timeout /t 10
- )
- exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement