[問題] InstallScript in Win 8

看板Programming作者 (竹科學友哥)時間10年前 (2013/11/21 12:20), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
各位版大好 想請教 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
文章代碼(AID): #1IZOeYIK (Programming)