Start .bat file from Ranorex

Ask general questions here.
Stipe13
Posts: 3
Joined: Tue Jan 16, 2018 2:24 pm

Start .bat file from Ranorex

Post by Stipe13 » Thu Apr 05, 2018 2:44 pm

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?

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3937
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Start .bat file from Ranorex

Post by odklizec » Thu Apr 05, 2018 2:51 pm

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!
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

Stipe13
Posts: 3
Joined: Tue Jan 16, 2018 2:24 pm

Re: Start .bat file from Ranorex

Post by Stipe13 » Fri Apr 06, 2018 8:43 am

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.