Windows 10: Windows 8.1 Calculator Install Script Solved

  1.    01 Aug 2015 #1

    Windows 8.1 Calculator Install Script


    Made a little script to install the old Win32 style calculator from Windows 8.1. Maybe someone will find it useful.

    While the batch file does not overwrite any system files, it does change the keyboard calculator button to open the 8.1 app (comment out the "reg add" line to disable that).

    See attachment for calculator executables.

    Code:
    cd /d %~dp0
    
    set MUI64="%SystemRoot%\System32\en-US\calc32.exe.mui"
    set MUI32="%SystemRoot%\SysWOW64\en-US\calc32.exe.mui"
    set CALC64="%SystemRoot%\System32\calc32.exe"
    set CALC32="%SystemRoot%\SysWOW64\calc32.exe"
    
    copy calc32.exe.mui %MUI64%
    copy calc32.exe.mui %MUI32%
    copy calc32_x64.exe %CALC64%
    copy calc32_x32.exe %CALC32%
    
    reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AppKey\18 /v ShellExecute /t REG_SZ /d calc32.exe /f
    
    set SCRIPT="%temp%\%RANDOM%.vbs"
    echo Set oWS = WScript.CreateObject("WScript.Shell") >> %SCRIPT%
    echo sLinkFile = "%SystemRoot%\..\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories\Calculator (Classic).lnk" >> %SCRIPT%
    echo Set oLink = oWS.CreateShortcut(sLinkFile) >> %SCRIPT%
    echo oLink.TargetPath = "%windir%\system32\calc32.exe" >> %SCRIPT%
    echo oLink.WorkingDirectory = "" >> %SCRIPT%
    echo oLink.Description = "Performs basic arithmetic tasks with an on-screen calculator." >> %SCRIPT%
    echo oLink.IconLocation = "%windir%\system32\calc32.exe" >> %SCRIPT%
    echo oLink.Save >> %SCRIPT%
    cscript /nologo %SCRIPT%
    del %SCRIPT%
    
    icacls "%SystemRoot%\..\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories\Calculator (Classic).lnk" /setowner "NT AUTHORITY\SYSTEM"
    icacls %MUI64% /grant "ALL APPLICATION PACKAGES:(RX)"
    icacls %MUI64% /grant "BUILTIN\Users:(RX)"
    icacls %MUI64% /grant "NT AUTHORITY\SYSTEM:(RX)"
    icacls %MUI64% /grant "BUILTIN\Administrators:(RX)"
    icacls %MUI64% /grant "NT SERVICE\TrustedInstaller:(F)"
    icacls %MUI64% /setowner "NT SERVICE\TrustedInstaller"
    icacls %MUI64% /inheritance:r
    icacls %MUI32% /grant "ALL APPLICATION PACKAGES:(RX)"
    icacls %MUI32% /grant "BUILTIN\Users:(RX)"
    icacls %MUI32% /grant "NT AUTHORITY\SYSTEM:(RX)"
    icacls %MUI32% /grant "BUILTIN\Administrators:(RX)"
    icacls %MUI32% /grant "NT SERVICE\TrustedInstaller:(F)"
    icacls %MUI32% /setowner "NT SERVICE\TrustedInstaller"
    icacls %MUI32% /inheritance:r
    icacls %CALC64% /grant "ALL APPLICATION PACKAGES:(RX)"
    icacls %CALC64% /grant "BUILTIN\Users:(RX)"
    icacls %CALC64% /grant "NT AUTHORITY\SYSTEM:(RX)"
    icacls %CALC64% /grant "BUILTIN\Administrators:(RX)"
    icacls %CALC64% /grant "NT SERVICE\TrustedInstaller:(F)"
    icacls %CALC64% /setowner "NT SERVICE\TrustedInstaller"
    icacls %CALC64% /inheritance:r
    icacls %CALC32% /grant "ALL APPLICATION PACKAGES:(RX)"
    icacls %CALC32% /grant "BUILTIN\Users:(RX)"
    icacls %CALC32% /grant "NT AUTHORITY\SYSTEM:(RX)"
    icacls %CALC32% /grant "BUILTIN\Administrators:(RX)"
    icacls %CALC32% /grant "NT SERVICE\TrustedInstaller:(F)"
    icacls %CALC32% /setowner "NT SERVICE\TrustedInstaller"
    icacls %CALC32% /inheritance:r
    Windows 8.1 Calculator Install Script Attached Files
      My ComputerSystem Spec

  2.    01 Aug 2015 #2

    Ah, good ole calc.

    In return of your kind gesture, I leave you with this.
      My ComputersSystem Spec


 

Related Threads
I don't use touch, I don't have touch, I don't want touch. So why am I locked with a monster big calculator? Is there a way to get the old small calculator back? I have tried to just copy the calc.exe from windows 8.1, but that don't work. If...
Calculator seems to be broken. in Software and Apps
This is annoying... 16277 Does anyone know of a fix yet?
I use an old kvm switch without active ddc so I am always having to open screen resolution settings and click detect. I would like to make a script file and then a shortcut to the file to do this for me but I have never written a script and can't...
5264 That's the GUI. I can post all of the code if anyone wants it. Jeff :)
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 05:38.
Find Us