Page 1 of 1
"Apply Uninstall" removes files called by "Move Local files"
Posted: Mon May 28, 2012 7:59 am
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
Re: "Apply Uninstall" removes files called by "Move Local fi
Posted: Mon May 28, 2012 8:57 am
by FrancescoT
Dear Nhan,
are you using NATIVE ENGINE just for "Move Local Files" only?
Regards
Re: "Apply Uninstall" removes files called by "Move Local fi
Posted: Mon May 28, 2012 9:18 am
by ttcn2k4
No. I declared the variable NATIVE ENGINE to TRUE at the beginning of the msicode.
Nhan
Re: "Apply Uninstall" removes files called by "Move Local fi
Posted: Mon May 28, 2012 9:57 am
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
Re: "Apply Uninstall" removes files called by "Move Local fi
Posted: Mon May 28, 2012 2:34 pm
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 (20.12 KiB) Viewed 11339 times
- IA_Test.zip
- to be placed in C:\temp
- (1.61 MiB) Downloaded 661 times
Re: "Apply Uninstall" removes files called by "Move Local fi
Posted: Mon May 28, 2012 2:37 pm
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
Re: "Apply Uninstall" removes files called by "Move Local fi
Posted: Tue May 29, 2012 8:48 am
by FrancescoT
Perfect!
Let me check it.
Regards
Re: "Apply Uninstall" removes files called by "Move Local fi
Posted: Tue May 29, 2012 9:15 am
by FrancescoT
Dear Nhan,
let me know if the attached project solves your issue.
Regards
Re: "Apply Uninstall" removes files called by "Move Local fi
Posted: Tue May 29, 2012 10:12 am
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
Re: "Apply Uninstall" removes files called by "Move Local fi
Posted: Tue May 29, 2012 10:49 am
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
Re: "Apply Uninstall" removes files called by "Move Local fi
Posted: Wed May 30, 2012 4:25 am
by ttcn2k4
Thanks. It's also a way to do
Nhan
Re: "Apply Uninstall" removes files called by "Move Local fi
Posted: Wed May 30, 2012 8:12 am
by FrancescoT
Of course the easiest
Regards