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 / Languages / C# / March 2008

Tip: Looking for answers? Try searching our database.

Serious "Installer" class bug (?)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
John L. - 21 Mar 2008 02:32 GMT
Hi there,

I created an MSI deployment project and am using the
"System.Configuration.Install.Installer" class to implement some custom
actions at install time. In "Installer.Install()", I save some info in the
".InstallState" file which is routine for those familiar with this class.
However, when I try to launch my app via the Start menu as a
non-administrator (after installing the app as an administrator for all
users), MSI tries to invoke my custom actions again (why?) and somewhere in
the plumbing of all this, something is trying to *write* to the
".InstallState" file before my app starts. The ".InstallState" file is under
"Program Files" however so MSI fails with an access rights error. Has anyone
seen this behaviour before. It looks like something is seriously broken in
the logic behind this class. Thanks.
Phil Wilson - 21 Mar 2008 21:21 GMT
This is normal behavior when a repair kicks in. If you did something like
remove files or folders then a repair will kick in to restore files or
registry entries. This repair is at the installer component level, so the
installer component is re-installed. Visual Studio custom actions are
typically conditioned internally on installation of the component, so your
custom action is called again.  Having a condition of Not Installed on the
install custom action stops it being called again on a repair. Installed is
a case-sensitive property.
Signature

Phil Wilson
[MVP Windows Installer]

> Hi there,
>
[quoted text clipped - 10 lines]
> Has anyone seen this behaviour before. It looks like something is
> seriously broken in the logic behind this class. Thanks.
Phil Wilson - 21 Mar 2008 22:18 GMT
Adding what I added in the MSDN ClickOnce/Setup forum reply:

In this case the repair is because it's running as a different user and
something appears to be missing, probably a user-specific item that's being
installed, a file or registry entry.

Signature

Phil Wilson
[MVP Windows Installer]

> This is normal behavior when a repair kicks in. If you did something like
> remove files or folders then a repair will kick in to restore files or
[quoted text clipped - 18 lines]
>> Has anyone seen this behaviour before. It looks like something is
>> seriously broken in the logic behind this class. Thanks.
Larry Smith - 22 Mar 2008 01:58 GMT
> Adding what I added in the MSDN ClickOnce/Setup forum reply:
>
> In this case the repair is because it's running as a different user and
> something appears to be missing, probably a user-specific item that's
> being installed, a file or registry entry.

Thanks (note that I'm now logged onto my own account again). See my reply in
the forum under the title "Is this a bug? Can't acccess ".InstallState" file
as non-admininstrator" (for others reading this).

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.