Results 1 to 5 of 5

Thread: How to get 'ProgramData' folder in a pure InstallScript project?

  1. #1
    Join Date
    Mar 2004
    Posts
    331

    How to get 'ProgramData' folder in a pure InstallScript project?

    Hi,

    I want to get 'ProgramData' folder in a pure InstallScript project (no MSI), and use it as the database file destination for Vista and later platforms. What is the reliable and simple way to do it in InstallScript code?


    Thanks,
    Peter

  2. #2
    Join Date
    Mar 2004
    Posts
    331
    Ok, I made it by calling SHFolder.SHGetFolderPathA() in IS script.

    The next problem for me is how to set the retuned path value to be the destination of some components, those components are marked to be installed only on Vista and Win Server 2008.

    Again, since the install type is pure InstallScript (no MSI), all the methods (Property, CA, and so on) I am familia with for MSI are not available now. I know there is a way in pure script to call FeatureSetTarget(), but I would prefer (and am used) to make it available in the 'Setup Design' phase, making it (which can be set by script code at the early stage of installation) as a property/folder_name/etc.

    Any suggestions?


    Thanks,
    Peter

  3. #3
    Join Date
    Apr 2002
    Location
    Germany
    Posts
    683
    It´s simple.
    Just create a 'Script-defined Folder' and use it as (part of) the destination for those components. Assign the real folder using FeatureSetTarget to the script defined folder.

    Example:
    Script-defined Folder is CommonAppData.
    Assign Folder to CommonAppData:
    FeatureSetTarget( MEDIA, "<CommonAppData>", szCommonAppDataFolder);

  4. #4
    Join Date
    Mar 2004
    Posts
    331
    That seems to be what I have to do - I originally wanted to avoid FeatureSetTarget() call and hoped to have other ways that works with just IDE (configurations/set property/etc.).


    Thanks for your reply.

  5. #5
    Join Date
    Jun 2007
    Posts
    2
    hi,

    why you don´t use "commonappdata" (IS)variable?

    greetings michael

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •