manuk Posted December 29, 2004 Share Posted December 29, 2004 I use an app in myoffice that requires me to disable the network before launching it. Once the app is launched, I can enable the network again.As a workarpund, I created a batch file that disables the network, launches the app and enables the network again. I used the following code:@echo onipconfig /release "C:\Program Files\RoboHelp Office\RoboHTML\RoboHTML.exe"ipconfig /renewSo whenever i want to start the app, i double-click the batch file and not the EXE. Now this works the app gets launched automatically. Though there are two issues:1. The windows command prompt window does not close after the app is launched. 2. The network does not get enabled. a small yellow triangle displays adjacent to the network icon in the system tray. I then have to enable the network myself.Can anyone tell me how I can modify this batch file? Or is there any other way of doing this?Pl. help Link to comment Share on other sites More sharing options...
MCT Posted December 29, 2004 Share Posted December 29, 2004 put the command exit @ the end of your batch file to close it the network thing im not sure about Link to comment Share on other sites More sharing options...
manuk Posted December 29, 2004 Author Share Posted December 29, 2004 Thanks MCT.You know someone who can help em with the network thing? Link to comment Share on other sites More sharing options...
MCT Posted December 29, 2004 Share Posted December 29, 2004 someone will come around & post if they know Link to comment Share on other sites More sharing options...
slayer69 Posted December 29, 2004 Share Posted December 29, 2004 FIrst up ipconfig /release is a command used to release your IP address only. Renew just renews it. It doesn't disable the network. Obviously if you release your IP you won't be able to browse the network, but it doesn't mean it's disabled.I'm not sure which command will disable your LAN connection but I'll look it up. Link to comment Share on other sites More sharing options...
slayer69 Posted December 29, 2004 Share Posted December 29, 2004 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.The command to enable the connection looked like this: devcon enable *rc_virtualadapter And the command to disable the connection looked like this: 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?...b;EN-US;Q311272 Link to comment Share on other sites More sharing options...
manuk Posted December 29, 2004 Author Share Posted December 29, 2004 thanks all. but i found what i was looking for:You can disable and enable network using the following commands:C:\> ipconfig /releaseC:\> ipconfig /renew Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now