Hi Blair,

Thank you for the answer I really needed.  I should have known that it was the 
OS doing this - it's the only thing that makes sense.  

You're right in that the easiest solution is to write a custom action to change 
the short name of the relevant files (I can do this myself without any problem. 
 We already have our own custom action DLL doing a bunch of other things, but 
thank you for the offer).

And thank you Christopher, for your response.

Dave

-----Original Message-----
From: Blair [mailto:os...@live.com] 
Sent: Saturday, November 06, 2010 8:07 PM
To: 'General discussion for Windows Installer XML toolset.'
Subject: Re: [WiX-users] - File short names

When Windows Installer installs a file, it either uses the short name or the
long name, never both. You can force an installation to use only short
names, or if you install to a file system that only supports short names you
get the relevant short names. Otherwise you only get the long names. Note
that FAT32 supports long names, and all recent versions of Windows provide
long name support for FAT 12/16 as well, unless that option is turned off.

The short names you are seeing after installation are the ones the file
system itself generates, which doesn't know anything about MSI.

The only workaround that I see is to use a custom action that (after first
checking that the files are written to an NTFS filesystem) uses the
SetFileShortName() windows API (there does not appear to be a solution for
non-NTFS that I discovered on a quick browse, but I'll search deeper if you
buy from me). You would need paired custom actions: one immediate that could
read the session/database (to know what files were/will be written) and one
deferred that could actually change the file names.

Contact me off list if you wish me to write it for you (I can do it for
[what I think is] cheap).

-----Original Message-----
From: Socky, David R (GE Energy) [mailto:david.so...@ge.com] 
Sent: Friday, November 05, 2010 6:40 AM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] - File short names

Hi Christopher,

The reason I need this it to work around a problem with the Microsoft Help
Provider.  We are using .Net 3.5, Visual Studio 2010.  We have .chm help
files for our application help.  We are using the standard .Net help calls
to access the help.  Here is the situation:

Help file 1:  D:\Dir1\abc_def_123.chm  (short file name = abc_de~1.chm)
Help file 2:  D:\Dir2\abc_def_456.chm  (short file name = abc_de~1.chm)

A user first accesses D:\Dir1\abc_def_123.chm and gets the correct help
file.  The user then accesses D:\Dir2\abc_def_456.chm, but gets the help
file for D:\Dir1\abc_def_123.chm!

In debugging the code, it looks like the Microsoft help provider code is
caching the short name of the help file (abc_de~1.chm), and when it starts
looking for the second one, it finds the cached name and uses the wrong
file.

Since getting Microsoft to fix a problem such as this is a "long term"
affair, the short term solution (we are due to release next week) is to
force different short names during the install (it would be even more
difficult to change the long name of the files, believe it or not).

But I cannot seem to get the short names to change!?

That's why I need to do this.

Any help?

Dave



-----Original Message-----
From: Christopher Painter [mailto:chr...@deploymentengineering.com] 
Sent: Friday, November 05, 2010 8:43 AM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] - File short names

I'm wondering what the situation is that makes you ask this question 
(seriously).   In my installs, my .NET assemblies have really long names and

they wouldn't work if the names changed.  I let WiX automatically hash the 
shortname with something seriously meaningless just to make MSI happy and I 
never concern myself with it.  The only time I've been bit by long | short 
names is in the media table which only understands shortnames. 
InstallShield 
has a bug where you can get bit real bad when installing from a CDROM.
 
Christopher Painter, Author of Deployment Engineering Blog
Have a hot tip, know a secret or read a really good thread that deserves 
attention? E-Mail Me



----- Original Message ----
From: "Socky, David R (GE Energy)" <david.so...@ge.com>
To: wix-users@lists.sourceforge.net
Sent: Fri, November 5, 2010 7:32:25 AM
Subject: [WiX-users] - File short names

I am trying to define the short name of a file, but the installer
ignores my entry and creates its own automatic short name.  For
instance, I'm using the following in the file table:
gehnum01.pdf|GEH-6421_Vol_I.pdf but when installed, the short name turns
out to be GEH-64~1.pdf



My code looks like:



            <Component Id="GEH_6421_Vol_I.pdf"
Guid="{A12AF620-A279-4445-A461-6CF5867A7B9E}" >

              <File Id="GEH_6421_Vol_I.pdf" Name="GEH-6421_Vol_I.pdf"
ShortName=" gehnum01.pdf" Source=".\RuntimeFiles\Doc\GEH-6421_Vol_I.pdf"
KeyPath='yes' Checksum="no" >

                <Shortcut Id="startmenuMarkVIDocsSysManVol1"
Directory='ProgramMenuMarkVIDocuments' Name='System Manual Vol 1'
WorkingDirectory='Doc' />

              </File>

            </Component>



Once built, the .msm in Orca looks ok in the file table.



What do I need to do to get the short name to be what I want it to.



Thanks,

Dave

----------------------------------------------------------------------------
--
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users



      

----------------------------------------------------------------------------
--
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

----------------------------------------------------------------------------
--
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to