参考:http://evely.blog.51cto.com/1089422/1400965
RegDBGetKeyValueEx函数:
InstallSheild Script Code
1
2 3 4 5 6 |
STRING szKey, szName, svValue;
NUMBER nvSize; RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE); szKey = "\SOFTWARE\Wow6432Node\Office\" + IFX_PRODUCT_VERSION; szName = "Word"; RegDBGetKeyValueEx ( szKey, szName, REGDB_STRING, svValue, nvSize ); |
编译报错:
error 1 numeric value required
对于REGDB_STRING不能直接写于RegDBGetKeyValueEx函数中,需要一个变量来代替REGDB_STRING
修改为:
InstallSheild Script Code
1
2 3 4 5 6 7 8 |
STRING szKey, szName, svValue;
NUMBER nvSize,nvType; RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE); szKey = "\SOFTWARE\Wow6432Node\Office\" + IFX_PRODUCT_VERSION; szName = "Word"; nvType = REGDB_STRING; RegDBGetKeyValueEx ( szKey, szName, nvType, svValue, nvSize ); |