Video Screencast Help
Search Video Help Close Back
to help
New in the Rewards Catalog: Vouchers for "Symantec Technical Specialist" and "Symantec Certified Specialist" exams.

Installing or Copying Files Depending on the Drive Availability Using WiseScript Editor

Updated: 06 May 2008
WiseUser's picture
0 0 Votes
Login to vote

Scenario: If D drive is present then the application should install in D drive instead of the primary active drive.

Solution: This can be done using the system search function in Wise Package Studio.

Step 1: We can set a variable VARDIR to Null in properties section.

Step 2: In System Search choose search type : File \ Directory, Property Name as VARDIR, Search Value as D:\.

Step 3: Write a Set directory Custom action that sets the installdir to the install dir, say D:\apps\CATS and set the condition as VARDIR<> NULL.

VARDIR variable gets the value as D:\ when D drive is present and writable, hence the application will install the files to the said drive D:\apps\CATS.

If it returns NULL, meaning the D drive is absent, then the install dir will be the primary drive. That will be c:\ in most of the cases.