I am trying to open a *.cab file (as used by a Microsoft Installer) using
String cabFileName = @"C:\Programme und Einstellungen\somefolder\mycab.cab";
CabInfo cab = new CabInfo(cabFileName);
The class CabInfo is part of the Windows Installer XML (WiX) toolset (cf. http://codesupport.wordpress.com/tag/microsoft-deployment-compression-cab-dll/)
However, CabInfo won’t accept a file path containing white spaces, even if it’s correctly escaped as shown above.
I was wondering whether there is a possibility to pass a file name containing white spaces to the CabInfo.
I almost hate to suggest this, but have you tried with the 8.3 compatibility filename? Eg:
Unfortunately, if this mechanism works, I don’t think there’s a
ShortNameproperty onFileInfo. I think you’ll need to PInvoke theGetShortPathNamefunction inkernel32.dll.