[问题] InstallScript in Win 8

楼主: renmax (竹科學友哥)   2013-11-21 12:20:48
各位版大好
想请教 InstallScript 中 WriteProfString function 的问题
WriteProfString Example 网址:http://ppt.cc/K1a5
====== 以下为 WriteProfString Example Code ======
// Define the initialization file name.
#define EXAMPLE_INI WINDIR ^ "ISExampl.ini"
// Define the initialization item and its new value.
#define SECTION "Windows"
#define KEYNAME "Keyboard"
#define KEYVALUE "English"
// Include Ifx.h for built-in InstallScript function prototypes.
#include "Ifx.h"
export prototype ExFn_WriteProfString(HWND);
function ExFn_WriteProfString(hMSI)
begin
// Update a field in the initialization file.
if (WriteProfString (EXAMPLE_INI, SECTION, KEYNAME, KEYVALUE) < 0) then
// Report the error.
SprintfBox (SEVERE, "WriteProfString",
"%s could not be updated", EXAMPLE_INI);
else
// Report success.
SprintfBox (INFORMATION, "WriteProfString", "%s was modified.", EXAMPLE_INI);
endif;
end;
====== 以上为 WriteProfString Example Code ======
备注:已在windows资料夹内摆上ISExampl.ini,内容为↓
[Windows]
PATH=\123\456\
Keyboard=Chinese
遇到的问题:
将以上code Build成 MSM档后,再将MSM档弄成MSI档,并在OS中执行MSI档
在windows XP是 Report success,但是在windows 8执行却是 Report the error
请问是不是因为win8 在 Installshield有什么限制,才无法正常执行WriteProfString Example Code?
Installshield新手上路,麻烦各位版大不吝赐教
谢谢>"<

Links booklink

Contact Us: admin [ a t ] ucptt.com