Welcome to Dream.In.Code
Become an Expert!

Join 136,926 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,823 people online right now. Registration is fast and FREE... Join Now!




Batch in vista \ can't find the problem

 
Reply to this topicStart new topic

Batch in vista \ can't find the problem, Please HELP

rbchtt
10 Mar, 2008 - 02:40 PM
Post #1

New D.I.C Head
*

Joined: 10 Mar, 2008
Posts: 1

Hi, and thank you for reading that.
I wrote a small app to "change ip" on my computer in batch.
I have 3 dial-up connections, and each one should give another ip every time I disconnect and connect, but it doesn't happen so recently, so I had to do something.
I wrote this app:
*It works perfectly on XP! for 100%

http://utilitybase.com/paste/6200

*this slash: / should be: \
but I don't know whats wrong with the site I uploaded it to.


As you can see in lines 37-39,

:files_are_the_same
cd "C:/Program Files/program"
0142.bat


If the IP hasn't been changed, it goes to the next dial-up connection named as [0142.bat and 0143.bat].

[0142 and 0143 are has the same content as the app you saw, but it connects just to another connection]


The problem in Vista is that it does only the first "loop" - it doesn't go to the next file [connection...].
For example, even if the IP wasn't changed it stops in 0141 and doesn't go on to 0142 and etc.

Why is that? Why it doesn't read the IF's? How to fix that?

Thank you a lot again!!
sorry for my English, if it's not so correct. If you didn't understand something please write it, and Ill to to rephrase it.

User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/3/08 10:25PM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month