Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2004
    Posts
    16

    different install path depending on Windows version?

    on Windows 2000 or greater, i need to install most of my files to %ApplicationDataFolderCommon%, however on Windows 95/98, i need to install them to %AppFolder%, because on 95/98 using SHGetSpecialFolderLocation to get that path (CSIDL_AllUsersAppData) returns an empty string. so i plan on detecting the windows version from within my app, and if it's 95/98 just using the App Dir to read the needed files.

    how can i change the install path depending on windows version?

    btw, i notice %ApplicationDataFolderCommon%, on windows 98, returns something like C:\Windows\Profiles\All Users\Application Data, but i can't find an API to do the same from within my program. i could write the path to an tx file, post-install, but i'd rather not.

  2. #2
    Join Date
    Jun 2005
    Posts
    470
    something like this should do it. OS major version >= 5 matches Windows 2000 and later, AppFolder will remain unchanged on 9.x/Me/NT4

    Code:
    if System.GetOSVersionInfo().MajorVersion >= "5" then
    	SessionVar.Set("%AppFolder%", SessionVar.Expand("%ApplicationDataFolderCommon%") .. "\\myApp");
    	--Dialog.Message("AppFolder:",SessionVar.Expand("%AppFolder%"));
    end;

  3. #3
    Join Date
    Jun 2004
    Posts
    16
    awesome, thanks.

    i was thinking maybe i had to install everything to a temp folder and then use the File.Install action on each... this is much easier.

    on 2000/XP/Vista i still need some files installed to AppFolder (meaning the path the user chooses to install to, in Program Files), and the rest in ApplicationDataFolderCommon, so your code won't work as is (making both paths the same), but i figure i can work something out.

Similar Threads

  1. Setup Factory and VS 2005
    By vazir786 in forum Setup Factory 7.0
    Replies: 4
    Last Post: 01-13-2006, 08:47 PM
  2. INFO: JET and MDAC (Complete) Runtime Notes
    By Desmond in forum Setup Factory 6.0 Knowledge Base
    Replies: 0
    Last Post: 11-28-2003, 08:35 AM
  3. How do I detect for media player 9 codec?
    By Skip in forum AutoPlay Media Studio 4.0
    Replies: 16
    Last Post: 10-12-2003, 01:22 PM
  4. HOWTO: Install Files to the Windows Directory
    By Support in forum Setup Factory 6.0 Knowledge Base
    Replies: 0
    Last Post: 09-18-2002, 02:33 PM
  5. How do I add to my PATH statement at install?
    By Tnygaard in forum Setup Factory 6.0
    Replies: 3
    Last Post: 05-27-2002, 01:38 AM

Posting Permissions

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