473,396 Members | 1,971 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Deleteing all files from target folder as a presetup task

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!
Oct 20 '06 #1
6 1550
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

"Smokey Grindle" <no****@dontspamme.comwrote in message
news:eM**************@TK2MSFTNGP02.phx.gbl...
>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!

Oct 20 '06 #2
awesome thanks, definatly was looking for the wrong thing in google..

"Steve Long" <St**********@NoSpam.comwrote in message
news:up**************@TK2MSFTNGP03.phx.gbl...
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

"Smokey Grindle" <no****@dontspamme.comwrote in message
news:eM**************@TK2MSFTNGP02.phx.gbl...
>>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!


Oct 20 '06 #3
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" <St**********@NoSpam.comwrote in message
news:up**************@TK2MSFTNGP03.phx.gbl...
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

"Smokey Grindle" <no****@dontspamme.comwrote in message
news:eM**************@TK2MSFTNGP02.phx.gbl...
>>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!


Oct 20 '06 #4
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" <no****@dontspamme.comwrote in message
news:u%****************@TK2MSFTNGP02.phx.gbl...
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" <St**********@NoSpam.comwrote in message
news:up**************@TK2MSFTNGP03.phx.gbl...
>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

"Smokey Grindle" <no****@dontspamme.comwrote in message
news:eM**************@TK2MSFTNGP02.phx.gbl...
>>>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!



Oct 20 '06 #5
any idea where there is a list of these paramaters?

"Steve Long" <St**********@NoSpam.comwrote in message
news:ei**************@TK2MSFTNGP05.phx.gbl...
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" <no****@dontspamme.comwrote in message
news:u%****************@TK2MSFTNGP02.phx.gbl...
>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" <St**********@NoSpam.comwrote in message
news:up**************@TK2MSFTNGP03.phx.gbl...
>>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

"Smokey Grindle" <no****@dontspamme.comwrote in message
news:eM**************@TK2MSFTNGP02.phx.gbl...
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!



Oct 21 '06 #6
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" <no****@nospam.netwrote in message
news:uw**************@TK2MSFTNGP02.phx.gbl...
any idea where there is a list of these paramaters?

"Steve Long" <St**********@NoSpam.comwrote in message
news:ei**************@TK2MSFTNGP05.phx.gbl...
>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" <no****@dontspamme.comwrote in message
news:u%****************@TK2MSFTNGP02.phx.gbl...
>>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" <St**********@NoSpam.comwrote in message
news:up**************@TK2MSFTNGP03.phx.gbl...
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

"Smokey Grindle" <no****@dontspamme.comwrote in message
news:eM**************@TK2MSFTNGP02.phx.gbl...
>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!
>




Oct 23 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Laurent | last post by:
Hi all, I have de following application to do : I receive several .csv files from another application in a determined folder of my PC. Those files are named with the format log1.csv...
5
by: gwarning! | last post by:
Goal: Have multiple text files, each of various lengths, be concatenated together into one final consolidated text file. Problem: Since the names of the files to be concatenated can change from...
2
by: HaukiDog | last post by:
Hi, I am trying to set up my C# web project to be compiled by NANT. Everything compiles and works fine within the IDE. I have a created a NANT build file which has a simple project tag, like...
2
by: **Developer** | last post by:
I have a folder on my Desktop that has the following properties: Type: Folder Target: \\MM\backup Comment: \\MM\\Backup When I execute: Directory.GetFiles(NewDirectory & "\")
4
by: Khalique | last post by:
I have built a web service whose purpose is to copy files from a secure place to client machine and vice versa. The problem I am having is perhaps related to permissions and access rights. For...
0
by: Henning Krause [MVP - Exchange] | last post by:
Hello, Environment: Visual Studio 2005 SP1, Web Deployment Projects installed I hava Web Application project (updated from Visual Studio 2003) and a Web Deployment for that web application....
2
by: Max2006 | last post by:
Hi, After I right-click on my web application project file and choose "Publish ." and do the publishing, the result publishable files does not include the *.ashx files. Is it by design? How...
3
by: Robert Dunlop | last post by:
I am using Microsoft Visual Studio 2005 for development of an ASP.NET site, and I have a problem that greatly effects my workflow at times. It seems that after I upload new files anywhere within...
4
Chrisjc
by: Chrisjc | last post by:
Good evening, I was wondering if anyone knew of a way or something to help me out with an issue I been dealing with lately, I have several sites in an Active Directory environment across a WAN....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.