Setting the woring directory for an Application

Class library usage, coding and language questions.
fdv
Posts: 2
Joined: Mon Mar 03, 2008 1:09 pm

Setting the woring directory for an Application

Post by fdv » Mon Mar 03, 2008 1:19 pm

Hi,

I am evaluating Ranorex and I would like to know how can I set the working directory for an Application before it starts, like this:

System.Disgnostics.Process pr = new Process();
pr.StartInfo.WorkingDirectory = path;
pr.StartInfo.Arguments = args;
pr.StartInfo.FileName = exe;
pr.Start();
pr.WaitForInputIdle();

I would like to do something like this but with the Application class and if it is not possible, how can I use the Process class with Ranorex.

Thanks

fdv
Posts: 2
Joined: Mon Mar 03, 2008 1:09 pm

Post by fdv » Mon Mar 03, 2008 4:34 pm

OK, I got it. I did not understand how does the Application class work. Now, everything is clear to me.

Thanks

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

Post by Support Team » Mon Mar 03, 2008 5:19 pm

Let me just add my two cents:
The preferred way in Ranorex.Net to start an application is to use the System.Diagnostics.Process class as it is much more flexible than the Ranorex.Application.Start method.

The Ranorex.Application.Start is provided for backwards compatibility only and will be marked Obsolete from Ranorex version 1.4 on.

Regards,
Alex
Ranorex Support Team