Announcement

Collapse
No announcement yet.

create destination folder

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • create destination folder

    I want to install all of my app's supporting files in a %ProgramFiles%/%ProductName% folder on the user's machine.

    1. How can I determine if a folder named %ProgramFiles% already exists on a user's machine?

    2. If it doesn't exist, how do I create it, either through Session Variables or Actions Before Installing?

    halwade

  • #2
    The name of the Session Variable you should use is %ProgramFilesFolder%. This variable will contain the path to the localized "ProgramFiles" folder on the target computer. This folder can also be retrieved with Shell.GetFolder(SHF_PROGRAMFILES), and you can safely assume that the folder exists.

    Ulrich

    Comment


    • #3
      Correction to Previous Post "Create Destination Folder"

      I want to install all of my app's supporting files in a %ProgramData%/%ProductName% folder on the user's machine.

      1. How can I determine if a folder named %ProgramData% already exists on a user's machine?

      2. If it doesn't exist, how do I create it, either through Session Variables or Actions Before Installing?

      I am currently sending my .exe files to %ProgramFilesFolder%.
      I am using the following for specifiying destination folder for supporting data files - but it doesn't seem to work:

      %ProgramDocumentsFolder% %AppDrive%\ProgramData
      %AppData% %ProgramDocumentsFolder%\%ProductName%

      halwade

      Comment


      • #4
        Similar to my former reply, you can assume that the folder pointed to by the Session Variable %ApplicationDataFolderCommon% exists on the target system. It is an integral part of the operating system, and its location can also be retrieved by Shell.GetFolder(35), the usual location is C:\ProgramData. This folder may be hidden by default.

        If you want to use the user-specific ApplicationData folder, use %ApplicationDataFolder% or Shell.GetFolder(26).

        You may also want to read a post I have on my site for further details.

        Ulrich

        Comment

        Working...
        X