CDiag ("Comprehensive Diagnosis") Source

What is all of this code (if you are so kind to call it that)? Please see my article What Is CDiag ("Comprehensive Diagnosis Tool")?, for the answer to that question. This is the BASE CDiag code, and you will get much more from it after you read the documentation, before proceeding any further.

Take the following code (everything INSIDE the "#####" lines). Please DO NOT include ANY portion of the "#####" lines. (Please verify computer names and ip addresses).


  1. Open Notepad.
  2. Highlight then Copy the code (Ctrl-C), precisely as it is presented, and Paste (Ctrl-V) into Notepad.
  3. Examine the contents of Notepad. Is the text, as copied, readable (similar in format to the Base Code)? It won't run well, if it's not easily readable.
  4. If the text is not easily read, then:
    • Stretch the sides of the Notepad window. If this improves things, then continue with Step 5.
    • Close Notepad, as is (do not bother to save anything).
    • Open Notepad.
    • Under Format, reverse the setting for Word Wrap. If it is unchecked, check it. If checked, uncheck it.
    • Return to Step 2.

  5. Verify, and correct, computer names and addresses, using logs from "ipconfig /all".
  6. Save the Notepad file as "cdiag.cmd", as type "All Files", into the root folder "C:\".
  7. Run it by Start - Run - "c:\cdiag".
  8. Wait patiently.
  9. When Notepad opens up displaying c:\cdiag.txt, first check Format and ensure that Word Wrap is NOT checked! Then, copy the entire contents (Ctrl-A Ctrl-C) and paste (Ctrl-V) into your next post.

Do this from all computers, please, with all computers powered up and online.

##### Start CDiag Base Code

@echo off
set FullTarget1=
set FullTarget2=
set FullTarget3=
set FullTarget4=
set FullTargets=%FullTarget1% %FullTarget2% %FullTarget3% %FullTarget4%
set FullTargets=%FullTargets% 127.0.0.1
set PingTargets=www.yahoo.com 66.94.230.32
Set Version=V1.40
@echo CDiagnosis %Version% >c:\cdiag.txt
@echo Start diagnosis for %computername% >>c:\cdiag.txt
@echo Full Targets %FullTargets% >>c:\cdiag.txt
@echo Ping Targets %PingTargets% >>c:\cdiag.txt
@echo. >>c:\cdiag.txt
@echo Over All Analysis >>c:\cdiag.txt
@echo. >>c:\cdiag.txt
@echo Enumerate Shares >>c:\cdiag.txt
@echo. >>c:\cdiag.txt
net share >>c:\cdiag.txt
@echo. >>c:\cdiag.txt
@echo Adhoc Browser View >>c:\cdiag.txt
@echo. >>c:\cdiag.txt
net view >>c:\cdiag.txt
@echo. >>c:\cdiag.txt
@echo Full Targets Analysis %FullTargets% >>c:\cdiag.txt
for %%a in (%FullTargets%) do (
@echo. >>c:\cdiag.txt
@echo Target %%a >>c:\cdiag.txt
@echo. >>c:\cdiag.txt
@echo "%computername% ping %%a" >>c:\cdiag.txt
@echo. >>c:\cdiag.txt
ping %%a >>c:\cdiag.txt
@echo. >>c:\cdiag.txt
@echo "%computername% net view %%a" >>c:\cdiag.txt
@echo. >>c:\cdiag.txt
net view %%a >>c:\cdiag.txt
)
@echo. >>c:\cdiag.txt
@echo Ping Targets Analysis %PingTargets% >>c:\cdiag.txt
for %%a in (%PingTargets%) do (
@echo. >>c:\cdiag.txt
@echo Target %%a >>c:\cdiag.txt
@echo. >>c:\cdiag.txt
@echo "%computername% ping %%a" >>c:\cdiag.txt
@echo. >>c:\cdiag.txt
ping %%a >>c:\cdiag.txt
)
@echo. >>c:\cdiag.txt
@echo End diagnosis for %computername% >>c:\cdiag.txt
notepad c:\cdiag.txt
:EOF

##### End CDiag Base Code

0 comments: