Set o=CreateObject("Scripting.FileSystemObject") ‘ok this subfolder name is what I need to go afterĬmdline = fcurdir & "subinacl /subdirectories " & objSubfolder & "\*.* /setowner=Administrator /grant=Administrator=F" If oFSO.FileExists("C:\" & objSubfolder.Name & "\i386\mxdwdrv.dll") then If ucase(objSubfolder.Name) "WINDOWS" then ‘if its found it in WINDOWS then ignore it Set colFSOSubfolders = oFolder.Subfoldersįor Each objSubfolder in colFSOSubfolders ‘Find where mxdwdrv.dll is located other than c:\windows ĭim WshShell : SET WshShell = CreateObject("WScript.Shell")ĭim oFSO : SET oFSO = CreateObject("Scripting.FileSystemObject") The script expects SubInACL.exe to be present within the same folder as the script itself. Note that the below script will only work if the system was rebooted after the. We use the SubInACL resource kit utility from Microsoft to take ownership of the folder. Once we have identified the random folder name we need to take ownership of the folder before deleting it. This is done by simply searching for the file mxdwdrv.dll that is not located in the Windows folder.
Since the folder names used by the windows update process are created randomly, we first need to identify the folder name. When working in an enterprise environment where we are used to automate things, manual steps are not an option, things must run in an automated way. When taking a closer look, you will notice that the folder as special permissions set, so the only way to get rid of this folder is to first take ownership of the content and then delete the folder. When trying to delete the folder, you get the following error message: These files were pending to be deleted from the XPSEPSC installation.īut deleting that folder doesn’t appear to be so easy. These two subfolders both include the following files: This folder contains two subfolders that are named amd64 and i386. NET Framework 3.5 SP1 in Windows XP or Windows Server 2003, there is an arbitrary folder that is generated in the root of drive C.
Microsoft describes this behavior in KB951847 and confirms the folder can be deleted.Īfter you install the. NET 3.5 SP1 was installed, and found out soon that we were not the only ones having this issue. NET Framework 3.5 Service Pack 1, there can be a leftover folder in the root of the system as shown in the picture below. Some of you might have noticed that after installing the.