Showing posts with label Windows 2008 R2. Show all posts
Showing posts with label Windows 2008 R2. Show all posts

Wednesday, October 3, 2012

Autochk cannot run due to an error caused by a recently installed software package. Windows 2008 R2

Windows 2008 R2 is reporting NTFS file system corruption that requires a chkdsk.
I schedule a disk check and reboot, but it fails with this error

Cannot open volume for direct access.
Autochk cannot run due to an error caused by a recently installed software package.
Use system restore feature from the control panel to restore the system to a point prior to the recent software package installation.
An unspecified error occurred (766f6C756d652e63 3f1).



I suspect the antivirus software was denying disk access, but I did not want to uninstall anything.
The safest thing to do with minimal changes seemed to run chkdsk from the Windows 2008 R2 DVD, so I boot from it, start a command prompt and run

chkdsk /f d:





chkdsk runs for a while and repairs some stuff. I reboot back into windows, the drive is OK and the file system errors are gone.

Thursday, September 27, 2012

Emptying the Recycle Bin for a specific user

Suppose you want to empty the recycle bin of a different user but you do not know his password and do not want to reset it or just do not want to login with his account for any reason.

First get the SID of this account, use PsGetSid from PsTools
Then put the SID in the script below and run it. (will not delete until you uncomment the delete lines)


Const strRecycle = "\\$Recycle.Bin\\" 'Windows 2008, for Win7 use: \\Recycler\\
Set objSWbemServices = GetObject _
    ("WinMgmts:Root\Cimv2")

Dim SIDs : SIDs = Array("S-1-5-21-4040636791-1997804162-1132720628-1008",_
   "S-1-5-21-4040636791-1997804162-1132720628-1014",_
   "S-1-5-21-4040636791-1997804162-1132720628-1018")


For Each sid In SIDs

    Set colDisks = objSWbemServices.ExecQuery _
        ("Select * From Win32_LogicalDisk " &  "Where DriveType = 3")

    For Each objDisk In colDisks
        Set colDeletedFiles = objSWbemServices.ExecQuery _
        ("Select * From Cim_DataFile Where Drive = '" _
        & objDisk.DeviceId _
        & "' And Path = '" & strRecycle & sid & "
\\' " _
        & "And Hidden = False")

        For Each objDeletedFile In colDeletedFiles
            WScript.Echo objDeletedFile.Name
            'objDeletedFile.Delete
        Next
       
        Set colDeletedFolders = objSWbemServices.ExecQuery _
        ("Select * From Win32_Directory Where Drive = '" _
        & objDisk.DeviceId _
        & "' And Path = '" & strRecycle & sid & "
\\' " _
        & "And Hidden = False")

        For Each objDeletedFolder In colDeletedFolders
            WScript.Echo objDeletedFolder.Name
            'objDeletedFolder.Delete
        Next

    Next
Next

Sunday, September 2, 2012

Microsoft ACPI-Compliant Power Meter Device unsigned driver

Windows 2008 R2 cluster validation wizard reports a System Configuration warning about an unsigned driver: Microsoft ACPI-Compliant Power Meter Device. Driver Name: Value Not Found




The problem was missing files acpipmi.ini and acpipmi.pnf from the Windows\inf directory. It seems the files have been deleted after installing EMC PowerPath. So back them up before installing PowerPath or if you have already installed it copy them from another similar Windows 2008 R2 installation.

Sunday, March 4, 2012

Reset Windows 2008 R2 administrator password

This is the old trick of overwriting any app accessible at login screen (e.g. screen saver) with a command shell to reset the password

Monday, February 27, 2012

ACL permissions for IIS7 application pools

In W2K8R2/IIS7 application pools run by default under the builtin identitiy ApplicationPoolIdentity.
To grant ACL permissions to web applications running under these pools resolve names like this:

IIS APPPOOL\[APP POOL NAME]