Mombu the Microsoft Forum

  Mombu the Microsoft Forum > Microsoft > Windows 2003 Server (TECHNET) > If install is interrupted ...delete folder created during instal


User Name
Password
REGISTER NOW! Search Today's Posts Mark Forums Read


Reply
 
Thread Tools Search this Thread Display Modes
1 13th July 09:28
rucha
External User
 
Posts: 1
Default If install is interrupted ...delete folder created during instal



Hi all,

I am creating a folder through my custom action DLL ...I execute this custom
action before InstallFiles action.. (I want to create the folder befor
actually install of the files)...

Now the problem is that if I start installing and before completion i click
cancel, then the folder gets created unnecessarily even when install is
interrupted...
just as all other changes are roll backed when install is interrupted...i
want that folder to get deleted in this case...
i don't know how to handle this problem...

i tried creating folder through CreateFolder table also(and put the entry in
RemoveFile table)...but it's not working...maybe my way is incorrect..
is there a standard way to do this? how does msi handle this problem ?

It will be great if someone helps me out...

Thanks,
Rucha
  Reply With Quote
SPONSORED LINKS BY GOOGLE

 


2 13th July 09:28
dennis bareis
External User
 
Posts: 1
Default If install is interrupted ...delete folder created during instal



Hi,

Why not use the CreateFolder table and remove the DLL? If you did I assume
things would work (or we'd have a Windows Installer bug to report).

Is the DLL running as a deferred CA (if not then that is your problem)?

Have you got a roll back CA set up for it? If not then its not going to get
removed.

Bye,
Dennis

Dennis Bareis [MVP] (dbareis@KillSpam.gmail.com)
http://users.cyberone.com.au/dbareis/index.htm
Freeware Windows Installer creation tool (+ "ORCA automation"):
http://users.cyberone.com.au/dbareis/makemsi.htm
  Reply With Quote
3 13th July 09:28
rucha
External User
 
Posts: 1
Default If install is interrupted ...delete folder created during in


Hi ,

Thank you for your quick reply...but actually I didn't quite get that...

I tried using CreateFolders table to create a folder...nothing was copied to
it....if install failed..this folder got deleted automatically...

1)So now I tried using the CreateFolders table.....wherein I have to make
entry for
dir and it's corresponding component say
--------------------------------------------------------------------------------------Directory Component
MainDir Comp1

I also made entries in component table,Directory table and FeatureComponents
table for the same..msi got validated without any errors(used orca)..
Now through my custom action...I am creating a SubFolder at runtime (this i
can't do using createfolders since i want this to be created
dynamically)...furher using the same dll .I am copying some files inside this
SubFolder ....
I am executing this action before InstallFiles (this is my requirement)...

Now if I interrupt this install....all the other folders get deleted
automatically due to rollback...except the MainFolder which still contains
the SubFolder along with the copied files...

2)How will deferred custom action help me in this case where I want to create
folder and copy files at runtime before the actual installation of files
start??
I am new to Installer and don't know the use of Deferred custom
actions....I tried
reading help for the samebut didn't quite undersand it...
could you tell me about how I can use this deferred custom action ...if
this is the
only way to achieve what I am trying to...

3)I may write a custom action which explicitly deletes this MainFolder and
all it's
contents but then I would have to do that only if install fails/gets
interrupted...
How do I specify this condition of Msi gtting interrupted in Custom Action
table...will NOT Installed work??...but then it will get executed during
normal
install too...

I hope you will help me out in this...
Thanks again,

Rucha
  Reply With Quote
4 13th July 09:28
dennis bareis
External User
 
Posts: 1
Default If install is interrupted ...delete folder created during in


Hi,


I assume the name changes, this does not stop you creating an immediate CA which sets
up a property which alters where a directory key points to.

Deletion only occurs if folder completely empty,

In the original context only that if your custom action were "immediate" it would
not be executing it when you may think it is and there is no rollback.

See my page at:

http://users.cyberone.com.au/dbareis...om_actions.htm

for some links and specifically try this one:

http://www.installsite.org/pages/en/...0108/index.htm

Add 1024 (set that bit) to the CA type.


You would set up an earlier rollback CA (see the links above) whose task
is to clean up if a process downstream fails.


Bye,
Dennis
Dennis Bareis [MVP] (dbareis@KillSpam.gmail.com)
http://users.cyberone.com.au/dbareis/index.htm
Freeware Windows Installer creation tool (+ "ORCA automation"):
http://users.cyberone.com.au/dbareis/makemsi.htm
  Reply With Quote
5 13th July 09:28
rucha
External User
 
Posts: 1
Default If install is interrupted ...delete folder created during in


Hi,

Thank you so much...
Now most of my doubts have got cleared...those sites are really good...
I will try those methods which you have mentioned and keep you updated about
the progress...
Thanks,

Rucha
  Reply With Quote
SPONSORED LINKS BY GOOGLE

 


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes







Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
Also visit Ogoun the Usenet Archive
666