作者renmax (竹科学友哥)
看板Programming
标题[问题] InstallScript in Win 8
时间Thu Nov 21 12:20:48 2013
各位版大好
想请教 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新手上路,麻烦各位版大不吝赐教
谢谢>"<
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 220.129.16.46