Hi:
I want to check the free disk space on the System Drive, but look like the "Check Disk Space" doesn't accept any variable in Disk Path field. I always get 0. The hard coding in the disk path works fine.
Is there any way that I can perform the check using variable?
Thanks
Nhan
Using variable in Get Free Space?
-
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: Using variable in Get Free Space?
Dear Nhan,
are you sure that you are correctly dereferencing the variable you may want to use, in this way: $VARNAME$?
Set Variable MYDISK to C:
Set Variable MYDISKSPACE to 0
Get Free Space on $MYDISK$ into variable MYDISKSPACE
Regards
are you sure that you are correctly dereferencing the variable you may want to use, in this way: $VARNAME$?
Set Variable MYDISK to C:
Set Variable MYDISKSPACE to 0
Get Free Space on $MYDISK$ into variable MYDISKSPACE
Regards
Francesco Toscano
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Re: Using variable in Get Free Space?
Hi Francesco:
It's my bad. I didn't hard code the drive letter in a variable. I get it from Windows environment variable and I made mistake by wrapping the variable in %% in IA command.
Thanks
Nhan
It's my bad. I didn't hard code the drive letter in a variable. I get it from Windows environment variable and I made mistake by wrapping the variable in %% in IA command.
Thanks
Nhan
-
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: Using variable in Get Free Space?
No problem!
Francesco Toscano
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Re: Using variable in Get Free Space?
I'm having an issue with the free space check.
It works in most cases but we have 2 computers with plenty of space where it fails. in one computer $DISKSPACE$ is: 193022922752. The other one that fails has: 127458758656. They are both under 200GB but the check is for 20GB (21474836480)
After the message box it says there isn't enough space. See anything I did wrong?
~InstallAware Clipboard Data~
~End~
~{754B80BE-AED9-4133-9084-AFF87E9D4114}~
~End~
~{ABB09760-9480-4828-9A91-2A6B4BEAC841}~
~Else~
~{B8C62BD6-1434-460A-9738-0B7EA1ECCE07}~
~Terminate Install~
~{3484A0D6-A3F5-45F7-BA40-A96E16A8A3EB}~
~If~
~{6BD013FB-BEEF-4BBF-BDD4-74F578B9665D}~
~DISKSPACEWARNING~
~0~
~NO~
~FALSE~
~MessageBox~
~{CBEC975A-D939-4ACB-8232-95522CAEFB52}~
~Not Enough Disk Space~
~The setup requires at least 20GB of free disk space. $NEWLINE$$NEWLINE$You can press Yes to continue if you choose Personalized setup and install the Images on a secondary drive. $NEWLINE$$NEWLINE$Or, press No to cancel the installation. ~
~1~
~4~
~DISKSPACEWARNING~
~If~
~{331C1D0E-90E7-4A94-877B-AA7E6BBDA832}~
~DISKSPACE~
~2~
~$20GB$~
~TRUE~
~MessageBox~
~{1221A00B-7B4D-454D-A3EA-E2A49D2C0529}~
~DISK SPACE~
~$DISKSPACE$$NEWLINE$$NEWLINE$Compares with 20GB:$NEWLINE$$20GB$~
~0~
~1~
~~
~Set Variable~
~{D7ED7B5A-A1A4-45DB-9101-41AE6ED2C781}~
~20GB$MYAH$MYAH$FALSE~
~21474836480~
~Check Disk Space~
~{3AB40F9F-AD0C-492B-B6F4-D7AE051610EF}~
~DISKSPACE~
~$CDRIVE$~
~TRUE~
~FALSE~
It works in most cases but we have 2 computers with plenty of space where it fails. in one computer $DISKSPACE$ is: 193022922752. The other one that fails has: 127458758656. They are both under 200GB but the check is for 20GB (21474836480)
After the message box it says there isn't enough space. See anything I did wrong?
~InstallAware Clipboard Data~
~End~
~{754B80BE-AED9-4133-9084-AFF87E9D4114}~
~End~
~{ABB09760-9480-4828-9A91-2A6B4BEAC841}~
~Else~
~{B8C62BD6-1434-460A-9738-0B7EA1ECCE07}~
~Terminate Install~
~{3484A0D6-A3F5-45F7-BA40-A96E16A8A3EB}~
~If~
~{6BD013FB-BEEF-4BBF-BDD4-74F578B9665D}~
~DISKSPACEWARNING~
~0~
~NO~
~FALSE~
~MessageBox~
~{CBEC975A-D939-4ACB-8232-95522CAEFB52}~
~Not Enough Disk Space~
~The setup requires at least 20GB of free disk space. $NEWLINE$$NEWLINE$You can press Yes to continue if you choose Personalized setup and install the Images on a secondary drive. $NEWLINE$$NEWLINE$Or, press No to cancel the installation. ~
~1~
~4~
~DISKSPACEWARNING~
~If~
~{331C1D0E-90E7-4A94-877B-AA7E6BBDA832}~
~DISKSPACE~
~2~
~$20GB$~
~TRUE~
~MessageBox~
~{1221A00B-7B4D-454D-A3EA-E2A49D2C0529}~
~DISK SPACE~
~$DISKSPACE$$NEWLINE$$NEWLINE$Compares with 20GB:$NEWLINE$$20GB$~
~0~
~1~
~~
~Set Variable~
~{D7ED7B5A-A1A4-45DB-9101-41AE6ED2C781}~
~20GB$MYAH$MYAH$FALSE~
~21474836480~
~Check Disk Space~
~{3AB40F9F-AD0C-492B-B6F4-D7AE051610EF}~
~DISKSPACE~
~$CDRIVE$~
~TRUE~
~FALSE~
Re: Using variable in Get Free Space?
This topic applies to InstallAware Multi Platform as well.
Thanks for the report.
Seems like a classic Integer overflow as I wasn't able to reproduce it with my actual free disk space, but it reproduced with both of the values you generously provided.
Escalated for a fix. My hunch is they're using 32 bit integers for If comparisons, instead of 64 bit integers.
Thanks for the report.
Seems like a classic Integer overflow as I wasn't able to reproduce it with my actual free disk space, but it reproduced with both of the values you generously provided.
Escalated for a fix. My hunch is they're using 32 bit integers for If comparisons, instead of 64 bit integers.
John Gaver
InstallAware Skunkworks
InstallAware Multi Platform - Liberating DEB/RPM/PKG/MSI(X) into universal native setups!
Get your free copy today - https://www.installaware.com/installaware-multi-platform.htm
InstallAware Skunkworks
InstallAware Multi Platform - Liberating DEB/RPM/PKG/MSI(X) into universal native setups!
Get your free copy today - https://www.installaware.com/installaware-multi-platform.htm
Who is online
Users browsing this forum: No registered users and 26 guests