Announcement

Collapse
No announcement yet.

Short file names - how do you create them in SF

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Short file names - how do you create them in SF

    I need to write a file path (gathered from a startup variable) into an INI file in the old 8.3 format.

    ie

    c:\program files\the language market\japanese\

    needs to look like

    c:\progra~1\thelan~1\japane~1\

    I've noticed else where from searches that you need to put quotes around a long file name if it contains spaces - but nothing on truncating to DOS/Win3.1 friendly format.

    Cheers
    Alistair

  • #2
    Re: Short file names - how do you create them in SF

    Hi,

    Sorry but there is no way to convert long file names into short using Setup Factory.

    Which path do you want to write into the INI file?

    mark.
    MSI Factory The Next Generation Intelligent Setup Builder

    Comment


    • #3
      Re: Short file names - how do you create them in SF

      Originally posted by Mark:
      Hi,

      Sorry but there is no way to convert long file names into short using Setup Factory.

      Which path do you want to write into the INI file?

      mark.
      I want to write the install path into the ini file of a 3rd party double byte font interpreter we are using. The DBFI is written in 16bit code and will only recognise short file names.

      Given that SF won't truncate then I guess I'm forced to install the app in the root of C drive (or something similar).

      Alistair

      Comment


      • #4
        Re: Short file names - how do you create them in SF

        I had the same problem. I solved it by using the relative path (".\") instead of the absolute path in the INI file.

        Comment


        • #5
          Re: Short file names - how do you create them in SF

          Although it would be a bit of work, there is a Windows API (Shell) call "GetShortPathName". You could write a small C++ program that accepts a long filename as an argument and then writes the short name out to the INI file. Othrwise, hold out for SUF60 (next week) which has a built-in function to make a long filename into a short filename.

          - Brett

          Comment


          • #6
            Re: Short file names - how do you create them in SF

            You could actually do this using a batch file, using stub files and the DIR command with the /X option.

            Have a look at the Short2Long.bat file in the following batch file archive:
            http://www.ss64.demon.co.uk/ntsyntax/ss64_NT.zip

            The batch file is NT-specific, so if you only need this to work on NT you could use that file as-is. Otherwise, you'll need to add logic to the batch file to detect the OS and use the different command options available in 9x.
            --[[ Indigo Rose Software Developer ]]

            Comment


            • #7
              Re: Short file names - how do you create them in SF

              Originally posted by dom:
              I had the same problem. I solved it by using the relative path (".\") instead of the absolute path in the INI file.
              Relative paths are no good for our project unfortunately.

              Alistair

              Comment

              Working...
              X