Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / Setup / August 2006

Tip: Looking for answers? Try searching our database.

Set DISABLEADVTSHORTCUTS property in VS.NET setup project

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jt - 13 May 2004 21:16 GMT
Does anybody know how to set DISABLEADVTSHORTCUTS property in a VS.NET setup project
I know DISABLEADVTSHORTCUTS property can be added by using Orca after .MSI file is built, but is there any way to let a setup project add that automatically
Phil Wilson - 14 May 2004 01:06 GMT
You'd need to add a post build event to update the MSI file. There's a
script in the Windows Installer SDK called WiRunSql.vbs that takes an MSI
file and a SQL statement as parameters. The kind of SQL would be:

INSERT INTO Property(Property, Value) VALUES ('DISABLEADVTSHORTCUTS ', '1')

Signature

Phil Wilson [MVP Windows Installer]
----

> Does anybody know how to set DISABLEADVTSHORTCUTS property in a VS.NET setup project?
> I know DISABLEADVTSHORTCUTS property can be added by using Orca after .MSI file is built, but is there any way to let a setup project add that
automatically?
Joe Goeke - 18 May 2004 02:12 GMT
Hey Phil,
Thanks for the SQl command, but when I run the below SQL command
against a MSI file (to change the product name), I get the following
execution error:

Command = INSERT INTO Property (Property, Value) VALUES ('ProductName
', 'Testing')

Msi API Error 80004005: Execute,Params
1: 2259 2: <PathToMSIFile> 3:  4:  

The <PathToMSIFile> is the actual path the the msi file that I
abbreviated for clarity.

Any idea what's wrong? Any idea where I could find info on just what
all of the error message is trying to say?

Thanks in advance!
---JHG

> You'd need to add a post build event to update the MSI file. There's a
> script in the Windows Installer SDK called WiRunSql.vbs that takes an MSI
[quoted text clipped - 7 lines]
> file is built, but is there any way to let a setup project add that
> automatically?
Phil Wilson - 18 May 2004 04:41 GMT
If you were adding something, Insert is what you want, but now you're
updating an existing entry so you need something different. This is SQL, you
don't use INSERT to update an existing entry. You want (off the top of my
head):

UPDATE Property SET Property.Value = 'Testing' WHERE Property.Property
='ProductName'
Signature

Phil Wilson
[MVP Windows Installer]
Definitive Guide To Windows Installer
http://apress.com/book/bookDisplay.html?bID=280

> Hey Phil,
> Thanks for the SQl command, but when I run the below SQL command
[quoted text clipped - 27 lines]
> > file is built, but is there any way to let a setup project add that
> > automatically?
Joe Goeke - 18 May 2004 18:51 GMT
Duh... Silly me.  I'm a little rusty on my SQL.  Your example worked
perfectly for changing an existing property.

I an still curious however, is there any know _usable_ documentation
on the error messages returned by the Installer.LastErrorRecord?  The
MSI SDK help states "This method has no return values", yet it returns
the error string as we know, and in the criptic format of

Msi API Error 80004005: Execute,Params
1: 2259 2: <PathToMSIFile> 3:  4:

This is the same error as before when I was trying to do an INSERT to
an exiting property, but just _try_ and deduce that from the above
:-).

Thanks once again!
---JHG

> If you were adding something, Insert is what you want, but now you're
> updating an existing entry so you need something different. This is SQL, you
[quoted text clipped - 39 lines]
> > > file is built, but is there any way to let a setup project add that
> > > automatically?
Phil Wilson - 18 May 2004 21:01 GMT
I'm not aware of any further documentation. Yes, 2259 means update failed,
but I don't know of any way you could find out if it failed because(for
example) the item was not present to be updated or for some other failure
reason.
Signature

Phil Wilson [MVP Windows Installer]
----

> Duh... Silly me.  I'm a little rusty on my SQL.  Your example worked
> perfectly for changing an existing property.
[quoted text clipped - 57 lines]
> > > > file is built, but is there any way to let a setup project add that
> > > > automatically?
Joe Goeke - 19 May 2004 20:46 GMT
Just to follow through, I looked into the error messages some more.
Maybe the next poor soul tring to find out what MS has left out of the
documentation, will be gratefull this was in Google, as I often am ;-)

Tell me if I'm wrong but here's what I found:

The criptic format of data is a combination of MSI errors and SQL
errors and come from the Installer.LastErrorRecord method. The numbers
break down as such using the following example:

Msi API Error 80004005: OpenDatabase,DatabasePath,OpenMode
1: 2203 2: <path to msi file> 3: -2147287038

80004005
Not sure what this means.  Shows up all over the place in just about
every MS technology.  I think it's a general error number, but who
knows.

OpenDatabase,DatabasePath,OpenMode
This is the general operation that is being performed on the MSI
database.  In this case it was trying to open the file.  Unfortanely,
no help on these messages in the MSI SDK.

1:
Four digit possitive number.
Indicates the error from the Windows Installer.  These are listed in
the MSI.CHM file that comes with the MSI SDK.  You can find the list
by searching for "Windows Installer Error Messages" . Here's the
listing for 2259 and 2203
2259 Database: [2] Table(s) Update failed
2203 Database: [2]. Cannot open database file. System error [3]  
Not very helpful, but it's better than a stupid number.

2:
path to the MSI file you are processing.

3:
long negative ten digit number.
Indicates an SQL error number.  These can be found in MSDN under the
following path:
ms-help://MS.VSCC.2003/MS.MSDNQTR.2004JAN.1033/enu_kboffdev/offdev/186063.htm
Here's the listing for -2147287037
-2147287037 (80030003)    The path %1 could not be found.

Anyway, to bad MS couldn't find the time to document there error
handlers.
---JHG

> I'm not aware of any further documentation. Yes, 2259 means update failed,
> but I don't know of any way you could find out if it failed because(for
[quoted text clipped - 70 lines]
> > > > > file is built, but is there any way to let a setup project add that
> > > > > automatically?
Phil Wilson - 25 May 2004 03:17 GMT
The error 0x80004005 is a generic "unspecified error" result, -2147287038
decodes as 0x80030002, which is a "not found" error. In general, there's one
set of errors that are the traditional Win32 error numbers, the others are
HRESULTs from COM interfaces, if they were reported in hex format they'd
cause a bit less bother!
Signature

Phil Wilson
[MVP Windows Installer]

> Just to follow through, I looked into the error messages some more.
> Maybe the next poor soul tring to find out what MS has left out of the
[quoted text clipped - 36 lines]
> Indicates an SQL error number.  These can be found in MSDN under the
> following path:

ms-help://MS.VSCC.2003/MS.MSDNQTR.2004JAN.1033/enu_kboffdev/offdev/186063.ht
m
> Here's the listing for -2147287037
> -2147287037 (80030003)    The path %1 could not be found.
[quoted text clipped - 77 lines]
> > > > > > file is built, but is there any way to let a setup project add that
> > > > > > automatically?
Dale Orwig - 21 Aug 2006 14:16 GMT
-- meant to add -->  Err.HelpFile
  and --->  Err.HelpContex
Dale Orwig - 21 Aug 2006 14:29 GMT
(Retrying to post the balance of previous message)
Properties, previousl, referenced on this thread, ommitted from previous post.  Err.HelpFile  Err.HelpContex

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.