如何计算installshield项目中功能的大小 [英] how to calculate the size of feature in installshield project
本文介绍了如何计算installshield项目中功能的大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想计算installshield项目中功能DLL(dll + exe + xml)的大小,以将大小设置为程序和控制面板中的功能.
代码是..
I want to calculate the size of feature DLLs(dll+exe+xml) in installshield project to set the size into the programms and feature in control panel.
code is..
function OnEnd()
STRING szInstallLocation,str;
NUMBER nsize1,nsize2;
begin
szInstallLocation=szSDKDirectory;
RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);
nsize=FeatureTotalSize(MEDIA,"DLLs",TRUE,TRUE);
nsize=(nsize/1024);
NumToStr(str,nsize);
RegDBSetKeyValueEx("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall" ^PRODUCT_GUID, "EstimatedSize", REGDB_NUMBER, str, -1);
end;
在Win7上正确(大小= 17.2mb),但在WinXP上错误(大小= 1001mb).
请帮助我!
On Win7 it is correct(size=17.2mb) but on WinXP it wrong(size=1001mb).
please help me!
推荐答案
这对您不起作用
This doesn''t work for you
RegDBSetKeyValueEx("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall" ^PRODUCT_GUID, "EstimatedSize", REGDB_NUMBER, "nsize", -1);
难怪nsize
是要写入注册表项的值,但是您是将字符串"nsize"
写入注册表项.
您必须将nsize转换为字符串,然后使用该字符串.
No wonder nsize
is the value you wish to write to the registry key, but you''re writing the string "nsize"
to the registry key.
You have to convert nsize to a string and then use that string.
这篇关于如何计算installshield项目中功能的大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文