Announcement

Collapse
No announcement yet.

Setup Factory 9.2 64 bit

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

  • Setup Factory 9.2 64 bit

    I've got a 32 bit setup made by Setup factory 9.2 and those works fine. Now i gotten the 64 bit version builded for the same software and found out that the %AppUserProfile% variable is empte in the 64 bit?
    The same code in 32 bit works just fine.

    Can anyone help me?


  • #2
    Originally posted by fvlier View Post
    the %AppUserProfile% variable is empte in the 64 bit?
    That should be: %AllUsersProfile% variable is empty in 64 bit.


    This code works on 32 bit, but returns empty in 64 bit code for some reason:

    local sIniRoot = System.ExpandEnvironmentStrings("%AllUsersProfile% \\"..sMAINFOLDER);

    --
    -- Switch on packages selected by user
    --
    local nRadioBtn = String.ToNumber(SessionVar.Expand("%LICENSEOPTION% "));
    if (nRadioBtn == CTRL_RADIO_BUTTON_01) then
    -- case COL License
    SessionVar.Set("%AppShortcutFolderName%", sMAINFOLDER);
    sRootPath = CurInst_GetQNETInstallDir(sREGKEYAPPNAME);
    if (sRootPath == "") then
    sRootPath = _ProgramFilesFolder .. "\\" .. sMAINFOLDER;
    end
    sDataPath = CurInst_GetQNETDataDir(sIniRoot);
    if (sDataPath == "") then
    sDataPath = sIniRoot .. "\\DATA";
    end
    elseif (nRadioBtn == CTRL_RADIO_BUTTON_02) then
    -- case PCL License
    SessionVar.Set("%AppShortcutFolderName%", sMAINFOLDER);
    sRootPath = CurInst_GetQNETInstallDir(sREGKEYAPPNAME);
    if (sRootPath == "") then
    sRootPath = _ProgramFilesFolder .. "\\" .. sMAINFOLDER;
    end
    sDataPath = CurInst_GetQNETDataDir(sIniRoot);
    if (sDataPath == "") then
    sDataPath = sIniRoot .. "\\DATA";
    end

    Comment


    • #3
      System.ExpandEnvironmentStrings() is a custom function, not built into Setup Factory. I would starting the error checking there. If you want to retrieve the folder of the ALLUSERSPROFILE environment variable, you could also just use any of these options:
      Code:
      sFolder = Shell.GetFolder(SHF_APPLICATIONDATA_COMMON);
      sFolder = Shell.GetFolder(35);
      sFolder = SessionVar.Expand("%ApplicationDataFolderCommon%");
      sFolder = os.getenv("ALLUSERSPROFILE");
      Documented here.

      Ulrich

      Comment

      Working...
      X