Hi,guys
how can I detect,if a network driver is installed on my PC or not ?
To detect file exists or not we use : Iffileexists>...
To detect Directory exists or not we use: IfDirexists>...
but to detect a network driver installed on a PC or not we use: ???
thanks in advance!
how can I detect,if a network driver is installed on my PC?
Moderators: Dorian (MJT support), JRL
-
- Junior Coder
- Posts: 28
- Joined: Wed Jun 08, 2005 2:48 pm
Not sure I'm understanding your question. What is it that you want to accomplish?
From a DOS prompt, if you type "ipconfig/all" you will get a listing of pertinent data regarding your network connection. If this is what you're looking for, you could call this from Macro Scheduler and write the info to a text file that could then be parsed to glean the data you need.
Something like this will put the info in a text file:
Run>cmd /c ipconfig/all > path\textfile.txt
Hope this helps,
Dick
From a DOS prompt, if you type "ipconfig/all" you will get a listing of pertinent data regarding your network connection. If this is what you're looking for, you could call this from Macro Scheduler and write the info to a text file that could then be parsed to glean the data you need.
Something like this will put the info in a text file:
Run>cmd /c ipconfig/all > path\textfile.txt
Hope this helps,
Dick
-
- Automation Wizard
- Posts: 1101
- Joined: Fri Jan 07, 2005 5:55 pm
- Location: Somewhere else on the planet
If you want to look for a specific installed/loaded driver then how about something like:
Download and install drivers.exe from microsoft (only comes standard with server versions), confusingly the installer and program are both called drivers.exe but I found the program itself had installed to c\program files\resource kit. Works for me in w2k, haven't tested on XP.
http://www.microsoft.com/windows2000/te ... vers-o.asp
Run it from macrosheduler capturing the output to a file.
Search the file for the driver name.
Download and install drivers.exe from microsoft (only comes standard with server versions), confusingly the installer and program are both called drivers.exe but I found the program itself had installed to c\program files\resource kit. Works for me in w2k, haven't tested on XP.
http://www.microsoft.com/windows2000/te ... vers-o.asp
Run it from macrosheduler capturing the output to a file.
Search the file for the driver name.
- tony_smith
- Pro Scripter
- Posts: 70
- Joined: Wed May 14, 2003 8:25 pm
- Location: Vancouver BC Canada
With writing ipconfig output to a file... you can modify this little script I wrote to do the same sort of thing, but for a specific application...
Remark> This tests TPPC task queue to see if it is running, and if not, sends email.
Remark> This script is compiled into TEST-TASQ.exe and runs every 10 minutes through Windows Scheduled Tasks.
GetDate>Date
GetTime>Time
Remark>Hide the DOS window
Let>RP_WINDOWMODE=0
Del>U:\Reports\Temp\taskq.txt
Remark> pslist.exe is part of PStools
Run Program>Cmd /c pslist tppc >U:\Reports\Temp\taskq.txt
Wait>5
Let>x=0
Label>START
Let>x=x+1
ReadLn>U:\Reports\Temp\taskq.txt,x,LINE1
If>LINE1=,START
If>LINE1=##EOF##,EML
Position>Tppcsrvr,%LINE1%,1,LINPOS
//MessageModal>%LINPOS%
If>LINPOS=0,START
Label>EML
If>LINPOS=1,End
Label>SENDMAIL
//MessageModal>NOT THERE
Let>SENDMAIL_STATUS=0
Let>me=xxxxx@xxxx
Let>myname=EDI System Auto Message
Let>Subject=TPPC Task Queue Is Not Running
Let>body=TEST-TASKQ.scp %Date% %Time%%CRLF%TASK QUEUE IS NOT RUNNING
Remark>Read recipients from ini.file
ReadIniFile>U:\macros\INIFILES\email_add.ini,SYS_MSG,RECIP,RECIPTS
Let>recipients=%RECIPTS%
SMTPSendMail>recipients,exch.xxxx.local,me,myname,subject,body,
Let>RP_WINDOWMODE=1
Label>End
Remark> This tests TPPC task queue to see if it is running, and if not, sends email.
Remark> This script is compiled into TEST-TASQ.exe and runs every 10 minutes through Windows Scheduled Tasks.
GetDate>Date
GetTime>Time
Remark>Hide the DOS window
Let>RP_WINDOWMODE=0
Del>U:\Reports\Temp\taskq.txt
Remark> pslist.exe is part of PStools
Run Program>Cmd /c pslist tppc >U:\Reports\Temp\taskq.txt
Wait>5
Let>x=0
Label>START
Let>x=x+1
ReadLn>U:\Reports\Temp\taskq.txt,x,LINE1
If>LINE1=,START
If>LINE1=##EOF##,EML
Position>Tppcsrvr,%LINE1%,1,LINPOS
//MessageModal>%LINPOS%
If>LINPOS=0,START
Label>EML
If>LINPOS=1,End
Label>SENDMAIL
//MessageModal>NOT THERE
Let>SENDMAIL_STATUS=0
Let>me=xxxxx@xxxx
Let>myname=EDI System Auto Message
Let>Subject=TPPC Task Queue Is Not Running
Let>body=TEST-TASKQ.scp %Date% %Time%%CRLF%TASK QUEUE IS NOT RUNNING
Remark>Read recipients from ini.file
ReadIniFile>U:\macros\INIFILES\email_add.ini,SYS_MSG,RECIP,RECIPTS
Let>recipients=%RECIPTS%
SMTPSendMail>recipients,exch.xxxx.local,me,myname,subject,body,
Let>RP_WINDOWMODE=1
Label>End
- tony_smith
- Pro Scripter
- Posts: 70
- Joined: Wed May 14, 2003 8:25 pm
- Location: Vancouver BC Canada