PDA

View Full Version : i don't know where write my Unistall commands



Doppiapunta
05-05-2004, 03:24 PM
I made a my own installshield scripted project!
I want to backup existing files inside the TARGETDIRECTORY before installshield overwrite them.
They are into may folders and most of them have common extension so i decided to make several.bat fils to rename them before being overwritten.
Bat files contain many commands like this one:




ren *.etc *.put



I put theese .bat files into SUPPORT FILES and then i put into installscript code to move them from SUPPORT DIRECTORY to TARGET DIRECTORY.
Then i also scripted the command that executes theese .bat files before MOVE DATA.
Well everything works fine, oldfiles are renamed and the new one are installed well.

Well now i need also to set the inverse process.
I mean...i want to write commands in order that when unistalling my tool the new files will be removed and the old-ones renamed to their original extension.
I made other .bat files with the inverse command and i put them into SUPPORT FILES Section.

Well now the problems is:

1) what is that feature where can i set my commands?
I mean it is UnInstallingFeature or another one line UnInstalled feature or UnIstallin?

I mean there are ShownUi feature, Installing feature OnFirstUi....and so...what is feature i have to use for writing my commands?

Please help me..in theese last days i learned more about scripting but i don't what i have to use for Unistaling process in order to rename again the old files after removing the new ones.

Thanks a lot for your precious help.
See you soon
Cheers

Diego

crehbein
05-06-2004, 10:37 AM
Originally posted by Doppiapunta

I mean there are ShownUi feature, Installing feature OnFirstUi....and so...what is feature i have to use for writing my commands?

If I understand you correctly, you're looking for an appropriate event to run several commands after uninstalling?

There are OnMaintUIBefore and OnMainUIAfter events that you can override and customize, just like OnFirstUIBefore & After. Use the pulldown at the top of the InstallScript view and check out the "After Move Data" events.

Good luck!

Doppiapunta
05-06-2004, 12:36 PM
Well i write down my commands in thiss ection:




//---------------------------------------------------------------------------
// The UnInstalling event is sent after the feature DefaultFeature
// is uninstalled.
//---------------------------------------------------------------------------

export prototype DefaultFeature_UnInstalled();
function DefaultFeature_UnInstalled()
begin

end;



And everything works fine....i need to uninstall defaultfeature installed before renaming the old files!
What do you think about?
Thanks alot for your precious help and interest!
I hope you answer to me

See ya
Cheers
Diego

crehbein
05-06-2004, 01:11 PM
That should work, too.