Compatible Support Forums: Network connection able to start via batch file?

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Network connection able to start via batch file?

#1 User is offline   Cool Hand 

  • stranger
  • Group: Members
  • Posts: 11
  • Joined: 30-January 02

Posted 10 October 2004 - 08:31 AM

I am running a batchfile that starts firewall, antivirus and some other programs at once. I would also like it to start my network connection.
I already tried executing a shortcut of my network connection in that batch file, but it wont work. If I click the short cut in explorer, the connection activates with no problems, but not if I add it to the batch file.
Am I out of luck and its not possible to start connections with a batch file?
0

#2 User is offline   snakefoot 

  • journeyman
  • Group: Members
  • Posts: 79
  • Joined: 09-November 01

Posted 10 October 2004 - 04:10 PM

Guess you are using XP, maybe this can help ya:
Quote:
Create a batch file containing these three lines:

rasdial ISPname username password
"C:\Program Files\Internet Explorer\IEXPLORE.EXE"
exit


Notes:

The ISPname must match the name of your dial-up as listed in Network
Connections. username and password as per login for ISP.

More Info RasDial
0

#3 User is offline   Cool Hand 

  • stranger
  • Group: Members
  • Posts: 11
  • Joined: 30-January 02

Posted 10 October 2004 - 04:56 PM

It is no dial-up connection, its a WLAN connection (soon to be a normal LAN connection). I cant find that .pbk file in my System32\ras folder either, as described on the Microsoft link.
I tried it as you described but the only thing that will happen is that the MSIE will start.
0

#4 User is offline   iradi8 

  • stranger
  • Group: Members
  • Posts: 1
  • Joined: 09-December 04

Posted 09 December 2004 - 03:50 PM

You need to use the Devcon program to enable and disable network connections from the command line. Devcon is listed as a "Command Line Utility Alternative to Device Manager". I used it in a similar situation to enable the SonicWall VPN Adapter on our companies laptops. The SVA caused problems if left to run when not needed, so I enabled and disabled it using a batch file that users would run to connect and disconnect from the VPN.

The command to enable the connection looked like this:
Quote:
devcon enable *rc_virtualadapter


And the command to disable the connection looked like this:
Quote:
devcon disable *rc_virtualadapter


I am not sure how I found out the connections "name" but if you google devcon.exe you should be able to find it.

You can get more information, and download devcon, from microsoft at http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q311272

Good Luck, and happy hacking! laugh
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users