~InstallAware Clipboard Data~ ~Comment~ ~{6F51E23D-1FC5-49D4-9667-9C9F9378EA24}~ ~~ ~Comment~ ~{302995BB-9EE9-45DF-82F5-70F50598A74C}~ ~TODO: Another potential is to check for invalid characters (including some UNICODE chars) in the directory name.~ ~Comment~ ~{AEF430E3-0702-4422-9382-8A2B35561530}~ ~ But that will involve managing non-existing folders in most cases, so I don't really want to broach that code.~ ~Comment~ ~{3CA7DC15-C2EB-4812-BFFD-77313DAEBB45}~ ~TODO: Some potential other checks are to check that we can also write to the directory selected.~ ~Comment~ ~{DC29F920-600E-4CAF-98C8-11270495E3E6}~ ~~ ~Code Folding Region~ ~{13E9DF86-2AFF-4344-8678-4A4883D3EB55}~ ~FALSE~ ~Copy of Copy of Copy of ~ ~Delete Files~ ~{C019766E-B25E-405B-8945-BE2A9050F9AE}~ ~$TARGETDRIVE$:\~ ~TestForWrite.txt~ ~TRUE~ ~FALSE~ ~End~ ~{BBF62F20-7D6A-4C75-AD77-C92D25D2BB9A}~ ~GoTo Label~ ~{439FDC5E-CA66-4973-8FD8-271954E829B7}~ ~Destination Directory~ ~MessageBox~ ~{8799A593-D60E-4A45-ABCE-6120FD552012}~ ~$TITLE$ Setup~ ~Sorry, the installation drive that you have selected is not writable. Please click OK and choose a new drive.~ ~2~ ~1~ ~~ ~Comment~ ~{E8F87CDC-ECAE-4680-A623-5A280F78074F}~ ~Drive is not writable.~ ~If~ ~{D4D0439A-A80F-4497-9FB9-12DB38BC9517}~ ~TEST_FILE_EXISTS~ ~0~ ~FALSE~ ~FALSE~ ~Does File/Folder Exist~ ~{4E813C71-DB06-4F1B-B0D9-9DAAA483BEEE}~ ~TEST_FILE_EXISTS~ ~$TARGETDRIVETEST$~ ~TRUE~ ~Write to Text File~ ~{7D3D2AD1-851F-481C-9663-FF1EB3E3D8EB}~ ~$TARGETDRIVETEST$~ ~Writable!~ ~FALSE~ ~TRUE~ ~Set Variable~ ~{374E56C5-84C9-4985-82C8-4E98FF0FC7A6}~ ~TARGETDRIVETEST$MYAH$MYAH$FALSE~ ~$TARGETDRIVE$:\TestForWrite.txt~ ~Code Folding Region~ ~{E20BD272-9C40-4D72-852D-F2E5E025628D}~ ~TRUE~ ~Validate Ability to Write to Drive~ ~Comment~ ~{4A3617DC-6C68-455F-A104-0F16D0B436DD}~ ~Check that the drive selected is writable.~ ~Comment~ ~{285A7DAC-5AF6-400C-A474-757CEB4D253C}~ ~~ ~Code Folding Region~ ~{C3FE5B4F-3DC6-46A6-B2F3-81D67046E80F}~ ~FALSE~ ~Copy of Copy of ~ ~End~ ~{81BC62D3-063F-4BE2-856C-4BE494C56D39}~ ~End~ ~{93B9750D-1EC2-4375-9DF5-DCA0615D44E1}~ ~GoTo Label~ ~{33395CE9-3E4E-4725-B0BD-638D4538671E}~ ~Destination Directory~ ~MessageBox~ ~{381DD8C6-CFBE-44D4-AA86-02B481C471C0}~ ~$TITLE$ Setup~ ~Sorry, the installation drive that you have selected does not have enough free hard drive space. Please click OK and choose a new drive.~ ~2~ ~1~ ~~ ~Comment~ ~{A00B5450-087D-4511-81EC-1F763512FF1E}~ ~Not enough free space~ ~If~ ~{59B447AD-8393-4B89-9659-3EFA33BB368B}~ ~TARGETDRIVESPACE_MB~ ~2~ ~$INSTALLSIZE_MB$~ ~TRUE~ ~Mathematics~ ~{41FB0766-6F9C-4CD2-88B1-ED79212008BC}~ ~$TARGETDRIVESPACE_MB$~ ~100~ ~3~ ~TARGETDRIVESPACE_MB~ ~Mathematics~ ~{B74C95D7-0DB4-4CF6-AE15-E6B1ED9C325F}~ ~$TARGETDRIVESPACE_MB$~ ~95~ ~2~ ~TARGETDRIVESPACE_MB~ ~Parse String~ ~{8647F2EC-626D-49FC-80CC-515B2DD62CDF}~ ~$TARGETDRIVESPACE$~ ~6~ ~TARGETDRIVESPACE_MB~ ~~ ~3~ ~FALSE~ ~FALSE~ ~Comment~ ~{9E0994CF-3939-479A-8EB4-BD1B3EB3289D}~ ~Just chopping last 6 leaves the variable ~5% off.~ ~Comment~ ~{4A891918-CCCF-4359-9F37-6ECC48309321}~ ~Should really divide by 1048576, but InstallAware (before 9.01) can't handle sizes bigger than 2GB.~ ~Parse String~ ~{82802536-0DEF-4D3E-84C7-3CE9E4F7B64C}~ ~$DRIVE_SPACE_TEXT$~ ~bytes free~ ~TARGETDRIVESPACE~ ~~ ~0~ ~TRUE~ ~TRUE~ ~Parse String~ ~{1B9B1EB7-3EE8-4C36-A8DF-11CABADADE94}~ ~$DRIVE_SPACE_TEXT$~ ~Dir(s)~ ~~ ~DRIVE_SPACE_TEXT~ ~0~ ~TRUE~ ~TRUE~ ~Parse String~ ~{70EA8275-9E52-4834-898C-20ED6638752F}~ ~$DRIVE_SPACE_TEXT$~ ~$NEWLINE$~ ~~ ~DRIVE_SPACE_TEXT~ ~1~ ~TRUE~ ~FALSE~ ~Read from Text File~ ~{473B8701-41E7-46B6-9C15-498D5E083954}~ ~#READALL\$LOGPATH$DriveSpace$TARGETDRIVE$.txt~ ~DRIVE_SPACE_TEXT~ ~~ ~Run Program~ ~{79B21852-6AE9-4C25-A413-1BB321581103}~ ~$CMD_EXE$~ ~TRUE~ ~/c dir $TARGETDRIVE$:\ /-c /w > "$LOGPATH$DriveSpace$TARGETDRIVE$.txt"~ ~TRUE~ ~~ ~Comment~ ~{9F2407BF-C512-4E8D-AE2B-FC14A1AB16E4}~ ~Run the dir command with the "no commas" option (/-c) and the "compact output" option (/w).~ ~Get Environment~ ~{7229D53B-C7DB-4DFE-8141-487B791103E5}~ ~ComSpec~ ~CMD_EXE~ ~If~ ~{78F1230C-B948-4C5A-84E7-AD5CD62F29F1}~ ~INSTALLSIZE_MB~ ~0~ ~~ ~TRUE~ ~End~ ~{44DF8091-A31D-42FF-91A6-179AC8509AAE}~ ~End~ ~{46E8B6B1-3250-44B1-A81E-B074C73089E2}~ ~Mathematics~ ~{647B147A-5C6B-41AE-8913-B3541C6F1E98}~ ~$INSTALLSIZE$~ ~1048576~ ~3~ ~INSTALLSIZE_MB~ ~If~ ~{BEE358F2-245C-496C-9E86-3F880F57B83D}~ ~INSTALLSIZE~ ~0~ ~~ ~TRUE~ ~If~ ~{31D460C2-CF09-4D09-B769-3F23D004D2B7}~ ~INSTALLSIZE_MB~ ~0~ ~~ ~FALSE~ ~Comment~ ~{0A9180F6-A512-4951-A0D6-B6C5C5109AB6}~ ~ Also, it would be nice to check for IA 9.01 and just do the proper calculation in that case.~ ~Comment~ ~{490581AD-4CC7-49D8-97C8-A27DEF8B32EF}~ ~ Maybe this would be better with some manual division instead of using "Mathematics" and digit-dropping.~ ~Comment~ ~{A81BEA0C-0066-428A-A6F3-7F93B0D66381}~ ~ (especially if the free space is less than 1MB or more than 1TB).~ ~Comment~ ~{A55B4AFD-BCDB-42C8-8B68-32BDEDF51A03}~ ~TODO: Some potential cleanup and error checking around how much drive space is left~ ~Code Folding Region~ ~{71FCB15E-0912-4646-BB95-2222C3887B10}~ ~TRUE~ ~Validate Drive Free Space~ ~Comment~ ~{3E8D3877-6EF4-44EA-9F9F-B8394E7D1623}~ ~Check install will fit on target drive. NOTE: This check is not exact!~ ~Comment~ ~{E7615535-D57C-4375-B2B6-B460526A553C}~ ~~ ~Code Folding Region~ ~{6064F176-F606-49C2-9C9A-574992B11D41}~ ~FALSE~ ~Copy of Copy of Copy of Copy of ~ ~End~ ~{93502DE1-A84C-4299-B564-7BB960FE27E7}~ ~GoTo Label~ ~{C8BA8F2F-11C3-442F-970C-E6FD0EA7D25A}~ ~Destination Directory~ ~MessageBox~ ~{95A47D84-8EE8-4BB5-8BE4-DE7573BBBE98}~ ~$TITLE$ Setup~ ~Sorry, the installation drive that you have selected is not a valid local hard disk. Please click OK and choose a new drive.~ ~2~ ~1~ ~~ ~Comment~ ~{972095FF-2BDE-441A-A86B-1785C3261A9F}~ ~Drive is not a fixed drive on the system.~ ~If~ ~{32246CD8-125F-417B-91DF-0F1C8ABF779B}~ ~DRIVE_TYPE~ ~0~ ~3~ ~TRUE~ ~Comment~ ~{95F5A471-46B3-44C7-9441-53D89B9348D1}~ ~~ ~Comment~ ~{71F91F87-E018-4B6F-8363-1C09C681AA5D}~ ~ 6 means RAM disk (it's your call on this one, but I wouldn't recommend it)~ ~Comment~ ~{DA90AC2C-7D47-4CE1-8BD9-9F2E4461B701}~ ~ 5 means CD-ROM drive (Don't attempt to install here)~ ~Comment~ ~{00681D69-E6DA-4ABE-A0A4-48CC64F6A397}~ ~ 4 means remote disk (usually a network share; also a bad sign of potential install disk)~ ~Comment~ ~{1776E6A7-4C8D-4A6C-9E0C-31D90E5D3D9B}~ ~ 3 means fixed drive~ ~Comment~ ~{FF6D4958-ED1B-468C-8D06-0FC07BE98D17}~ ~ 2 means removable drive (also a bad sign of potential install disk)~ ~Comment~ ~{8079446C-803B-4549-A198-CE2F7AE4CB30}~ ~ 1 means that the drive has no root directory to check (also a bad sign of potential install disk)~ ~Comment~ ~{F203A1C4-E07B-4BAA-B01A-2EB92946C643}~ ~ 0 means that the drive type is unknown (a bad sign of potential install disk)~ ~Comment~ ~{499D7B67-D312-457B-B130-2CD16ECB83D8}~ ~DRIVE_TYPE will be set to one of the following:~ ~Call DLL Function~ ~{4E3B0D13-5A75-46C7-9F7F-D15E419D2C92}~ ~$WINSYSDIR$kernel32.dll,GetDriveTypeA,word,DRIVE_TYPE,"pointer to string",$TARGETDRIVE$:\,$~ ~mIDEFunc.dll\mEXEFunc.dll~ ~Set Variable~ ~{FD94EBBC-3DD8-4344-AAEA-F84ADBB0C7C9}~ ~DRIVE_TYPE$MYAH$MYAH$FALSE~ ~~ ~Code Folding Region~ ~{591EFCAD-19AB-4FF0-9FF5-920FC985E732}~ ~TRUE~ ~Validate Drive Type~ ~Comment~ ~{3FF0E2B3-39E8-4393-8F5B-CA900A41159D}~ ~Check that the drive is a local hard disk.~ ~Comment~ ~{B678A9C6-C0DC-470A-8782-5D36EF28C649}~ ~~ ~Code Folding Region~ ~{F8857D3D-D8D9-4014-B08F-5E236A590149}~ ~FALSE~ ~Copy of ~ ~End~ ~{A912C507-A56F-41EC-9888-11DFCC4E5932}~ ~GoTo Label~ ~{A47493B1-DCC3-4908-93F2-11F2C75765D3}~ ~Destination Directory~ ~MessageBox~ ~{BCD4E06B-DA97-4D0C-9E04-08F90EC5F20A}~ ~$TITLE$ Setup~ ~Sorry, the installation drive that you have selected is not valid. Please click OK and choose a new drive.~ ~2~ ~1~ ~~ ~Comment~ ~{F10C2018-BE15-42BA-9C8C-81DC98C371E8}~ ~Drive does not exist.~ ~If~ ~{4DEC6D56-40AA-434C-83A0-E523F503394A}~ ~DRIVE_EXISTS~ ~0~ ~FALSE~ ~FALSE~ ~Does File/Folder Exist~ ~{903093F9-66C3-430D-99B8-02C0E8424943}~ ~DRIVE_EXISTS~ ~$TARGETDRIVE$:\~ ~FALSE~ ~Code Folding Region~ ~{F2C5708E-096C-47AB-86D2-52F8BC8BC865}~ ~TRUE~ ~Validate Drive Exists~ ~Comment~ ~{E95CFA83-B311-4F3F-B89D-801912C16C4D}~ ~Check to verify the drive exists.~ ~Comment~ ~{4A77A853-9408-45D6-8B4D-91493E29005A}~ ~~ ~Code Folding Region~ ~{34B7E95F-F84A-45EB-ADD9-75F67B01BFF5}~ ~FALSE~ ~~ ~End~ ~{C82204E0-CD6B-4C21-A1D5-AD9757899B78}~ ~GoTo Label~ ~{8B4EE436-C814-4CD1-B3CB-E12BB1D98709}~ ~Destination Directory~ ~MessageBox~ ~{0CE3FA88-C76D-4362-8D67-351372977B5B}~ ~$TITLE$ Setup~ ~Sorry, the installation drive that you have selected does not exist. Please click OK and choose a new drive.~ ~2~ ~1~ ~~ ~Comment~ ~{3FD60245-C6B9-4D1C-AA48-C23CF398BE89}~ ~No drive specified~ ~If~ ~{FE57FEB4-A546-4095-9164-EE7365DE50BF}~ ~TARGETDRIVE~ ~0~ ~~ ~FALSE~ ~Code Folding Region~ ~{CADC2294-89CF-431E-84E2-CCEBEE94A84E}~ ~TRUE~ ~Validate Drive Letter~ ~Comment~ ~{1BBA3C06-2793-4E79-A939-FF8E21DB6B14}~ ~Check to make sure there is a drive letter and a colon.~ ~Comment~ ~{0A88B291-1D78-433F-AE85-0509586EC4C0}~ ~~ ~Parse String~ ~{DACD92C9-3F5A-4A9D-B91B-2E8985CC3224}~ ~$TARGETDIR$~ ~:~ ~TARGETDRIVE~ ~~ ~0~ ~TRUE~ ~FALSE~ ~End~ ~{8F085C52-AC0E-4AEE-94FC-9371C2939C0B}~ ~Convert Path~ ~{BB9C4E9B-A0DF-4432-8899-92E1B0690358}~ ~LOGPATH~ ~FALSE~ ~Set Variable~ ~{B90F35C4-1630-4F27-9B2E-F2D828CC96C8}~ ~LOGPATH$MYAH$MYAH$FALSE~ ~$TEMPDIR$~ ~If~ ~{F90B141A-B61A-49FF-AE22-31662E20A07F}~ ~LOGPATH~ ~0~ ~~ ~FALSE~ ~Comment~ ~{940FDAD4-DD6A-45BE-A5B4-149AED11735F}~ ~~ ~Comment~ ~{5F63345B-9500-4E81-9ED2-50EB1833669C}~ ~ - drive set in TARGETDIR is writable~ ~Comment~ ~{1BCD0535-BC8C-4D9D-9034-3C9B08F441AF}~ ~ - enough free space on the hard drive (compared to INSTALLSIZE_MB or INSTALLSIZE)~ ~Comment~ ~{15BA105C-2337-4C5B-9DC5-4092AF8199ED}~ ~ - drive is a local fixed hard drive~ ~Comment~ ~{C0BA6DB8-B9F0-43B4-B889-F608FC87E05C}~ ~ - drive set in TARGETDIR exists~ ~Comment~ ~{40BCE1A8-A099-40D2-B545-ABDF8EAB7752}~ ~ - TARGETDIR starts with a letter and a colon (:)~ ~Comment~ ~{201B6AFD-40B5-4F91-87B4-C37AFE4DB42D}~ ~This script checks for:~ ~Comment~ ~{4A75BC2E-1DF5-4E10-A5B6-4729252ACE23}~ ~~ ~Comment~ ~{AE958EFA-4EFE-4F68-8E70-E401B5790DC8}~ ~This script also uses TITLE for dialog popups, INSTALLSIZE (or INSTALLSIZE_MB), and GoTo Label "Destination Directory"~ ~Comment~ ~{3475589B-32DF-43C0-9D2E-90FAE71E2FB9}~ ~have a "Destination Directory" label just before the dialog.~ ~Comment~ ~{54414876-A78D-476A-9A50-0642F0E7A005}~ ~Drive Validation; must have TARGETDIR set by Destination Directory dialog and~