vc_runtimeMinimum_x86.msi seems to be not installing. If I run the .msi only (no /q switch), throws an eror. Also, vc_runtimeMinimum_x64.msi doesnt err out, but some files in /system32 are not replaced. Might be that the .msi's from Microsoft are wrong. Should check with Orca, but I don't have it here. Edit: both are vcredist_2015-2017
Thanks for v52a. Please update OP, I still haven't figured out how to go to 'last unread post' for MDL forum threads. Actually, if you could mention the latest version in the thread title it would be v useful.
Here is an improvement. It allows Command Prompt to spawn a User Account Control dialog if not running as administrator. Should make your script work with double-click, no need to manually run as admin anymore: Code: @echo off :: BatchGotAdmin :------------------------------------- REM --> Check for permissions IF "%PROCESSOR_ARCHITECTURE%" EQU "amd64" ( >nul 2>&1 "%SYSTEMROOT%\SysWOW64\cacls.exe" "%SYSTEMROOT%\SysWOW64\config\system" ) ELSE ( >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 "cmd.exe", "/c ""%~s0"" %params%", "", "runas", 1 >> "%temp%\getadmin.vbs" "%temp%\getadmin.vbs" del "%temp%\getadmin.vbs" exit /B :gotAdmin pushd "%CD%" CD /D "%~dp0" :-------------------------------------- This should replace the current admin check. May not work with admin accounts with no password. In that case it may fail to elevate due to Windows default runas policy. It actually works even for admin accounts with no password, tested in a VM. The code restores the current directory from before elevation.
Adding admin request to the program embedded manifest is easier Code: <requestedPrivileges><requestedExecutionLevel level="requireAdministrator" uiAccess="false"></requestedExecutionLevel></requestedPrivileges>
or add line: MiscFlags="4", to SFX config: Visual C++ Redist Installer ***.txt Code: ;!@Install@!UTF-8! GUIFlags="2+4+16+32" GUIMode="1" ;+ MiscFlags="4" ;--- ExtractTitle="Preparing files..." ExtractDialogText="This shouldn't take too long!" RunProgram="x86:x86.cmd" RunProgram="x64:x64.cmd" ;!@InstallEnd@!
This does not work on new Insider win 10. Just beep when you want to type "Y" in CMP. Can you make it do automatically without typing Y for yes in CMD!????
You can always extract (7zip) the .exe file and edit the installer.cmd (Remove lines that prompt choices), save, then run x86.cmd or x64.cmd (Your OS) - worked for me
Change the tool due to 1 borked IP build ... doubt that Sir . @Atari800XL found the culprit: Code: reg add "HKCU\Console" /v "ForceV2" /t REG_DWORD /d "0" /f
Thanks for all the suggestions! I'll update the admin code for the next release . Thanks for reporting it!