Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Application installs into C: root instead of Program Folders

395 views
Skip to first unread message

Jason

unread,
Jun 30, 2008, 3:33:02 PM6/30/08
to
I have an application that I've been distributing for a few years now with no
problems. But I've been contacted by ONE customer that had trouble
installing a new version of the application on his machine. No one else has
reported the issue described below:

This customer is using Vista (home?) and was installing a new version of my
application. The application files should install into
[ProgramFilesFolder][Manufacturer]\[ProductName]. Some supporting files
should install into [CommonAppDataFolder][Manufacturer]\[ProductName].
Finally, some shortcuts shoud install into the common user start menu.

Once all of the files have been copied, a custom action launches the
application (with UAC elevation) without any UI so it can set permissions on
some of it's registry entries and it's
[CommonAppDataFolder][Manufacturer]\[ProductName] folder.

However, during the installation all of the support files are placed
correctly but the actual executable and it's DLL's wind up in C:\ instead of
C:\Program Files\...

I have a verbose log of one of the installation attempts and it definitely
shows the application files being copied into c:\ instead of the correct
subfolder.

My first question becomes... Even if this users machine has been damaged
and it no longer knows where [ProgramFilesFolder] should be located, why
doesn't it create the rest of the path [Manufacturer]\[ProductName] under the
C:\ root during the installation.

My second question is: Where can I turn to to dig up more information on
Windows Installer in terms of troubleshooting this kind of issue. Yes, I
know this is a poor question, but I'm really not sure where to begin looking.

Thanks,

Jason

Sebastian Brand

unread,
Jul 1, 2008, 1:52:37 AM7/1/08
to

When you have the verbose log, all Properties are written into it,
including ProgramFilesFolder and CommonApp.. etc.
Take a look if any of them points to C:\ - But I guess they are ok.

Are the components that use CommonAppPath really tied to that property
or do they use TargetDir etc. instead?
Maybe you can add a custom action type 51 to set the TargetDir
property manually.


Best regards,
Sebastian Brand

Instyler Software - http://www.instyler.com

Linda Liu[MSFT]

unread,
Jul 1, 2008, 5:01:05 AM7/1/08
to
Hi Jason,

What's the tool you use to create the MSI package, Visual Studio or a 3rd
party product?

If you use Visual Studio to generate the MSI package, a custom action is
created to set the default value for the TARGETDIR property. You may open
the MSI package with Orca and navigate to the "CustomAction" table. There
should be a custom action named "DIRCA_TARGETDIR" in the "CustomAction"
table and the value under the "Target" column should be
"[ProgramFilesFolder][Manufacturer]\[ProductName]".

When the customer that has the trouble installs the MSI package, does he
see a UI shown for the user to specify the installation folder? If yes,
what's the default value of the installation folder shown in the UI?

On Windows Vista, we can use the fuction SHGetKnownFolderPath to retrieve
the full path of a known folder. You may call the SHGetKnownFolder function
to get the path of the "Program Files" (FOLDERID_ProgramFiles) on the Vista
machine that has the installation trouble.

For more information on the SHGetKnownFolderPath funciton, see the
following MSDN document:
"SHGetKnownFolderPath Function"
http://msdn.microsoft.com/en-us/library/bb762188(VS.85).aspx

"KNOWNFOLDERID"
http://msdn.microsoft.com/en-us/library/bb762584(VS.85).aspx

Hope this helps.

Sincerely,
Linda Liu
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msd...@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Jason

unread,
Jul 1, 2008, 10:48:01 AM7/1/08
to
I'm using Visual Studio to create the package. Then I used ORCA to create a
transform in order to get the Shield Icon on the commit.next button and to
enable the custom action that launches my app with the /a command line while
still under the UAC elevation of the setup process. I apply the transform
with msitran.exe

As for the DIRCA_TARGETDIR custom action... The target that I specified in
my original post was that exact entry:
[ProgramFilesFolder][Manufacturer]\[ProductName] (copy and paste)

I looked for DIRCA_TARGETDIR_ in the log and found the following:

MSI (c) (CC:0C) [11:55:45:917]: Doing action: DIRCA_TARGETDIR
Action 11:55:45: DIRCA_TARGETDIR.
Action start 11:55:45: DIRCA_TARGETDIR.
MSI (c) (CC:0C) [11:55:45:920]: PROPERTY CHANGE: Adding TARGETDIR property.
Its value is 'C:\Program Files\[correct values present but removed for
privacy]'.
Action ended 11:55:45: DIRCA_TARGETDIR. Return value 1.

and again later in the log:

MSI (s) (C4:60) [11:56:07:781]: Doing action: DIRCA_TARGETDIR
Action 11:56:07: DIRCA_TARGETDIR.
Action start 11:56:07: DIRCA_TARGETDIR.
MSI (s) (C4:60) [11:56:07:785]: Skipping action due to
msidbCustomActionTypeFirstSequence option.
Action ended 11:56:07: DIRCA_TARGETDIR. Return value 0.

My problem is, I don't know whether this second set of log entries are
normal or not.

The customer reports that the correct folder is displayed as the default
choice in the UI during installation. When I did a webex session with him, I
didn't notice incorrect values there either.


I am aware of the known folder api and I use them in my app. I might have
to put a quick little util together to enumerate the values for this
customer's system so I can verify what his system is doing.

Linda Liu[MSFT]

unread,
Jul 2, 2008, 3:52:58 AM7/2/08
to
Hi Jason,

Thank you for your quick reply!

> My problem is, I don't know whether this second set of log entries are
normal or not.

The second set of the log entries are normal. The type value of the
DIRCA_TARGETDIR custom action in the MSI package generated by Visual Studio
is 307, which equals to 256 + 51and means
msidbCustomActionTypeFirstSequence + 51.

The custom action type 51 sets a property from a formatted text string. The
msidbCustomActionTypeFirstSequence option means the custom action executes
no more than once if present in both sequence tables and its value is 256.

I suggest that you look up the value of the TARGETDIR property in the MSI
installer log file. In my test, the value of the TARGETDIR property is
recorded in the log file as follows:

Property(C): TARGETDIR = C:\Program Files\Default Company Name\Setup1\

Does the directory "C:\Program Files" exist on the problematic machine? If
not, you may have a try creating it and then install the MSI package again
to see if the application can be installed in the correct folder.

Hope this helps.

Sincerely,
Linda Liu
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msd...@microsoft.com.

This posting is provided "AS IS" with no warranties, and confers no rights.

Phil Wilson

unread,
Jul 2, 2008, 11:10:49 AM7/2/08
to
You should post the entire log, edited for privacy if necessary. Guessing
which bits might matter and posting them won't really help.
--
Phil Wilson

"Jason" <Ja...@discussions.microsoft.com> wrote in message
news:78CC2BB0-B5D7-48EF...@microsoft.com...

0 new messages