Deleteing all files from target folder as a presetup task

  • Thread starter Thread starter Smokey Grindle
  • Start date Start date
S

Smokey Grindle

I need to ensure that there are NO files in the target folder of a setup
project, I want to delete anything in the folder first before the install
takes place (all from inside the installer program of course) how would I go
about writing a script for the Setup project to perform this custom action?
any info on how to do anything like this would help a lot! I cant find much
useful stuff on google, I think I just dont know exactly what to look for..
thanks!
 
Google this:
"Walkthrough: Using a Custom Action to Create a Database During
Installation"

At first, this may be a little hard getting into the head, but once you've
got it, it's pretty awesome what you can do with these custom actions just
by writing a little .dll assembly.

Steve
 
One last question, how do you get the target location of the application? I
know its a tag, but I havent been able to find a list of them for some
reason [TARGET] is in my head but I cant figure out where to verify this,
thanks!
 
Smokey,
I'm sorry this is in C#, it's what I wrote my custom action in. Maybe you
can convert it:

this.Context.Parameters["INSTALLDIR"]

VB is probably:
me.Context.Parameters("INSTALLDIR")

HTH
Steve
Smokey Grindle said:
One last question, how do you get the target location of the application?
I know its a tag, but I havent been able to find a list of them for some
reason [TARGET] is in my head but I cant figure out where to verify this,
thanks!

Steve Long said:
Google this:
"Walkthrough: Using a Custom Action to Create a Database During
Installation"

At first, this may be a little hard getting into the head, but once
you've got it, it's pretty awesome what you can do with these custom
actions just by writing a little .dll assembly.

Steve
 
any idea where there is a list of these paramaters?

Steve Long said:
Smokey,
I'm sorry this is in C#, it's what I wrote my custom action in. Maybe you
can convert it:

this.Context.Parameters["INSTALLDIR"]

VB is probably:
me.Context.Parameters("INSTALLDIR")

HTH
Steve
Smokey Grindle said:
One last question, how do you get the target location of the application?
I know its a tag, but I havent been able to find a list of them for some
reason [TARGET] is in my head but I cant figure out where to verify this,
thanks!

Steve Long said:
Google this:
"Walkthrough: Using a Custom Action to Create a Database During
Installation"

At first, this may be a little hard getting into the head, but once
you've got it, it's pretty awesome what you can do with these custom
actions just by writing a little .dll assembly.

Steve

I need to ensure that there are NO files in the target folder of a setup
project, I want to delete anything in the folder first before the
install takes place (all from inside the installer program of course)
how would I go about writing a script for the Setup project to perform
this custom action? any info on how to do anything like this would help
a lot! I cant find much useful stuff on google, I think I just dont know
exactly what to look for.. thanks!
 
You know Smokey, I can remember how I figured that out, but, I'm thinking
you might be able to get the list by walking through the Parameters
collection and logging them, either to a log file or something.

Steve
Sorry I didn't check this over the weekend.


Smokey Grindel said:
any idea where there is a list of these paramaters?

Steve Long said:
Smokey,
I'm sorry this is in C#, it's what I wrote my custom action in. Maybe you
can convert it:

this.Context.Parameters["INSTALLDIR"]

VB is probably:
me.Context.Parameters("INSTALLDIR")

HTH
Steve
Smokey Grindle said:
One last question, how do you get the target location of the
application? I know its a tag, but I havent been able to find a list of
them for some reason [TARGET] is in my head but I cant figure out where
to verify this, thanks!

Google this:
"Walkthrough: Using a Custom Action to Create a Database During
Installation"

At first, this may be a little hard getting into the head, but once
you've got it, it's pretty awesome what you can do with these custom
actions just by writing a little .dll assembly.

Steve

I need to ensure that there are NO files in the target folder of a
setup project, I want to delete anything in the folder first before the
install takes place (all from inside the installer program of course)
how would I go about writing a script for the Setup project to perform
this custom action? any info on how to do anything like this would help
a lot! I cant find much useful stuff on google, I think I just dont
know exactly what to look for.. thanks!
 
Back
Top