Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 10 of 10

Thread: install folder

  1. #1
    Join Date
    Oct 2003
    Posts
    49

    install folder

    Can somebody provide me some codescripting how i can make my setup only chose LOCAL drives, not network neighborhood etc.

  2. #2
    Join Date
    Apr 2001
    Location
    Haverhill, Suffolk, UK
    Posts
    360
    Assume DRIVE.GETTYPE does not work?

    If not there are some API calls you may want to try but I suspect SUF7 is already using those in the DRIVE. commands.

    John

  3. #3
    Join Date
    Oct 2003
    Posts
    49
    Jup that was what i'm searching for, i'm new into SF7


    I want to make a NOT structure, what is a good code for it:

    if (strTypeDrive != 3) then < doesn't work
    if (strTypeDrive <> 3) then < nether

  4. #4
    Join Date
    Apr 2001
    Location
    Haverhill, Suffolk, UK
    Posts
    360
    Remember that DRIVE.TYPE returns a number not a string.

    So you could use something like:

    drivetype = Drive.GetType("M:");

    -- Check if drive type NOT a fixed drive
    if (drivetype ~= DRIVE_FIXED) then
    ...

    I would suggest you look at the excellent examples available on most of the Help screens and also the Expressions and Operators help subject.

    Rgds John

  5. #5
    Join Date
    Oct 2003
    Posts
    49
    well i looked @ the help and examples, but didn't find it

    But fenks for your help!!!!

  6. #6
    Join Date
    Apr 2001
    Location
    Haverhill, Suffolk, UK
    Posts
    360
    A) Click the ADD ACTION.
    Select DRIVE.GETTYPE.
    Click HELP
    Help screen appears.
    Click the EXAMPLES tab just below the title line.

    B) Click SEARCH
    Enter "expression" (without ") as the search
    3rd option down shows the Expressions and Operators help.

    John

  7. #7
    Join Date
    Jun 2000
    Location
    Indigo Rose Software
    Posts
    1,943
    Hi brianlesker,

    If you are trying to do this for a Select Drive screen then there is an easy way for you to enable this.

    look on the On Preload code for this screen and find the following section:

    Code:
    -- from _SUF70_Global_Functions.lua:
    -- fill a table with all fixed and remote drives
    tbDrives = g_GetDriveLetters(DRIVE_FIXED, DRIVE_REMOTE);
    Here is the description of g_GetDriveLetters from _SUF70_Global_Functions.lua:

    --[[
    ************************************************** ********
    Function: g_GetDriveLetters
    Purpose: Fills a table with the drive letters (e.g. 'C:') for all of the drives
    that match a specific list of drive types, or for all of the drives on
    the system if no list of drive types is specified.
    Arguments: Call this function with the list of drive types you want to include
    in the table, e.g. g_GetTableOfDriveLetters(DRIVE_FIXED, DRIVE_REMOTE)
    Returns: (table) A numerically indexed table of drive letters.
    ************************************************** *********
    --]]

    So if you wanted to use this screen, but you only wanted it to show local hard drives simply change the code to read:

    Code:
    tbDrives = g_GetDriveLetters(DRIVE_FIXED);
    Note: Take a look at the help file for Drive.GetType() for a list of possible values to pass to g_GetDriveLetters();
    MSI Factory The Next Generation Intelligent Setup Builder

  8. #8
    Join Date
    Apr 2001
    Location
    Haverhill, Suffolk, UK
    Posts
    360
    Mark - Better example than mine of course - John

  9. #9
    Join Date
    Oct 2003
    Posts
    49

    Huh?

    PreLoad:

    -- These actions are performed before the screen is shown.

    -- calculate the amount of space required for the installation
    _SpaceRequired = SetupData.CalculateRequiredSpace();

    -- format it as a string with an appropriate unit of measurement (e.g. "0 bytes")
    local strSpaceRequired = String.GetFormattedSize(_SpaceRequired);

    -- store the string in a session variable so it can be used in the screen text
    SessionVar.Set("%SpaceRequired%", strSpaceRequired);

    -- from _SUF70_Global_Functions.lua:
    -- update the 'Space required:' message (expands any session variables in it)
    g_UpdateStaticTextCtrl(CTRL_STATICTEXT_SPACEREQUIR ED, "IDS_CTRL_STATICTEXT_SPACEREQUIRED");
    -- These actions are performed before the screen is shown.

    -- calculate the amount of space required for the installation
    _SpaceRequired = SetupData.CalculateRequiredSpace();

    -- format it as a string with an appropriate unit of measurement (e.g. "0 bytes")
    local strSpaceRequired = String.GetFormattedSize(_SpaceRequired);

    -- store the string in a session variable so it can be used in the screen text
    SessionVar.Set("%SpaceRequired%", strSpaceRequired);

    -- from _SUF70_Global_Functions.lua:
    -- update the 'Space required:' message (expands any session variables in it)
    g_UpdateStaticTextCtrl(CTRL_STATICTEXT_SPACEREQUIR ED, "IDS_CTRL_STATICTEXT_SPACEREQUIRED");


    Don't find:

    tbDrives ...??

    Maybe i'm to stupid to get it?

  10. #10
    Join Date
    Oct 2001
    Location
    Norway
    Posts
    939
    Quote Originally Posted by brianlesker
    Maybe i'm to stupid to get it?
    I don't think so. (I know the feeling of being stupid.) I had to dig a bit, like you I viewed a wrong screen (Select Install Folder). Mark talked about the 'Select Drive' screen. You'll find the statement on line 40 (On Preload).

Similar Threads

  1. HOWTO: Download and Install Files from the Web
    By Support in forum Setup Factory 6.0 Knowledge Base
    Replies: 0
    Last Post: 10-23-2002, 01:16 PM
  2. HOWTO: Limit the Number of Times an Install can be Run
    By Support in forum Setup Factory 6.0 Knowledge Base
    Replies: 0
    Last Post: 10-17-2002, 02:58 PM
  3. HOWTO: Create a Silent Install with Setup Factory 5.0
    By Support in forum Setup Factory 5.0
    Replies: 0
    Last Post: 10-08-2002, 02:08 PM
  4. Selecting the Install Folder
    By VictorReinhart in forum Setup Factory 5.0
    Replies: 1
    Last Post: 08-01-2001, 09:52 AM
  5. Allow users to create new folder during install
    By bbrenner in forum Setup Factory 5.0
    Replies: 1
    Last Post: 04-25-2001, 12:51 PM

Posting Permissions

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