Replace files with long-file-name
Posted on 2002-04-11
I have a little setup program, which replaces files in use by writing 'wininit.ini' and reboot.
To be more precise I copy the new file to the desired location by an other name like 'ItsALongFileName.dll.tmp', than I write a line into the 'wininit.ini' that copies this file to 'ItsALongFileName.dll'.
Unfortunately most of the files I have has long file name. Microsoft declares in PlatformSDK that 'Both DestinationFileName and SourceFileName must be short file names.'
So before I write file names into the 'wininit.ini' I ask for the short file name of the specified file.
The result of this, after reboot, is a file named 'ItsALo~1.dll', asumed that the original file was 'ItsALongFileName.dll'.
How can I solve this problem?