"Apply Uninstall" removes files called by "Move Local files"

Got a problem you cannot solve? Try here.
Post Reply
ttcn2k4
Posts: 31
Joined: Wed Feb 01, 2012 10:04 am

"Apply Uninstall" removes files called by "Move Local files"

Post by ttcn2k4 »

Hi:

I need help: could not find way to keep the backup file after calling the "Apply Uninstall". This command didn't just "undo" whatever action of "Apply Install". It simply deletes files.

Here is the situation. I use Native engine in IA Studio 2012:
* To install, I coded:
- Install Files A to targetdir
- Move local files B to B.backup (in targetdir)
- Move local files A to B (in target)

The problem is that all the files (B and B.backup) are removed by the command "Apply Uninstall" during the uninstallation. Just wonder if there is any way that I can keep my B.backup file untouched, ie. prevent it being deleted so that I can rename it back to its original name during the uninstallation?

TIA
Nhan
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: "Apply Uninstall" removes files called by "Move Local fi

Post by FrancescoT »

Dear Nhan,

are you using NATIVE ENGINE just for "Move Local Files" only?

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
ttcn2k4
Posts: 31
Joined: Wed Feb 01, 2012 10:04 am

Re: "Apply Uninstall" removes files called by "Move Local fi

Post by ttcn2k4 »

No. I declared the variable NATIVE ENGINE to TRUE at the beginning of the msicode.

Nhan
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: "Apply Uninstall" removes files called by "Move Local fi

Post by FrancescoT »

Dear Nhan,

because I have not quite clear how you are doing it, can you send me just a very basic sample to work on?

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
ttcn2k4
Posts: 31
Joined: Wed Feb 01, 2012 10:04 am

Re: "Apply Uninstall" removes files called by "Move Local fi

Post by ttcn2k4 »

Hi Francesco:

I attached a test setup here for you to test. To test it, providing you have a folder named "IA_Test" in C:\temp with a single file "FileA.jar". The setup only transfers a file to the target folder (which is C:\temp\IA_Test) using Design tab. Then, I called 2 commands to do the rename:

Move Local Files $TARGETDIR$\FileA.jar to $TARGETDIR$\FileA_backup.jar
Move Local Files $TARGETDIR$\Testfile.jar to $TARGETDIR$\FileA.jar

To make sure it clear, I attached 3 files:
1) IA_Test.zip: For you to unzip it to C:\temp
2) IA_Temp.png: Image shows the content of IA_Test after running the test.msi
3) Test.zip: the whole IA project

What I want is after the installation, the IA_Test will contain again its original file, ie. the FileA.jar.

Thanks
Nhan
IA_Test.zip
to be placed in C:\temp
(1.61 MiB) Downloaded 661 times
IA_Temp.png
IA_Temp.png (20.12 KiB) Viewed 11346 times
IA_Test.zip
to be placed in C:\temp
(1.61 MiB) Downloaded 661 times
Attachments
Test.zip
(5.17 MiB) Downloaded 564 times
ttcn2k4
Posts: 31
Joined: Wed Feb 01, 2012 10:04 am

Re: "Apply Uninstall" removes files called by "Move Local fi

Post by ttcn2k4 »

Correction: What I want is after the Uninstallation, the IA_Test will contain again its original file, ie. the FileA.jar.

With the setup, the folder is empty when the uninstallation finished.

Thanks
Nhan
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: "Apply Uninstall" removes files called by "Move Local fi

Post by FrancescoT »

Perfect!

Let me check it.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: "Apply Uninstall" removes files called by "Move Local fi

Post by FrancescoT »

Dear Nhan,

let me know if the attached project solves your issue.

Regards
Attachments
nhan.zip
(5.28 MiB) Downloaded 621 times
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
ttcn2k4
Posts: 31
Joined: Wed Feb 01, 2012 10:04 am

Re: "Apply Uninstall" removes files called by "Move Local fi

Post by ttcn2k4 »

yes, it works, but it leaves the commands "Move local files" unverified. Just wonder if there is any way to check if they performs sucessfully? I used to use the variable Sucessful from "apply install" to verify.

Thanks
Nhan
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: "Apply Uninstall" removes files called by "Move Local fi

Post by FrancescoT »

Dear Nhan,

Just after the move local files command, you could use the "Does File Exist" command and then verify the result variable.

It should work.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
ttcn2k4
Posts: 31
Joined: Wed Feb 01, 2012 10:04 am

Re: "Apply Uninstall" removes files called by "Move Local fi

Post by ttcn2k4 »

Thanks. It's also a way to do :-)

Nhan
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: "Apply Uninstall" removes files called by "Move Local fi

Post by FrancescoT »

Of course the easiest :mrgreen:

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Post Reply