Welcome, Guest. Please login or register.

Author Topic: XP - Getting the system to redetect UDMA transfer rates  (Read 2530 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline whabang

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 7270
    • Show all replies
Re: XP - Getting the system to redetect UDMA transfer rates
« on: January 29, 2008, 02:23:08 PM »
This is a well-know issue with Windows, and contrary to what the information from Microsoft says, the problem was not neccesarily fixed by XP SP2.

There is more information about the problem here, I'd recomend that you use the workaround for Windows 2000. That usually solves the problem for our customers.

If that doesn't solve the problem, try pasting the following text into an empty text document, and save it as dma.vbs (and then run it):
Quote

If MsgBox("This program will now reset the DMA status of all ATA drives with Windows drivers." _
  & vbNewline & "Windows will redetect the status after the next reboot, therefore this procedure" _
  & vbNewline & "should be harmless.", _
    vbOkCancel, "Program start message") _
  = vbOk Then

RegPath = "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E96A-E325-11CE-BFC1-08002BE10318}\"
ValueName1 = "MasterIdDataChecksum"
ValueName2 = "SlaveIdDataChecksum"
ValueName3 = "ResetErrorCountersOnSuccess"
MessageText = "The following ATA channels have been reset:"
MessageTextLen0 = Len(MessageText)
SubsequentMisses = 0
Set WshShell = WScript.CreateObject("WScript.Shell")

For i = 0 to 999
  RegSubPath = Right("000" & i, 4) & "\"

  ' Master

  Err.Clear
  On Error Resume Next
  WshShell.RegRead RegPath & RegSubPath & ValueName1
  e1 = Err.Number
  Err.Clear
  On Error Goto 0
  If e1 = 0 Then
    On Error Resume Next
    WshShell.RegDelete RegPath & RegSubPath & ValueName1
    On Error Goto 0
    MessageText = MessageText & vbNewLine & "Master"
  End If

  ' Slave

  Err.Clear
  On Error Resume Next
  WshShell.RegRead RegPath & RegSubPath & ValueName2
  e2 = Err.Number
  On Error Goto 0
  If e2 = 0 Then
    On Error Resume Next
    WshShell.RegDelete RegPath & RegSubPath & ValueName2
    On Error Goto 0
    If e1 = 0 Then
      MessageText = MessageText & " and "
    Else
      MessageText = MessageText & vbNewLine
    End If
    MessageText = MessageText & "Slave"
  End If

  If e1 = 0 Or e2 = 0 Then
    On Error Resume Next
    WshShell.RegWrite RegPath & RegSubPath & ValueName3, 1, "REG_DWORD"
    On Error Goto 0
    ChannelName = "unnamed channel " & Left(RegSubPath, 4)
    On Error Resume Next
    ChannelName = WshShell.RegRead(RegPath & RegSubPath & "DriverDesc")
    On Error Goto 0
    MessageText = MessageText & " of " & ChannelName & ";"
    SubsequentMisses = 0
  Else
    SubsequentMisses = SubsequentMisses + 1
    If SubsequentMisses >= 32 Then Exit For ' Don't search unnecessarily long.
  End If
Next ' i

If Len(MessageText) <= MessageTextLen0 Then
  MessageText = "No resettable ATA channels with Windows drivers found. Nothing changed."
Else
  MessageText = MessageText & vbNewline _
    & "Please reboot now to reset and redetect the DMA status."
End If

MsgBox MessageText, vbOkOnly, "Program finished normally"

End If ' MsgBox(...) = vbOk
Beating the dead horse since 2002.