command line parameters /pa: in quotes?

Ask general questions here.
User avatar
woha
Posts: 11
Joined: Wed Mar 06, 2019 12:56 pm

command line parameters /pa: in quotes?

Post by woha » Tue Dec 03, 2019 10:36 am

Having this problem and no soloution:
there is a cmd file with this snippet:

Code: Select all

@echo == Ranorex-Projekt an Agenten ausrollen ==
Ranorex-AAK-Simple-Sample.exe /agent:RanorexAgent_OUP2  /pa:AAK_Client_exe="C:\Program Files (x86)\aak\Kompakt.Client.exe" 
if %errorlevel% neq 0 exit /b %errorlevel%
Question:
How to set the global parameter with that path including blank chars correkt: C:\Program Files (x86)\aak\Kompakt.Client.exe
Within the exe the global param AAK_Client_exe is still on default value and not overwritten by this batch entry.
Playing direct on the dos box trying out some ideas, i see it one time running correct. This shows me, that within the project exe the global parameter is coded right. But transfering the line to the batch file there might be some extra stuff to get the quotes into the exe handed over.

Any idea to solve this?

cu
Wolf

User avatar
Support Team
Site Admin
Site Admin
Posts: 12143
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: command line parameters /pa: in quotes?

Post by Support Team » Fri Dec 06, 2019 1:47 pm

Hello Wolf,

the command line parameters seem to be correct. I tried to reproduce the issue, but it works on my end with the following code in a batch file:

Code: Select all

@echo == Ranorex-Projekt an Agenten ausrollen ==
CommandLineTest.exe /agent:RXSUPPORTAGENT /pa:GlobalParameter="C:\Program Files (x86)\aak\Kompakt.Client.exe" 
if %errorlevel% neq 0 exit /b %errorlevel%
How do you execute the batch file? Which version of Ranorex are you using? If you are not on the latest version, please download and install it and try if that makes a difference.

Regards,
Bernhard
.
Image

User avatar
woha
Posts: 11
Joined: Wed Mar 06, 2019 12:56 pm

Re: command line parameters /pa: in quotes?

Post by woha » Mon Feb 10, 2020 2:27 pm

Oh thanks. So here it will not work. Maybe there is trouble with underlines in the var-name?
/pa:AAK_Client_exe="C:\.....

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

Re: command line parameters /pa: in quotes?

Post by odklizec » Mon Feb 10, 2020 3:18 pm

Hi,

Underscore characters in global parameter name are definitely not a problem. I'm using them regularly in my projects and setting parameters from command line was never an issue. Are you using most recent Ranorex 9.2.1? Also, have you tried to reproduce the problem with a newly created solution?
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

User avatar
woha
Posts: 11
Joined: Wed Mar 06, 2019 12:56 pm

Re: command line parameters /pa: in quotes?

Post by woha » Tue Feb 11, 2020 8:17 am

Thanks Pavel for confirmation. 8)
regards
Wolf

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

Re: command line parameters /pa: in quotes?

Post by odklizec » Tue Feb 11, 2020 8:46 am

Hi,

You are welcome. So have you tried to reproduce the issue with a newly created solution?
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

User avatar
woha
Posts: 11
Joined: Wed Mar 06, 2019 12:56 pm

Re: command line parameters /pa: in quotes?

Post by woha » Tue Feb 11, 2020 9:53 am

Not tried again. Meanwhile i used a workaround. Will check this in a few weeks again.
Actually there is other work to do here.
cu
Wolf