Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Join Date
    Feb 2003
    Location
    ND, USA, Earth
    Posts
    12

    Oops Notice screen popups .. bug?

    When trying to set the destination of (one) file .. you do not get a button to modify the destination string as you do if you select multiple files.

    Below is a capture of what I see my archive tab is showing.

    archivetab.PNG

    When i edit the file and view properties (shown below)

    fileproperties.png

    So i change the Destination to "vDOC2ASSIST" and I get the screen below..

    noticescreen.png

    Any help?

  2. #2
    Join Date
    Apr 2005
    Location
    São Paulo, Brazil
    Posts
    2,539
    Well, "vDOC2ASSIST" is not a valid path, is it? "C:\vDOC2ASSIST" would be a valid path (although a bad move, because you shouldn't use hard coded paths at all), as would be "%AppFolder%\vDOC2ASSIST" etc... I am not sure what you are asking here. Maybe you need to read about the Session Variables, what they are, and how they work.

    Ulrich

  3. #3
    Join Date
    Feb 2003
    Location
    ND, USA, Earth
    Posts
    12
    vDOC2 should be expanded to be C:\MBS\DOC2.. so vDOC2ASSIST should be expanded to C:\MBS\DOC2\ASSIST.

    The actual issue with this thread is that I have to use %vDOC2%ASSIST but the program does not expand the variables as I would of thought.

    Do not want to use %AppFolder% .. as this project worked before .. but to upgrade to a new version.. breaks the project.

    If you need anything to further explain.. let me know.

  4. #4
    Join Date
    Apr 2005
    Location
    São Paulo, Brazil
    Posts
    2,539
    vDOC2 should be expanded to be C:\MBS\DOC2..
    So define a custom SessionVar "%vDOC2%" to point there, like this:


    so vDOC2ASSIST should be expanded to C:\MBS\DOC2\ASSIST.
    You should write it as "%vDOC2%\ASSIST". As in

    Code:
    File.Open(SessionVar.Expand("%vDOC2%\\ASSIST\\filename.exe"), "", SW_SHOWNORMAL);
    The actual issue with this thread is that I have to use %vDOC2%ASSIST but the program does not expand the variables as I would of thought.
    Session Variables are well explained in the documentation, and you can find additional info in this thread.

    Ulrich

  5. #5
    Join Date
    Feb 2003
    Location
    ND, USA, Earth
    Posts
    12
    Ok.

    What about when i need to read in from an INI file and then set the destination variables to the read in path?

    if (vFile == true) then

    fExeWin = INIFile.GetValue("C:\\MBS\\SYSTEM\\MBS.INI", "PATHS", "MAIN");
    fLib = INIFile.GetValue("C:\\MBS\\SYSTEM\\MBS.INI", "PATHS", "LIB");
    fExe2 = INIFile.GetValue("C:\\MBS\\SYSTEM\\MBS.INI", "PATHS", "EXE2");
    fUtil = INIFile.GetValue("C:\\MBS\\SYSTEM\\MBS.INI", "PATHS", "UTIL");
    fHlpWin = INIFile.GetValue("C:\\MBS\\SYSTEM\\MBS.INI", "PATHS", "HLPWIN1");

    fBlk = INIFile.GetValue("C:\\MBS\\SYSTEM\\MBS.INI", "PATHS", "BLK");
    fDoc2 = INIFile.GetValue("C:\\MBS\\SYSTEM\\MBS.INI", "PATHS", "DOC2");
    fCode = INIFile.GetValue("C:\\MBS\\SYSTEM\\MBS.INI", "PATHS", "CODE");
    fDXF = INIFile.GetValue("C:\\MBS\\SYSTEM\\MBS.INI", "PATHS", "DXF");
    fRep = INIFile.GetValue("C:\\MBS\\SYSTEM\\MBS.INI", "PATHS", "REP");
    fSiz2 = INIFile.GetValue("C:\\MBS\\SYSTEM\\MBS.INI", "PATHS", "SIZ2");
    fTrans = INIFile.GetValue("C:\\MBS\\SYSTEM\\MBS.INI", "PATHS", "TRANS");

    fSys = "C:\\MBS\\SYSTEM\\";

    else

    fExeWin = "C:\\MBS\\EXEWIN1\\";
    fLib = "C:\\MBS\\LIB\\";
    fExe2 = "C:\\MBS\\EXE2\\";
    fUtil = "C:\\MBS\\UTIL\\";
    fHlpWin = "C:\\MBS\\HLPWIN1\\";

    fBlk = "C:\\MBS\\BLK\\";
    fDoc2 = "C:\\MBS\\DOC2\\";
    fCode = "C:\\MBS\\CODE\\";
    fDXF = "C:\\MBS\\DXF\\";
    fRep = "C:\\MBS\\Rep\\";
    fSiz2 = "C:\\MBS\\SIZ2\\";
    fTrans = "C:\\MBS\\TRANS\\";

    fSys = "C:\\MBS\\SYSTEM\\";

    Folder.Create("C:\\MBS");

    end;
    The above is directly from the StartUp actions.

  6. #6
    Join Date
    Apr 2005
    Location
    São Paulo, Brazil
    Posts
    2,539
    What happens if there is no C: drive?

    I think you still did not understand that you should not use hardcoded paths, ever. This is exactly what the Session Variables should be used for. If you organize your variables in a smart way, your code can get very elegant and portable.

    You should not install anything in the root folder of the user's drive. I am sure that you are aware that applications should be placed into the %ProgramFiles% folder, user data into %ApplicationDataFolder%, %ApplicationDataFolderCommon% or even %CommonFilesFolder% or %CommonDocumentsFolder% - not in the root of the drive. You can find further guidelines for building installers and deploying products at Microsoft, like here and here. In Setup Factory, the %AppFolder% is used as the default location for your application's main folder, usually somewhere in the ProgramFiles structure - but it can be anywhere else. Sub folders of your application can then be accessed as %AppFolder%\foldername in your scripts and screens, no matter where the folder actually resides.

    So, if your %AppFolder% was defined to point to a proper location, and you have a "SYSTEM" subfolder, you could access this folder by expanding "%AppFolder%\System". In your code, you would be using something like this:

    Code:
    local inifile = SessionVar.Expand("%AppFolder%\\SYSTEM\\MBS.INI");
    if File.DoesExist(inifile) then
       fExeWin = INIFile.GetValue(inifile, "PATHS", "MAIN");
       fLib = INIFile.GetValue(inifile, "PATHS", "LIB");
       …
    else
       fExeWin = SessionVar.Expand("%AppFolder%\\EXEWIN1");
       fLib = SessionVar.Expand("%AppFolder%\\LIB");
       …
    end
    Ulrich

  7. #7
    Join Date
    Feb 2003
    Location
    ND, USA, Earth
    Posts
    12
    Ulrich,

    The folders that I have to install the program into is PRESET and I do not have any control of where they go.

    That is why I am asking for help on trying to use your installer.

    I will try and redo my project .. but in the end .. the folders are set in granite.. since cement can break.

Posting Permissions

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