Page 1 of 1

Start .bat file from Ranorex

Posted: Thu Apr 05, 2018 2:44 pm
by Stipe13
Hi,

I've tried to start the .bat file using "Run application" but it is not possible.
I can record double click on the icon, but I just want to execute it before continuing the test.
How can I do it?

Re: Start .bat file from Ranorex

Posted: Thu Apr 05, 2018 2:51 pm
by odklizec
Hi,

Run application should work just fine with bat. What EXACTLY is not possible? Make sure you set correct path to bat and also its working directory path!

Re: Start .bat file from Ranorex

Posted: Fri Apr 06, 2018 8:43 am
by Stipe13
I'm using the batch script to turn ON and configure my NIC cards.
Batch scrip code:

Code: Select all

@echo off
title Configure NIC IP addresses Browser -> Device
echo Set IP address for NIC2
netsh interface set interface "Local Area Connection 2" admin=enable
netsh interface ip set address name="Local Area Connection 2" source=static addr=192.168.150.20 mask=255.255.255.224 gateway=none
echo Set IP address for NIC3
netsh interface set interface "Local Area Connection 3" admin=enable
netsh interface ip set address name="Local Area Connection 3" source=static addr=192.168.0.50 mask=255.255.255.0 gateway=none
First problem was due to administrator rights, but now I see different kind of problem.
When I run the test, the screen resolution gets messed up and ranorex studio window is moved to second screen.
Because of this, my other tests are not executed correctly.