Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
689 views
in Technique[技术] by (71.8m points)

visual studio 2008 - Use Orca to edit msi from command line?

I'm using Visual Studio 2008 and have created a setup project for my application. The application has a high-resolution icon (for Vista). There's a bug in Visual Studio, and the installer creates a desktop shortcut with a low resolution icon.

I logged this bug in Microsoft Connect (https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=338258) and finally got an answer, which is to use Orca to edit the msi file and replace the icon. That solutions works fine.

Now I want to automate that process, so I can include it in my build script. Is there a way to do that?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Possibly the easiest solution that I found for this was to create a new "Transform" inside of Orca, and then to apply the transform as a part of my post-build steps.

1) Open the MSI file using ORCA for editing. 2) Click on "New transform" 3) Make all of the applicable changes to your MSI tables using the Orca editor. 4) Click on "Generate transform", and save the file. 5) Edit your build events to execute msitran during the post-build step. like this...

msitran -a (path to transform file) (path to MSI file)

More information about MSITran.exe can be found at the following location... MSITran

This will automatically apply your edits to the MSI file once your installer build has completed, eliminating the need for custom VBScript.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...