|
Answer» Hi All,
I am new to creating batch file and need help with a basic batch file CREATION. I guess it can be achieved in 2-3 lines.
I have CREATED a shortcut of the DUN object on my desktop (using a windows 7 machine) and am able to launch the DUN object with the following command rasdial.exe C:\WINDOWS\Desktop\MyISP.lnk
What I want is a pause of 25 seconds before i launch the VPN program from my laptop. Can someone please help with the pause and launching of the vpn program command line.
Thanks in advance.
Code: [Select]start "" "c:\path to folder\rasdial.exe" C:\WINDOWS\Desktop\MyISP.lnk timeout /T 25 > nul start "" "c:\path to folder\somevpnclient.exe"Thanks for the quick help/ response. My VPN i sloading perfectly after the pause, but unfortunately My DUN is not launching/ dialing/ connecting automatically. I have now moved the DUN short link on c:\MyISP.lnk. Can you please suggest? Thanks in advance.
start "" "c:\path to folder\rasdial.exe" C:\WINDOWS\Desktop\MyISP.lnk timeout /T 25 > nul start "" "c:\path to folder\somevpnclient.exe"Please post the exact code you are using in the batch file. Most of us here are not omniscient.I have TESTED the VPN code and it worked fine. So i was just testing the following code to start the DUN object with the following code.
start "" rasdial.exe "C:\MyISP.lnk"
ThanksYou don't need to specify rasdial. Rasdial does take command line options but you already have that all specified in your Shortcut Link.
Just use the Shortcut link
Code: [Select]start "" "C:\MyISP.lnk" If you have a PHONE book entry for your connection you could then use the RASDIAL command as well.
Code: [Select]rasdial "office 2" If you wanted to do it completely from scratch you could just do rasdial username password /phone:9995551234
Code: [Select]C:\Documents and Settings\Squash\Desktop>rasdial /? USAGE: rasdial entryname [username [password|*]] [/DOMAIN:domain] [/PHONE:phonenumber] [/CALLBACK:callbacknumber] [/PHONEBOOK:phonebookfile] [/PREFIXSUFFIX]
rasdial [entryname] /DISCONNECT
rasdial
|