inno setup - InnoSetup: FileSize -


i need size of file. need check if file more 100b example:

if filesize('c:\program files\myprogramm\myapp.exe') > 100          msgbox ('file more 100', mbinformation,mb_ok)    else       msgbox ('file less 100', mbinformation,mb_ok) 

i function filesize(const name: string; var size: integer): boolean; , it's work if need check - size correct or not. cann't check on more or less

the var keyword in function prototype means need declare variable of given type , pass function. variable receives value. here example filesize function:

var   size: integer; begin   // second parameter of filesize function defined 'var size: integer',   // need pass there variable of type integer, size variable   // declared above   if filesize('c:\thefile.any', size)   begin     if size > 100       msgbox('the file bigger 100b in size.', mbinformation, mb_ok)     else       msgbox('the file smaller 100b in size.', mbinformation, mb_ok);   end   else     msgbox('reading file size failed.', mberror, mb_ok); end; 

Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -