Discussion:
object model for deployment projects
(too old to reply)
Brian Knittel
2008-05-27 19:17:04 UTC
Permalink
I'd like to use a script to add items to a VS 2008 deployment project.
Specifically, I have a large number of shortcut items to add to the "File
System on Target Machine; User's Start Menu" section. I'd like to use a
script to do this. Is the deployment object type exposed in the Visual
Studio object model? I'm looking at the DTE.Project item that represents the
deployment project in the "watch" window, but its ProjectItems list appears
to be empty. Any pointers would be helpful. For example, a script fragment
that uses "for each" to scan through the existing shortcut entries would
definitely be enough to get me going. I hope.

Just to be clear, I'm NOT talking about writing a script to install
shortcuts on the target machine as part of the install process. I'm talking
about writing a script to use one time, to add Shortcut items to the Visual
Studio PROJECT, which will then build the installler application.

Thanks,
Brian
legalize+ (Richard)
2008-05-27 21:04:37 UTC
Permalink
[Please do not mail me a copy of your followup]
Post by Brian Knittel
I'd like to use a script to add items to a VS 2008 deployment project.
Whoooo boy.

I hate to say it, but deployment projects just suck. They just do.

WiX <http://wix.sourceforge.net> is vastly superior to deployment
projects. They actually fix the bugs! Plus generating content
programmatically for a WiX project is trivial since its just XML and
writing out XML is easy in .NET or any other language.

Yes, its probably more work than you were planning on right now to
convert your project to WiX, but its really what you want to do. The
next release of VS.NET will support WiX projects right out of the box
and its what Office *and* VS.NET use to install themselves anyway.

The deployment projects are just crap.

I say that as someone that has used them plenty and reported plenty of
bugs on them, as listed here:
<http://www.xmission.com/~legalize/msi/known-bugs-2003.html>

They never fixed any of those bugs, even though I reported them years
ago. They simply closed them all without fixing any of them.
--
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
<http://www.xmission.com/~legalize/book/download/index.html>

Legalize Adulthood! <http://blogs.xmission.com/legalize/>
Brian Knittel
2008-05-27 21:30:41 UTC
Permalink
So you what you're saying is, "Run for the hills!" Well, that wasn't the
answer I was hoping for, but it's not unexpected either.

Actually if I decide to stay with the VS tool, I think I can do it by
writing a quick script to duplicate the XML for the existing
one or two shortcuts I created manually, and paste the results into the
.vdproj file. This is a one-off thing, I just don't want to
have to manually create 40 or 50 shortcuts when I already have file and
shortcut name data in a text file.

But in the longer term, I should be looking at WiX and Votive. I already
ran into one irritating issue with the VS deployment tool: the installer it
produces can't be configured to permit overwriting an existing installation.
In this particular installation, overwriting an existing install is
appropriate. Presumably WiX will let me set a property to permit this.

Thanks for your input, I appreciate it.
Brian
legalize+ (Richard)
2008-05-27 21:40:22 UTC
Permalink
[Please do not mail me a copy of your followup]
Post by Brian Knittel
Actually if I decide to stay with the VS tool, I think I can do it by
writing a quick script to duplicate the XML for the existing
one or two shortcuts I created manually, and paste the results into the
.vdproj file. This is a one-off thing, I just don't want to
have to manually create 40 or 50 shortcuts when I already have file and
shortcut name data in a text file.
Well, there are a couple dangers with this. First, IIRC, the .vdproj
file isn't *quite* XML. Second, the .vdproj file format is
undocumented and while it may look simple enough to insert some text
into it, when I've tried that, it blew up in my face with all sorts of
problems. IIRC, there is an object model for the project type, but
that also is undocumented so there isn't a way to reliably add stuff
to it with the automation model either.

I wish that I *could* recommend deployment projects to people because
they're already out there in existing versions of VS.NET. But they
are so problematic that I can't recommend them in good faith to anyone
for any purpose other than one-time throwaway installers.
--
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
<http://www.xmission.com/~legalize/book/download/index.html>

Legalize Adulthood! <http://blogs.xmission.com/legalize/>
unknown
2009-11-25 09:27:01 UTC
Permalink
I have been searching for a similar solution for the past few days and have a hit a brick wall. Finding this thread was almost a "eureka" moment until I read it through.

I want to be able to programmatically add files to the target file system.

Did you get anywhere with this or did you go Wix as suggested?



legalize+jeeve wrote:

[Please do not mail me a copy of your followup]"Brian Knittel"
27-May-08

[Please do not mail me a copy of your followup

"Brian Knittel" <***@quarterbyte.com> spake the secret cod
<483c7d83$0$34526$***@news.sonic.net> thusly

Well, there are a couple dangers with this. First, IIRC, the .vdpro
file isn't *quite* XML. Second, the .vdproj file format i
undocumented and while it may look simple enough to insert some tex
into it, when I've tried that, it blew up in my face with all sorts o
problems. IIRC, there is an object model for the project type, bu
that also is undocumented so there isn't a way to reliably add stuf
to it with the automation model either

I wish that I *could* recommend deployment projects to people becaus
they're already out there in existing versions of VS.NET. But the
are so problematic that I can't recommend them in good faith to anyon
for any purpose other than one-time throwaway installers
--
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for downloa
<http://www.xmission.com/~legalize/book/download/index.html

Legalize Adulthood! <http://blogs.xmission.com/legalize/>

Previous Posts In This Thread:

On 27 May 2008 15:17
Brian Knittel wrote:

object model for deployment projects
I'd like to use a script to add items to a VS 2008 deployment project.
Specifically, I have a large number of shortcut items to add to the "File
System on Target Machine; User's Start Menu" section. I'd like to use a
script to do this. Is the deployment object type exposed in the Visual
Studio object model? I'm looking at the DTE.Project item that represents the
deployment project in the "watch" window, but its ProjectItems list appears
to be empty. Any pointers would be helpful. For example, a script fragment
that uses "for each" to scan through the existing shortcut entries would
definitely be enough to get me going. I hope

Just to be clear, I'm NOT talking about writing a script to install
shortcuts on the target machine as part of the install process. I'm talking
about writing a script to use one time, to add Shortcut items to the Visual
Studio PROJECT, which will then build the installler application

Thanks
Brian

On 27 May 2008 17:04
legalize+jeeve wrote:

[Please do not mail me a copy of your followup]"Brian Knittel"
[Please do not mail me a copy of your followup

"Brian Knittel" <***@quarterbyte.com> spake the secret cod
<483c5e2f$0$34514$***@news.sonic.net> thusly

Whoooo boy

I hate to say it, but deployment projects just suck. They just do

WiX <http://wix.sourceforge.net> is vastly superior to deploymen
projects. They actually fix the bugs! Plus generating conten
programmatically for a WiX project is trivial since its just XML an
writing out XML is easy in .NET or any other language

Yes, its probably more work than you were planning on right now t
convert your project to WiX, but its really what you want to do. Th
next release of VS.NET will support WiX projects right out of the bo
and its what Office *and* VS.NET use to install themselves anyway

The deployment projects are just crap

I say that as someone that has used them plenty and reported plenty o
bugs on them, as listed here
<http://www.xmission.com/~legalize/msi/known-bugs-2003.html

They never fixed any of those bugs, even though I reported them year
ago. They simply closed them all without fixing any of them
--
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for downloa
<http://www.xmission.com/~legalize/book/download/index.html

Legalize Adulthood! <http://blogs.xmission.com/legalize/>

On 27 May 2008 17:30
Brian Knittel wrote:

So you what you're saying is, "Run for the hills!
So you what you're saying is, "Run for the hills!" Well, that wasn't the
answer I was hoping for, but it's not unexpected either.

Actually if I decide to stay with the VS tool, I think I can do it by
writing a quick script to duplicate the XML for the existing
one or two shortcuts I created manually, and paste the results into the
..vdproj file. This is a one-off thing, I just don't want to
have to manually create 40 or 50 shortcuts when I already have file and
shortcut name data in a text file.

But in the longer term, I should be looking at WiX and Votive. I already
ran into one irritating issue with the VS deployment tool: the installer it
produces can't be configured to permit overwriting an existing installation.
In this particular installation, overwriting an existing install is
appropriate. Presumably WiX will let me set a property to permit this.

Thanks for your input, I appreciate it.
Brian

On 27 May 2008 17:40
legalize+jeeve wrote:

[Please do not mail me a copy of your followup]"Brian Knittel"
[Please do not mail me a copy of your followup]

"Brian Knittel" <***@quarterbyte.com> spake the secret code
<483c7d83$0$34526$***@news.sonic.net> thusly:


Well, there are a couple dangers with this. First, IIRC, the .vdproj
file isn't *quite* XML. Second, the .vdproj file format is
undocumented and while it may look simple enough to insert some text
into it, when I've tried that, it blew up in my face with all sorts of
problems. IIRC, there is an object model for the project type, but
that also is undocumented so there isn't a way to reliably add stuff
to it with the automation model either.

I wish that I *could* recommend deployment projects to people because
they're already out there in existing versions of VS.NET. But they
are so problematic that I can't recommend them in good faith to anyone
for any purpose other than one-time throwaway installers.
--
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
<http://www.xmission.com/~legalize/book/download/index.html>

Legalize Adulthood! <http://blogs.xmission.com/legalize/>

EggHeadCafe - Software Developer Portal of Choice
ASP.NET Request Identity
http://www.eggheadcafe.com/tutorials/aspnet/dd0ec9bb-7a34-44dc-a7f0-3fa209980b75/aspnet-request-identity.aspx
legalize+ (Richard)
2009-11-25 16:23:30 UTC
Permalink
[Please do not mail me a copy of your followup]
Post by unknown
I want to be able to programmatically add files to the target file system.
This is trivial with WiX.
Post by unknown
Did you get anywhere with this or did you go Wix as suggested?
I continue to recommend people use WiX instead of deployment projects
for anything but the simplest of projects.
--
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
<http://legalizeadulthood.wordpress.com/the-direct3d-graphics-pipeline/>

Legalize Adulthood! <http://legalizeadulthood.wordpress.com>
Continue reading on narkive:
Loading...