0

After converting the bat file to exe, the code doesn't work anymore. Need the exe to run on Windows XP. Why the code doesn't work after convertion to exe? Here is the code:

@rasdial VPN user password
@setlocal
@for /f "tokens=1-2 delims=:" %%i in ('ipconfig ^| find "IP Address" ^| find "172.23"') do set GETIP=%%j
@route add 172.21.233.0 mask 255.255.255.0 %GetIp%
@endlocal

Thank you.

  • 1
    Which tool are you using to convert the bat to an exe? There are many converters out there but afaik none of them works propperly. – MichaelS Mar 11 '15 at 10:47
  • You might find [this self-answered question page](http://stackoverflow.com/q/28174386/1683264) useful. – rojo Mar 11 '15 at 14:32

1 Answers1

2
  1. Stop hiding output with @.

  2. Put a pause at the last line.

  3. Read what it says.

Serenity
  • 46
  • 1
  • Read error messages. That's always a sensible step in troubleshooting, but not followed often enough. – rojo Mar 11 '15 at 14:47