Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 3rd May 2012, 16:01   #1
elunkes
Junior Member
 
Join Date: Aug 2008
Location: Sao Paulo - Brazil
Posts: 5
problem with calc

Hi,


I am collecting the size of a HD on a remote server using WMIC this way:

Strcpy $ R0 '"$ SYSDIR \ cmd.exe" / c "wmic / node: SRVAPS04 volume where (DriveLetter like"D:") get Capacity | more +1"'
nsExec ExecToStack :: $ R0

This correctly returns the value in bytes ($R2 = 163370233856), but when I try to calculate something with the value returned is the result of wrong calculation

ex.: IntOp $R2 $R2 * 1
returns 161476608

totally different value than expected

what kind of calculation NSIS is doing to bring this result?
elunkes is offline   Reply With Quote
Old 3rd May 2012, 17:41   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
NSIS uses 32-bits. Use System::Int64Op.

Stu

Need an installer? http://www.afrowsoft.co.uk
Afrow UK is offline   Reply With Quote
Old 3rd May 2012, 20:02   #3
elunkes
Junior Member
 
Join Date: Aug 2008
Location: Sao Paulo - Brazil
Posts: 5
Thanks Afrow... thats it!
elunkes is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump