test executable locks a file that I need to replace

Ask general questions here.
caleb
Posts: 24
Joined: Mon Jul 08, 2013 3:35 am

test executable locks a file that I need to replace

Post by caleb » Wed Oct 09, 2013 5:02 am

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

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

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

Post by Support Team » Thu Oct 10, 2013 2:05 pm

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)

caleb
Posts: 24
Joined: Mon Jul 08, 2013 3:35 am

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

Post by caleb » Sun Oct 13, 2013 8:40 pm

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.

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

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

Post by Support Team » Wed Oct 16, 2013 4:37 pm

Hello,

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

Regards,
Markus (T)