Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
tools
vsnet.act
vsnet.debugging
vsnet.documentation
vsnet.enterprise.tools
vsnet.general
vsnet.ide
vsnet.jlca
vsnet.servicepacks
vsnet.setup
vsnet.vsip
vsnet.vss
vsnet.vstools.office
vstudio.development
vstudio.extensibility
vstudio.general
vstudio.helpauthoring
vstudio.setup
vstudio.sourcesafe
  
 
date: Tue, 27 May 2008 12:17:04 -0700,    group: microsoft.public.vstudio.extensibility        back       


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
date: Tue, 27 May 2008 12:17:04 -0700   author:   Brian Knittel

Re: object model for deployment projects   
[Please do not mail me a copy of your followup]

"Brian Knittel"  spake the secret code
<483c5e2f$0$34514$742ec2ed@news.sonic.net> thusly:

>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/>
date: Tue, 27 May 2008 14:04:37 -0700   author:   legalize+ (Richard)

Re: object model for deployment projects   
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
date: Tue, 27 May 2008 14:30:41 -0700   author:   Brian Knittel

Re: object model for deployment projects   
[Please do not mail me a copy of your followup]

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

>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/>
date: Tue, 27 May 2008 14:40:22 -0700   author:   legalize+ (Richard)

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us