Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
0 beta 2
installation problem that was caused by incorrect access control list (ACL)
permissions on some registry hives. In that post, I described how to use a
tool in the Windows Resource Kit named SubInACL to reset file and registry
ACLs to help solve this problem.
Ever since I wrote that post, I have run into installation errors for several
other products that have been solved by using the SubInACL tool.
Therefore, I wanted to write a standalone set of instructions for how and
when to use the SubInACL tool because the previous blog post is specific to
the .NET Framework 2.0 setup and does not always appear in search results
when people run into this kind of a problem and search the Internet for
assistance.
How to download and run SubInACL
Here are some steps that can be used to download and run the SubInACL
tool to repair file and registry permissions that are often needed to
successfully install programs on Windows, particularly for MSI-based
(Windows Installer) setups:
1. Download the SubInACL tool and install it. By default it will install to
c:\Program Files\Windows Resource Kits\Tools
2. If you are running Windows Vista, click on the Start menu, choose All
Programs, then Accessories, then right-click on the item
named Command Prompt and choose Run as administrator
3. If you are running an OS other than Windows Vista, go to the Start
menu, choose Run, type cmd and click OK
4. In the cmd prompt, type notepad reset.cmd and click yes to open
Notepad.exe and create a new text file named reset.cmd
5. Copy and paste the following contents into reset.cmd (or download it
from this location on my file server and rename it from reset.cmd.txt
to reset.cmd):
@echo off
title Resetting ACLs...
setlocal
echo.
echo Determine whether we are on an 32 or 64 bit machine
echo.
if "%PROCESSOR_ARCHITECTURE%"=="x86" if "%PROCESSOR_ARCHITEW6432%"==""
goto x86
set ProgramFilesPath=%ProgramFiles(x86)%
goto startResetting
:x86
set ProgramFilesPath=%ProgramFiles%
:startResetting
echo.
if exist "%ProgramFilesPath%\Windows Resource Kits\Tools\subinacl.exe"
goto filesExist
echo ***ERROR*** - Could not find file %ProgramFilesPath%\Windows
Resource Kits\Tools\subinacl.exe. Double-check that SubInAcl is correctly
installed and re-run this script.
goto END
:filesExist
pushd "%ProgramFilesPath%\Windows Resource Kits\Tools"
echo.
echo Resetting ACLs...
echo (this may take several minutes to complete)
echo.
echo IMPORTANT NOTE: For this script to run correctly, you must change
echo the values named YOURUSERNAME to be the Windows user account that
echo you are logged in with.
echo.
echo
=========================================================================
=
echo.
echo.
subinacl.exe /subkeyreg HKEY_CURRENT_USER /grant=administrators=f
/grant=system=f /grant=restricted=r /grant=YOURUSERNAME=f
/setowner=administrators > %temp%\subinacl_output.txt
echo.
echo.
subinacl.exe /keyreg HKEY_CURRENT_USER /grant=administrators=f
/grant=system=f /grant=restricted=r /grant=YOURUSERNAME=f
/setowner=administrators >> %temp%\subinacl_output.txt
echo.
echo.
subinacl.exe /subkeyreg HKEY_LOCAL_MACHINE /grant=administrators=f
/grant=system=f /grant=users=r /grant=everyone=r /grant=restricted=r
/setowner=administrators >> %temp%\subinacl_output.txt
echo.
echo.
subinacl.exe /keyreg HKEY_LOCAL_MACHINE /grant=administrators=f
/grant=system=f /grant=users=r /grant=everyone=r /grant=restricted=r
/setowner=administrators >> %temp%\subinacl_output.txt
echo.
echo.
subinacl.exe /subkeyreg HKEY_CLASSES_ROOT /grant=administrators=f
/grant=system=f /grant=users=r /setowner=administrators >>
%temp%\subinacl_output.txt
echo.
echo.
subinacl.exe /keyreg HKEY_CLASSES_ROOT /grant=administrators=f
/grant=system=f /grant=users=r /setowner=administrators >>
%temp%\subinacl_output.txt
echo.
echo.
echo System Drive...
subinacl.exe /subdirectories %ProgramFilesPath%\ /grant=administrators=f
/grant=system=f /grant=users=e >> %temp%\subinacl_output.txt
echo.
echo.
echo Windows Directory...
subinacl.exe /subdirectories %windir%\ /grant=administrators=f
/grant=system=f /grant=users=e >> %temp%\subinacl_output.txt
echo.
echo.
echo
=========================================================================
=
echo.
echo FINISHED.
echo.
echo Press any key to exit . . .
pause >NUL
popd
:END
endlocal