InstallScript check if installation path is root drive

397 views Asked by At

How to check if user has selected the root drive for installation. Installation should not proceed if user selects the root drive and prompt user to select another path.

Right now i am using following piece of code, is there better option to do same thing -

if (GetDir (svSelectedDir, svDirNameOnly) < 0) then
        // Report the error.
        MessageBox ("Cannot select the root drive for installation. Please select valid path.", SEVERE);
    else
         // proceed with installation.
endif;
1

There are 1 answers

0
Nothing 2 Lose On

Try using the built-in ROOTDRIVE property. But what exactly is your definition of 'root drive' ?