Page 1 of 1

test executable locks a file that I need to replace

Posted: Wed Oct 09, 2013 5:02 am
by caleb
Hi

I have a script that attempts to uninstall our application before it does a clean install of our nightly build.

However after using Host.Local.RunApplication to execute the uninstaller then later when the installer is run it throws an error because it cannot replace the uninstaller file. It cannot do this because it is locked by the test executable which called Host.Local.RunApplication even though the uninstaller has long finished execution.

Can anyone tell me a way to release the file so it can be replaced by the installer without closing the instance of the test executable?

Thanks

Caleb

Re: test executable locks a file that I need to replace

Posted: Thu Oct 10, 2013 2:05 pm
by Support Team
Hello,

Do you automate a WinForms application?
Ranorex loads DLLs of a WinForms application during test execution.
Therefore, parts of your application stays in memory.

Would it be an option for you to split up your test project?

Regards,
Markus (T)

Re: test executable locks a file that I need to replace

Posted: Sun Oct 13, 2013 8:40 pm
by caleb
It is a winforms app.

If ranorex has to close to release that file then I will probably have to create a solution to uninstall the file, compile that and have my install application run the uninstall solution exe using host.local.runapplication

Unless you can think of a simpler solution.

Re: test executable locks a file that I need to replace

Posted: Wed Oct 16, 2013 4:37 pm
by Support Team
Hello,

Sorry, but I can't think of a simpler solution to do that using Ranorex.

Regards,
Markus (T)