Indigo Rose Software
  #1  
Old 09-29-2004
brianlesker brianlesker is offline
Forum Member
 
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.
Reply With Quote
  #2  
Old 09-29-2004
JXBURNS's Avatar
JXBURNS JXBURNS is offline
Forum Member
 
Join Date: Apr 2001
Location: Haverhill, Suffolk, UK
Posts: 333
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
Reply With Quote
  #3  
Old 09-29-2004
brianlesker brianlesker is offline
Forum Member
 
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
Reply With Quote
  #4  
Old 09-29-2004
JXBURNS's Avatar
JXBURNS JXBURNS is offline
Forum Member
 
Join Date: Apr 2001
Location: Haverhill, Suffolk, UK
Posts: 333
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
Reply With Quote
  #5  
Old 09-29-2004
brianlesker brianlesker is offline
Forum Member
 
Join Date: Oct 2003
Posts: 49
well i looked @ the help and examples, but didn't find it

But fenks for your help!!!!
Reply With Quote
  #6  
Old 09-29-2004
JXBURNS's Avatar
JXBURNS JXBURNS is offline
Forum Member
 
Join Date: Apr 2001
Location: Haverhill, Suffolk, UK
Posts: 333
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
Reply With Quote
  #7  
Old 09-29-2004
Mark's Avatar
Mark Mark is offline
Indigo Rose Staff Member
 
Join Date: Jun 2000
Location: Indigo Rose Software
Posts: 1,773
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
Reply With Quote
  #8  
Old 09-29-2004
JXBURNS's Avatar
JXBURNS JXBURNS is offline
Forum Member
 
Join Date: Apr 2001
Location: Haverhill, Suffolk, UK
Posts: 333
Mark - Better example than mine of course - John
Reply With Quote
  #9  
Old 10-01-2004
brianlesker brianlesker is offline
Forum Member
 
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?
Reply With Quote
  #10  
Old 10-01-2004
csd214 csd214 is offline
Forum Member
 
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).
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
HOWTO: Download and Install Files from the Web Support Setup Factory 6.0 Knowledge Base 0 10-23-2002 02:16 PM
HOWTO: Limit the Number of Times an Install can be Run Support Setup Factory 6.0 Knowledge Base 0 10-17-2002 03:58 PM
HOWTO: Create a Silent Install with Setup Factory 5.0 Support Setup Factory 5.0 0 10-08-2002 03:08 PM
Selecting the Install Folder VictorReinhart Setup Factory 5.0 1 08-01-2001 10:52 AM
Allow users to create new folder during install bbrenner Setup Factory 5.0 1 04-25-2001 01:51 PM


All times are GMT -6. The time now is 06:53 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright © 2000 - 2009 Indigo Rose Corporation. All rights reserved.
Indigo Rose Software