Question

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

Was it helpful?

Solution

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().

OTHER TIPS

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.

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top