Installing or Copying Files Depending on the Drive Availability Using WiseScript Editor
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.
- Login or register to post comments
- 536 reads
- Printer-friendly version















