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”)?

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:
    • Close Notepad, as is (do not bother to save anything).
    • Open Notepad.
    • Under Format, change the setting for Word Wrap. If it is unchecked, check it. If checked, uncheck it.
    • Return to Step 2.
  5. Verify, and correct, names and addresses if necessary.
  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%
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

##### End CDiag Base Code

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: