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. Ensure that Format – Word Wrap is not checked. Highlight then Copy the code (Ctrl-C), precisely as it is presented, and Paste (Ctrl-V) into Notepad. Verify, and correct, names and addresses if necessary.
  2. Save the Notepad file as “cdiag.cmd”, as type “All Files”, into the root folder “C:\”.
  3. Run it by Start – Run – “c:\cdiag”.
  4. Wait patiently.
  5. 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
Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s


%d bloggers like this: