Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Programming (http://www.go4expert.com/forums/programming-forum/)
-   -   Batch Script + Firefox to preform whois lookup (http://www.go4expert.com/forums/batch-script-firefox-preform-whois-t23229/)

Cleptography 7Sep2010 02:55

Batch Script + Firefox to preform whois lookup
 
This batch script is nothing more than a simple pass of command arguments to firefox to open a web page with whois data. Modify as needed.

Code:

@echo off
 setlocal

:Check_Program_Path
if exist "%ProgramFiles%\Mozilla Firefox\firefox.exe" goto :Check_Command_ARG
goto :ERROR_1

:Check_Command_ARG
if [%~1]==[] goto :ERROR_2

:: ELSE---
:Set_VARS
set FireFox_and_Check="%ProgramFiles%\Mozilla Firefox\firefox.exe"
set Address=http://whois.domaintools.com/%~1

:Run_FireFox_DirectPage_2_IP_LookUp
Start %FireFox_and_Check% %Address%
goto :EOF

:ERROR_1
echo.FireFox.exe was not found in your path!!!
goto :EOF

:ERROR_2
echo.No Address was specified!!!
echo.
echo.USAGE: %~0 google.com
goto :EOF



All times are GMT +5.5. The time now is 18:21.