calling msiexec

Class library usage, coding and language questions.
yam
Posts: 15
Joined: Thu May 04, 2017 6:37 am

calling msiexec

Post by yam » Wed Feb 28, 2018 1:51 pm

In my code I'm calling msiexec twice. Once for installation and once for upgrade.
When I'm running msiexec via command line, the upgrade works fine and I can see that files are replaced.
But, when I run it via Ranorex, upgrade is finished sucessfully but files are not replaced!
I using the same syntax for both command line and Ranorex.

Ranorex code:
Process process = new Process();
process.StartInfo.FileName = "msiexec.exe";
if (bIsUpgrade == false)
{
process.StartInfo.Arguments = " /i \""+ msipath + "\" /qn";
}
else
{
process.StartInfo.Arguments = " /i \""+ msipath + "\" REINSTALL=ALL REINSTALLMODE=vomus /qn";
}
process.StartInfo.WorkingDirectory = @"C:\temp\";
process.StartInfo.Verb = "runas";
process.Start();
process.WaitForExit(60000);

User avatar
RobinHood42
Posts: 239
Joined: Fri Jan 09, 2015 3:24 pm

Re: calling msiexec

Post by RobinHood42 » Fri Mar 02, 2018 1:51 pm

Hey,

are you starting ranorex with the same permissions as your command line. For me it sounds like an permission issue.

Cheers,
Robin