I've got a program that uses MSInfo32's report function to create an output file that can be used to troubleshoot client's computers. My problem is that when I first started using this it took approximately 2-3 mins to generate the output of about 70 pages or so on my computer. I recently had a HDD failure and ever since I installed the new disk it's taking anywhere from 10 minutes to 2 hours to complete. My code remains unchanged, a modified about form.

Anyways, here is the code if anyone could test this and see if it's taking a significant amount of time I'd appreciate, or if you want to suggest another way of doing this. There is a commented hardcoded shell that I'm not presently using but put in to test if it would run any faster.

VB Code:
  1. Public Sub MSInfo()
  2.     On Error GoTo SysInfoErr
  3.  
  4.     Dim rc As Long
  5.     Dim SysInfoPath As String
  6.        
  7.     ' Try To Get System Info Program Path\Name From Registry...
  8.     If GetKeyValue(HKEY_LOCAL_MACHINE, gREGKEYSYSINFO, gREGVALSYSINFO, SysInfoPath) Then
  9.     ' Try To Get System Info Program Path Only From Registry...
  10.     ElseIf GetKeyValue(HKEY_LOCAL_MACHINE, gREGKEYSYSINFOLOC, gREGVALSYSINFOLOC, SysInfoPath) Then
  11.         ' Validate Existance Of Known 32 Bit File Version
  12.         If (Dir(SysInfoPath & "\MSINFO32.EXE") <> "") Then
  13.             SysInfoPath = SysInfoPath & "\MSINFO32.EXE"
  14.            
  15.         ' Error - File Can Not Be Found...
  16.         Else
  17.             GoTo SysInfoErr
  18.         End If
  19.     ' Error - Registry Entry Can Not Be Found...
  20.     Else
  21.         GoTo SysInfoErr
  22.     End If
  23.    
  24.    
  25.     'Runs MSInfo and writes a report to the local directory.
  26.     'Shell "cmd.exe /k c:\progra~1\common~1\micros~1\MSInfo\msinfo32.exe /report c:\MSInfo.txt"
  27.     Call Shell(SysInfoPath & " /report MSInfo.txt", vbNormalFocus)
  28.    
  29.     Exit Sub
  30. SysInfoErr:
  31.     MsgBox "System Information Is Unavailable At This Time", vbOKOnly
  32. End Sub

Output will be saved to the local directory. Thanks for any help, I don't have access to test on any other machines presently.