This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Installscript check drive type
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 29, 2008
01:51 PM
Installscript check drive type
Is there a way to have Installscript check a drive type?
I am listing drives in a combobox and do not want to list floppy drive or a cd/dvd drive, I want to only list volume/hard drives.
I am listing drives in a combobox and do not want to list floppy drive or a cd/dvd drive, I want to only list volume/hard drives.
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 29, 2008
01:58 PM
How are you generating the list of drives? GetValidDrivesList, for example, enables you to specify which type or types it should report...
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 29, 2008
04:28 PM
Yes I am using the GetValidDriveList
I was also trying to figure a way to set the selection to the current drive used in TARGETDIR, but with no luck yet.
// Define properties --------------------------------------------------------
#define DRVCOMBOBOX1 1203
// Set Prototypes -----------------------------------------------------------
prototype ChangeDrive();
// Included header files ----------------------------------------------------
#include "ifx.h"
function NUMBER ChangeDrive( )
NUMBER nReturn;
NUMBER nControl;
BOOL bDone;
// variables for combo box list and current selection
LIST listDrives;
STRING svDrive, svReturnString,szMsg,svNewPath;
begin
nReturn = EzDefineDialog("ChangeDrive", ISUSER, "ChangeDrive", 0);
bDone = FALSE;
// create the list containing the combo box items
listDrives = ListCreate(STRINGLIST);
// fill the list with all available drive letters
GetValidDrivesList(listDrives, -1, -1);
CtrlSetCurSel("ChangeDrive", DRVCOMBOBOX1, svDrive);
while (!bDone)
nControl = WaitOnDialog("ChangeDrive");
switch (nControl)
case 2, DLG_CLOSE:
Do(EXIT); // The user clicked the window's close button.
case DLG_ERR:
MessageBox ("Dialog failed.", SEVERE);
bDone = TRUE;
case DLG_INIT:
// associate the list with the combo box
CtrlSetList("ChangeDrive", DRVCOMBOBOX1, listDrives);
// get the first drive letter from the list...
ListGetFirstString(listDrives, svDrive);
// ...and make it the current selection
CtrlSetCurSel("ChangeDrive", DRVCOMBOBOX1, svDrive);
case SD_PBUT_EXITSETUP: //Cancel button
Do(EXIT);
bDone=TRUE;
case SD_PBUT_BACK:
ListDestroy(listDrives);
EndDialog("ChangeDrive"); // Close the dialog box.
ReleaseDialog("ChangeDrive"); // Free the dialog box from memory.
return BACK;
case SD_PBUT_CANCEL: //Esc key
Do(EXIT);
case SD_PBUT_CONTINUE: // Continue on
CtrlGetCurSel("ChangeDrive", DRVCOMBOBOX1, svDrive);
svNewPath = svDrive + ":\\Program Files\\MYAPP\\"; //+ svNewPath;
TARGETDIR = svNewPath;
ParsePath(svReturnString, TARGETDIR, PATH);
szMsg = "Installation Path has been updated:\n\n %s";
SprintfBox (INFORMATION, "Target Drive" , szMsg, svReturnString);
bDone = TRUE;
endswitch;
endwhile;
// get the end user's selection, and display it in a message box
// MessageBox("You selected drive " + svDrive, INFORMATION);
ListDestroy(listDrives);
EndDialog("ChangeDrive");
ReleaseDialog("ChangeDrive");
return nReturn;
end;
I was also trying to figure a way to set the selection to the current drive used in TARGETDIR, but with no luck yet.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 29, 2008
04:34 PM
I found the notes on GETValidDrivesList and have changed the syntex to be
GetValidDrivesList(listDrives,FIXED_DRIVE,200000);
Thank you for help.
GetValidDrivesList(listDrives,FIXED_DRIVE,200000);
Thank you for help.