tags:

views:

98

answers:

3

I am using the WiX installer to install an application, and I need to set an environment variable to the CommonAppDataFolder location for the purposes of a temporary area to store files. This typically points to C:\Documents and Settings\All Users\Application Data. The problem is that the application cannot recognize long file names. Is there any way to force the use of a short name (8.3 Format)?

I'm also open to other suggestions as well. (The option to use long file names does not exist, unfortunately.)

Thanks

+2  A: 

Quickly perusing the WiX documentation I didn't see anything obvious. You could write a CustomAction that calls GetShortPathName() and have it set a Property via MsiSetProperty().

jeffamaphone
+2  A: 

The ideal would be that you could use the [!FileId] syntax to get the path but the MSI SDK Formattted topic says that is only evaluated to the shortpath in the Registry and IniFile tables. If that Formatted path doesn't work, you're probably stuck writing a CustomAction to read the property and write it to a new property with the short name.

Rob Mensching
A: 

I know you must have good reason to, but why store temporary files in the CommonAppDataFolder?

Glytzhkof
I need to provide a common location (that does not have the chance of being deleted, which could happen if I use, say, the Windows Temp Directory) for a variety of apps to run. Do you have a different suggestion? I'm open to alternatives.
JasCav