installshield简明教程

installshield简明教程

ID:37538814

大小:4.18 MB

页数:187页

时间:2019-05-24

上传者:山楂树
installshield简明教程_第1页
installshield简明教程_第2页
installshield简明教程_第3页
installshield简明教程_第4页
installshield简明教程_第5页
资源描述:

《installshield简明教程》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库

InstallShieldㅔᯢՓ⫼ᬭ⿟InstallShieldㅔᯢՓ⫼ᬭ⿟⿟⿟1 InstallShieldㅔᯢՓ⫼ᬭ⿟InstallShieldㅔᯢՓ⫼ᬭ⿟[԰㗙ㅔҟ]ϕ᳝੠ˈ⬋ˈ69ᑈ8᳜ߎ⫳ˈ∳㢣फҀҎˈ䆆Ꮬˈ⸩຿ˈ⦄ᠻᬭѢफҀᏜ㣗໻ᄺ⬉⇨Ϣ⬉ᄤᎹ⿟ᄺ䰶DŽ䭓ᳳҹᑈˈ԰㗙ϔⳈᇱ䆩CADǃCAMǃCAPPঞCAIⱘⷨお੠ᓔথˈ೼᷵ᄺ᡹ঞ೑ݙ݊ᅗߞ⠽Ϟথ㸼໮㆛᭛ゴˈ݊ЁljUCDOSⶶ䞣∝ᄫᑧⱘՓ⫼ᡔᴃNJথ㸼೼ljᖂ䅵ㅫᴎᑨ⫼NJ1997ᑈ㄀3ᳳˈljVC++᥻ӊⱘ∝ᄫঞ买㡆ⱘ㓪⿟᥻ࠊNJথ㸼೼lj䅵ㅫᴎᑨ⫼NJ1999ᑈ㄀2ᳳDŽࠡ㿔ǂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂǂˍ㄀1ゴInstallShield䲚៤ᓔথ⦃๗ĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂǂˎ1.1䲚៤ᓔথ⦃๗ὖ䗄1.2㦰ऩᷣ੠Ꮉ݋ᷣ1.3乍ⳂᎹ԰ऎにষ1.4䲚៤ᓔথ⦃๗ⱘ߱ℹᅲ䏉㄀2ゴInstallScript㛮ᴀ䇁㿔෎⸔ĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂˍˍ2.1InstallScript⿟ᑣ㒧ᵘ2.2᭄᥂㉏ൟǃ䖤ㅫヺϢ㸼䖒ᓣ2.3䘏䕥䖤ㅫ੠߸ᮁ䗝প᥻ࠊ2.4ᕾ⦃䇁হ2.5ߑ᭄2.6ᄫヺІ᪡԰2.7㒧ᵘԧ㉏ൟ੠ᣛ䩜2.8䫒㸼2.9㓪䆥乘໘⧚2.10᭛ӊঞ᭛ӊ།᪡԰2.11ᐌ⫼ᇍ䆱Ḛ᪡԰㄀3ゴ෎ᴀᅝ㺙⿟ᑣⱘᓎゟĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂ˒˓3.1߯ᓎᅝ㺙乍Ⳃ3.2⧚㾷⿟ᑣḚᶊ3.3⏏ࡴ੠ᬍ3.4䗝ᢽၦҟথᏗ㄀4ゴᅝ㺙⬠䴶ⱘ䆒䅵ĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂ˕ˑ4.1ὖ䗄4.2ᑨ⫼໮ၦԧ2 InstallShieldㅔᯢՓ⫼ᬭ⿟4.3⬠䴶ⱘᬜᵰ䆒䅵4.4ᇍ䆱Ḛ⬠䴶ⱘᅮࠊ4.5⬠䴶ⱘ∝࣪㄀5ゴ⏅ܹᅝ㺙⿟ᑣࠊ԰ĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂˍːˌ5.1ডᅝ㺙5.2ᅝ㺙㉏ൟ੠㒘ӊ᥻ࠊ5.3ࠊ԰᭄᥂ᑧᑨ⫼⿟ᑣⱘᅝ㺙5.4໮Ͼᅝ㺙⿟ᑣ5.5ᅝ㺙⿟ᑣⱘ䇗䆩ǂǂ䰘ᔩAՓ⫼InstallShield㋏㒳ব䞣ⱘ㔎ⳕؐǂǂ䰘ᔩBՓ⫼InstallShieldforVisualC++6.0ǂǂ䰘ᔩC᳔ᮄInstallShieldѻકՓ⫼ㅔҟ3 InstallShieldㅔᯢՓ⫼ᬭ⿟ࠡࠡࠡ㿔㿔㿔ǂǂ೼DOSᯊҷˈҎӀϡӮᖬ䆄ˈᛇ㽕ࠊ԰ϔϾᑨ⫼⿟ᑣⱘᅝ㺙ᕔᕔᰃ䗮䖛ᡍ໘⧚᭛ӊᴹᅲ⦄ⱘˈ䖭⾡亢Ḑⱘᅝ㺙⿟ᑣᐌᐌҸҎӀФℸϡ⮆DŽⳈࠄUCDOS೒ᔶᅝ㺙⬠䴶ⱘߎ⦄ˈᠡ䅽ҎᛳࠄϔѯᮄᛣˈᑊЎПϔᤃDŽ✊㗠ϡЙˈ݋᳝ᯧᄺᯧ⫼ⱘ೒ᔶ⫼᠋⬠䴶ǃ໮ӏࡵࡳ㛑ⱘWindows㋏㒳ߎ⦄њˈᑊ໻᳝পҷDOSⱘ䍟࢓DŽⳈࠄWindows95ⱘ䯂ϪˈᠡՓᕫDOSⳳℷবЎ䖛এˈ៤ЎPCᴎϞ᳔⌕㸠ⱘ᪡԰⦃๗ˈᑊϨ䱣ⴔWindows98ϢInternetExplorer䲚៤ⱘᮄ⡍ᗻⱘᓩܹˈ䍞ᴹ䍞໮ⱘ⿟ᑣਬᏆᓔྟ㟈࡯ѢWindowsᑨ⫼⿟ᑣⱘⷨおϢᓔথDŽǂǂৠḋˈᅝ㺙⿟ᑣⱘ䖤㸠⦃๗г⬅ॳᴹⱘDOSব៤њ⦄೼ⱘWindows㋏㒳DŽᅝ㺙ϔϾ䕃ӊ៪ᑨ⫼⿟ᑣᏆϡݡҙҙᰃᇚⳌ݇ⱘ᭛ӊ໡ࠊࠄ⹀ⲬЁˈ㗠ᰃᖙ乏ܕ䆌⫼᠋ᣝ㞾Ꮕⱘᜓᳯ䗝ᢽᅝ㺙㉏ൟ੠ᅝ㺙䏃ᕘˈᑊϨ೼ϡ䳔㽕ⱘᯊ׭ˈ䖬㽕㛑໳ᇚᅝ㺙ⱘⳌ݇ݙᆍܼ䚼ߴ䰸ᥝDŽ䖭⾡Windowsϟⱘᅝ㺙⿟ᑣ㒭ҎӀ⬭ϟњᕜ⏅ⱘॄ䈵ˈҎӀ೼᚞্Office2000ᔎ໻ⱘᅝ㺙ࡳ㛑੠ᙺⳂⱘᅝ㺙⬠䴶ПৢˈᏆ᮴⊩㓈ᣕᇍDOSᅝ㺙⿟ᑣⱘ⬭ᘟDŽInstallShieldᙄᙄᰃ೼䖭⾡᪡԰㋏㒳ϡᮁথሩⱘ╂⌕Ёᑨ䖤㗠⫳ⱘˈҢInstallShield3.0ࠄ5.5ˈҢ᱂䗮ⱘᅝ㺙⿟ᑣࠊ԰ࠄ᳔ᮄⱘWindowsᅝ㺙⬠䴶ˈInstallShield݀ৌᏆᓔথߎ෎ᴀ৘⾡᪡԰ᑇৄ੠䕃ӊᓔথ⦃๗ⱘInstallShieldѻકDŽInstallShieldforMicrosoftVisualC++6(ㅔ⿄InstallShieldVC⠜)੠InstallShieldExpressCustomEditionforC++Builder៪Delphi(ㅔ⿄InstallShieldExpressC++Builder៪Delphi⠜)ህᰃ݊Ё⫼᠋䕗Ў❳ᙝⱘѻકDŽ⬅ѢInstallShieldࡳ㛑ᔎ໻ǃ♉⌏ᗻདǃᅠܼৃᠽሩҹঞ݋᳝ᔎ᳝࡯ⱘ㔥㒰ᬃᣕˈ೼৘⾡ᅝ㺙⿟ᑣᓔথᎹ݋Ё㜅乪㗠ߎˈ៤ЎⳂ᳔ࠡЎ⌕㸠ⱘࠊ԰ᅝ㺙⿟ᑣⱘᎹ݋䕃ӊDŽ㗠Ϩˈᅗ᠔ݙᓎⱘ㛮ᴀ䇁㿔InstallScriptՓᕫ⫼᠋ৃҹڣ݊Ҫ催㑻䇁㿔䙷ḋ♉⌏ഄᵘ䗴ߎ㞾Ꮕⱘᅝ㺙㛮ᴀ⿟ᑣᴹDŽℷᰃ಴Ў䖭ϔ⚍ˈInstallShieldᏆ㒣៤ЎⳂࠡࠊ԰ᅝ㺙⿟ᑣⱘᎹϮᷛޚDŽ⫼᠋᠔❳ᙝⱘVisualStudio98ǃBorlandC++Builder(Delphi)ҹঞⳂࠡ㒱໻໮᭄ⱘ䕃ӊᅝ㺙⿟ᑣഛᰃ⫼InstallShieldᴹࠊ԰ⱘDŽ⬅ѢInstallShield5.5䖬ᬃᣕVisualBasic6.0ˈᬙᴀᬭ⿟ҹInstallShield5.5ϧϮ⠜ЎЏˈᑊҢᑨ⫼ߎথˈ⏅ܹ䆺ᅲഄ䅼䆎ࠊ԰ϔ㠀ᑨ⫼㉏੠᭄᥂ᑧ㉏ᅝ㺙⿟ᑣⱘᮍ⊩ǃᡔᎻҹঞInstallScript䇁㿔෎⸔ˈϨ೼InstallShield⫼᠋⬠䴶ߑ᭄ⱘ෎⸔Ϟˈᣪᥬ݊䖤⫼㛑࡯ˈ᳔໻ഄথ᣹InstallShieldⱘᅮࠊ੠ᠽሩ┰㛑ˈᵘ䗴ߎ乛݋߯ᛣǃࡳ㛑ᅠ୘ⱘᅝ㺙⬠䴶ᴹDŽᴀᬭ⿟Џ㽕䆆䗄InstallShieldᓔথ⦃๗ǃInstallScript㛮ᴀ䇁㿔෎⸔ǃ෎ᴀᅝ㺙⿟ᑣⱘᓎゟǃᅝ㺙⬠䴶ⱘ䆒䅵ҹঞ⏅ܹᅝ㺙⿟ᑣࠊ԰ㄝ݅ѨゴݙᆍDŽ৘ゴݙᆍᑊϡذ⬭೼߱ᄺ㗙ⱘ∈ᑇϞˈ㗠Ϩ೼ࠊ԰ᅝ㺙⿟ᑣⱘ↣Ͼᮍ䴶ˈ䛑㒭ߎњ᳈催ǃ᳈⏅ሖ⃵ⱘᮍ⊩ˈ՟བᅝ㺙ᇍ䆱ḚⱘᅮࠊǃՓ⫼㞾ᏅⱘDLLᑧǃ᪡԰⊼ݠ㸼ǃᅝ㺙⬠䴶ⱘ∝࣪ǃՓ⫼໮ၦԧǃডᅝ㺙ҹঞᅝ㺙⿟ᑣⱘ䇗䆩ㄝDŽǂЎњᐂࡽ䇏㗙ܙߚᥠᦵInstallShield⡍ᗻˈᴀк㒭ߎ໻䞣᳝⫼ⱘᅲ՟ˈ䖭ѯᅲ՟ഛҹ[Ex_xxxx]ৡˈᑊ೼Windows98ǃInstallShield5.5ϧϮ⠜ᴀ䇗䆩䗮䖛DŽ⬅Ѣ೼䕃ӊᓔথ⦃๗੠᪡԰㋏㒳᳾ᴹথሩⱘ޴ᑈ䞠ˈWindows98/2000ҹঞVC++ǃC++BuilderǃVBㄝ䖬ҡᇚᰃЏ⌕DŽ೼䖭⾡༥ᴎϟˈ䗖ᯊഄᇚInstallShield5.5ⱘՓ⫼ᮍ⊩੠ᡔᎻ༝⤂㒭໻ᆊˈᖙᇚᇍᑓ໻ⱘ⿟ᑣਬǃ䕃ӊᓔথ㗙੠⠅ད㗙᳝᠔ᐂࡽDŽ⬅Ѣᯊ䯈ҧˈࡴП԰㗙∈ᑇ᳝䰤ˈϡᔧП໘೼᠔䲒ܡˈᙇ䇋䇏㗙ᡍ䆘ᣛℷDŽᛳ䇶໽ᵕ㔥ঞ䍉ᆊ䲘ǃᮍ㟳ܜ⫳ˈ≵᳝ҪӀℸᬭ⿟ϡৃ㛑೼㔥Ϟߎ⠜DŽᛳ䇶ϔⳈ݇ᖗ੠ᬃᣕℸ乍Ꮉ԰ⱘᆊҎ੠᳟টӀˈᇸ݊ᰃ៥ⱘྏᄤDŽ4 InstallShieldㅔᯢՓ⫼ᬭ⿟1.1䲚៤ᓔথ⦃๗ὖ䗄ǂǂ೼Windows95/98/NT᪡԰㋏㒳Ёℷ⹂ᅝ㺙њInstallShield5.5ϧϮ⠜ৢˈህৃҹऩߏӏࡵᷣⱘ"ᓔྟ"ˈ䗝ᢽ"⿟ᑣ"Ёⱘ"InstallShield5.5ProfessionalEdition"ˈݡ䗝ᢽ䆹⿟ᑣ᭛ӊ།ϟⱘ"InstallShield5.5ProfessionalEdition"ህ㛑䖤㸠InstallShieldDŽ㄀ϔ⃵䖤㸠ᯊˈᔍߎབ೒1.1᠔⼎ⱘ⬠䴶DŽǂǂԚᔧ߽⫼ProjectWizard(乍Ⳃ৥ᇐ)៪݊ҪᎹ݋߯ᓎϔϾᅝ㺙乍ⳂৢˈህӮߎ⦄InstallShield5.5ⱘᅠᭈ⬠䴶ˈབ೒1.2᠔⼎DŽ5 InstallShieldㅔᯢՓ⫼ᬭ⿟ᅗᰃ⬅ᷛ乬ᷣǃ㦰ऩᷣǃᎹ݋ᷣǃ乍ⳂᎹ԰ऎにষǃ᭛ḷにষǃ䕧ߎにষҹঞ⢊ᗕᷣㄝ㒘៤ⱘDŽǂǂᷛ乬ᷣᰃ⫼ᴹᰒ⼎ߎᔧࠡにষЁⱘ᭛ӊৡˈ㗠Ϩϔ㠀䖬᳝[᳔ᇣ࣪]ǃ[᳔໻࣪]៪[䖬ॳ]ҹঞ[݇䯁]ᣝ䪂ˈऩߏ[݇䯁]ᣝ䪂ᇚ䗔ߎ䲚៤ᓔথ⦃๗DŽǂǂ㦰ऩᷣࣙ৿њ䲚៤ᓔথ⦃๗Ё޴Т᠔᳝ⱘҸˈᅗЎ⫼᠋ᦤկњ᭛ḷ᪡԰ǃᅝ㺙㛮ᴀ⿟ᑣⱘ㓪䆥ǃ䇗䆩ǃにষ᪡԰ㄝϔ㋏߫ⱘࡳ㛑DŽ⬅ѢᎹ݋ᷣ↨㦰ऩ᪡԰᳈Ў᥋ˈᬙᐌᐌᇚϔѯᐌ⫼㦰ऩҸгৠᯊᅝᥦ೼Ꮉ݋ᷣϞDŽǂǂ乍ⳂᎹ԰ऎにষࣙ৿⫼᠋ᅝ㺙乍Ⳃⱘϔѯᙃˈࣙᣀ᭛ӊ㒘ǃ㒘ӊǃ㛮ᴀ᭛ӊǃ䌘⑤ㄝDŽ೼乍ⳂᎹ԰ऎにষЁⱘⳂᔩ乍៪೒ᷛ໘ऩߏ哴ᷛে䬂ˈ᳝ᯊ䖬ӮᔍߎⳌᑨⱘᖿ᥋㦰ऩˈᅗࣙ৿ᔧࠡ⢊ᗕϟⱘϔѯᐌ⫼᪡԰DŽǂǂ᭛ḷにষԡѢ䲚៤ᓔথ⦃๗Ёⱘে䖍ˈ㛮ᴀ᭛ӊǃ䌘⑤᭛ӊҹঞᅝ㺙⿟ᑣ᠔䳔㽕ⱘ৘⾡䌘⑤ㄝ䛑ৃҹ䗮䖛䆹にষᰒ⼎ߎᴹDŽǂǂ䕧ߎにষߎ⦄೼䲚៤ᓔথ⦃๗にষⱘᑩ䚼ˈᅗࣙ৿њBuild੠CompileϸϾ义䴶ˈߚ߿⫼ᴹᰒ⼎ᓎゟ੠㓪䆥䖛⿟ЁⱘⳌ݇ᙃDŽǂǂ⢊ᗕᷣԡѢ䲚៤ᓔথ⦃๗ⱘ᳔ᑩ䚼ˈᅗ⫼ᴹᰒ⼎ᔧࠡ᪡԰⢊ᗕǃ䇈ᯢǃ᭛ᴀܝᷛ᠔೼ⱘ㸠߫োㄝᙃDŽ6 InstallShieldㅔᯢՓ⫼ᬭ⿟1.2㦰ऩᷣ੠Ꮉ݋ᷣ1.2.1㦰ऩᷣǂǂ೼䲚៤ᓔথ⦃๗⬠䴶Ёˈ⫼᠋ৃҹⳟࠄ೼ᅗⱘϞᮍᥦ߫ⴔϔ㋏߫ⱘ㦰ऩˈ㗠↣ϔϾ㦰ऩϟ䛑᳝৘㞾ⱘ㦰ऩҸDŽ೼䖯ϔℹϢ䲚៤ᓔথ⦃๗ᠧѸ䘧Пࠡˈܜњ㾷৘乍㦰ऩҸⱘ෎ᴀࡳ㛑ᰃᕜ᳝ᖙ㽕ⱘˈ಴Ў໻䚼ߚⱘ᪡԰䛑ᰃ䗮䖛㦰ऩᴹᅠ៤ⱘDŽInstallShield5.5ⱘ㦰ऩᷣЁࣙ৿њFile(᭛ӊ)ǃEdit(㓪䕥)ǃView(ᶹⳟ)ǃInsert(ᦦܹ)ǃProject(乍Ⳃ)ǃBuild(㓪䆥)ǃTools(Ꮉ݋)ǃWindows(にষ)ҹঞHelp(ᐂࡽ)ㄝ㦰ऩDŽ݊ЁFileǃEditǃViewǃWindows੠HelpഛϢϔ㠀Windowsᑨ⫼⿟ᑣⱘ㦰ऩ⫼⊩ⳌৠDŽ䖭䞠ҙᇍInsertǃProjectǃBuild੠Tools㦰ऩ԰ㅔऩ䇈ᯢDŽInsert㦰ऩInsert㦰ऩЁⱘҸЏ㽕⫼Ѣ乍Ⳃঞ䌘⑤ⱘ߯ᓎ੠⏏ࡴˈᅗ᳝ϝϾ㦰ऩ乍˖FileintoScriptFiles...ǃFileintoSetupFiles...੠LinksintoFileGroups...ˈߚ߿㸼⼎ᇚᶤϾ᭛ӊᦦܹ㛮ᴀ᭛ӊ੠ᅝ㺙᭛ӊЁҹঞ䫒᥹ࠄ᭛ӊ㒘ЁDŽǂǂϔ㠀ᚙމˈ䖭ϝϾ㦰ऩ乍ᰃ㹿⽕⫼ⱘDŽᔧߛᤶࠄ乍ⳂᎹ԰ऎにষⱘ"Scripts"义䴶ᑊ䗝ᅮ݊Ёⱘ㛮ᴀ᭛ӊⳂᔩ乍ᯊˈ㦰ऩ乍"FileintoScriptsFiles"㹿▔⌏˗ᔧߛᤶࠄ乍ⳂᎹ԰ऎにষⱘ"SetupFiles"义䴶ᑊ䗝ᅮ݊ЁⱘⳂᔩ乍ᯊˈ㦰ऩ乍"FilesintoSetupFiles"㹿▔⌏˗㗠ᔧߛᤶࠄ乍ⳂᎹ԰ऎにষⱘ"FileGroups"义䴶ᑊ䗝Ё݊Ёⱘ"Links"Ⳃᔩ乍ᯊˈ㦰ऩ乍"LinksintoFileGroups"㹿▔⌏DŽProject㦰ऩProject㦰ऩЁⱘҸЏ㽕⫼Ѣ乍Ⳃⱘ߯ᓎ੠Ⳍ݇ݙᆍⱘ䆒㕂ˈᅗ᳝ϝϾ㦰ऩ乍˖ProjectWizard…ǃVisualBasicProjectWizard…੠Setting…ˈߚ߿⫼ᴹ߯ᓎϔ㠀ᅝ㺙乍ⳂǃVBᑨ⫼⿟ᑣᅝ㺙乍Ⳃҹঞ乍ⳂⳌ݇ݙᆍⱘ䆒㕂DŽBuild㦰ऩBuild㦰ऩЁⱘҸЏ㽕⫼ᴹ䖯㸠ᅝ㺙⿟ᑣⱘ㓪䆥ǃ䖲᥹ǃ䇗䆩ǃ䖤㸠ㄝ᪡԰ˈᅗࣙᣀ䖭ḋⱘ㦰ऩҸ˖Compile(㓪䆥)ǃRunSetup(䖤㸠)ǃDebugSetup(䇗䆩)ǃMedia(ၦҟ)ǃSettings...(䆒㕂䇗䆩੠㓪䆥ᯊⱘখ᭄)Tools㦰ऩTools㦰ऩЁⱘҸЏ㽕ᰃϔѯ⫼Ѣ䖤㸠៪ᅮࠊᓔথ⦃๗Ёⱘᅲ⫼Ꮉ݋ˈབ೒1.3᠔⼎DŽ7 InstallShieldㅔᯢՓ⫼ᬭ⿟ǂǂؐᕫϔᦤⱘᰃˈ䱣ⴔ䲚៤ᓔথ⦃๗ᔧࠡ⢊ᗕⱘᬍবˈ᳝ѯ㦰ऩЁⱘ㦰ऩҸ乍䖬Ӯ䱣Пব࣪DŽ՟བˈᔧ᭛ḷにষ≵᳝ӏԩ㛮ᴀ⿟ᑣᯊˈ䆌໮㦰ऩ乍䛑ᰃ♄㡆ⱘˈ⫼᠋ϡ㛑Փ⫼ᅗӀDŽℸ໪ˈInstallShiled5.5Ϣ݊ҪWindowsᑨ⫼⿟ᑣϔḋˈ݊㦰ऩ㋏㒳ϔ㠀䛑䙉ᕾϟ߫ϔѯⳌৠⱘ㾘߭˖(1)ᠧᓔInstallShiled5.5ⱘ"File"㦰ऩˈӮⳟࠄ"Open"㦰ऩ乍᭛ᴀৢ᳝"…"ˈ㢹䗝ᢽ䆹㦰ऩҸˈ߭ᔍߎ䗮⫼᭛ӊ"ᠧᓔ"ᇍ䆱ḚDŽ಴ℸˈ㦰ऩ᭛ᴀৢ᳝"…"ህ㸼⼎݊ᠻ㸠㒧ᵰᰃᇚᔍߎⳌᑨⱘᇍ䆱ḚDŽ(2)೼"File"㦰ऩ᭛ᴀЁˈ݊Ё"F"ᄫ↡ᏺϟߦ㒓DŽᅗ㸼⼎䆹㦰ऩ乍ⱘࡽ䆄ヺᰃ"F"ˈᔧᣝԣ"Alt"䬂ϡᬒˈݡᭆߏ䆹ᄫ↡ᯊˈᇍᑨⱘ㦰ऩ乍ህӮ㹿䗝ЁDŽ(3)೼"Open"㦰ऩ᭛ᴀৢ᳝"Ctrl+O"ᄫḋˈӏԩᯊ׭ˈܜᣝϟ"Ctrl"عϡᬒˈ✊ৢݡᣝ"O"䬂ህᠻ㸠"Open"㦰ऩ乍Ҹˈᔍߎ䗮⫼᭛ӊ"ᠧᓔ"ᇍ䆱ḚDŽ䖭㸼ᯢ"Ctrl+O"੠䆹㦰ऩ乍Ҹᰃϔ㟈ⱘˈ"Ctrl+O"⿄Ў䆹㦰ऩ乍ⱘᖿ᥋䬂DŽ1.2.2Ꮉ݋ᷣǂǂሑㅵ㦰ऩҸৃҹᅠ៤৘⾡᪡԰ˈ݊Ⳍᑨⱘᖿ᥋䬂гৃᦤ催᪡԰ⱘᬜ⥛DŽԚᰃˈ㦰ऩҸⱘ᪡԰Ⳍᇍ㐕⧤ˈᖿ᥋䬂জ䳔㽕⫼᠋ࡴҹ䆄ᖚˈ᠔ҹˈ᳝ᯊ׭⫼䍋ᴹ䖬⬹ႠϡDŽ㗠Ꮉ݋ᷣᰃϔ⾡೒ᔶ࣪ⱘ᪡԰⬠䴶ˈ݋᳝Ⳉ㾖੠ᖿ᥋ⱘ⡍⚍ˈ❳㒗ᥠᦵᎹ݋ᷣⱘՓ⫼ৢˈᎹ԰ᬜ⥛ᇚ໻᳝ᦤ催DŽǂǂᎹ݋ᷣᰃϔ㋏߫Ꮉ݋ᣝ䪂ⱘ㒘ড়DŽᔧ哴ᷛᣛ䩜ذ⬭೼Ꮉ݋ᷣᣝ䪂ⱘϞ䴶ᯊˈᣝ䪂ߌ䍋ˈЏにষᑩッⱘ⢊ᗕᷣϞᰒ⼎ߎ䆹ᣝ䪂ⱘϔѯᦤ⼎ᙃˈᑊϨབᵰᣛ䩜ذ⬭ᯊ䯈䭓ϔѯˈህӮߎ⦄ϔϾᇣⱘᔍߎᓣⱘ"Ꮉ݋ᦤ⼎"にষˈᰒ⼎ߎᣝ䪂ⱘৡ⿄DŽᎹ݋ᷣϞⱘᣝ䪂䗮ᐌ੠ϔѯ㦰ऩҸⳌᇍᑨˈᦤկњϔ⾡ᠻ㸠㒣ᐌՓ⫼ⱘҸⱘᖿ᥋ᮍ⊩DŽǂǂৠ㦰ऩЁⱘ㦰ऩҸ乍ⳌԐˈᔧ㦰ऩҸ乍⽕ℶՓ⫼ᯊˈⳌᑨⱘᎹ݋ᣝ䪂гᰃ♄㡆ⱘˈ⫼᠋ϡ㛑Փ⫼ᅗӀDŽInstallShield5.5ⱘᎹ݋ᷣབ೒1.4᠔⼎DŽ8 InstallShieldㅔᯢՓ⫼ᬭ⿟9 InstallShieldㅔᯢՓ⫼ᬭ⿟13乍ⳂᎹ԰ऎにষ1.3.1Scripts义䴶ǂǂ乍ⳂᎹ԰ऎにষⱘScripts义䴶⫼ᴹㅵ⧚ᅝ㺙⿟ᑣⱘ㛮ᴀ᭛ӊˈ೼䆹义䴶Ё৘乍㛮ᴀ᭛ӊഛҹᷥ⢊߫㸼ⱘൟᓣᰒ⼎ߎᴹⱘDŽ↣ϾⳂᔩ乍ࠡ䛑᳝ϔϾ೒ᷛˈϨ乊ሖⳂᔩ乍ࠡ䖬᳝ϔϾ༫೼ᮍḚЁⱘヺো"+"DŽঠߏ乊ሖⳂᔩ乍៪ऩߏ᳔ࠡ䴶ⱘ"+"ˈ߭Ⳉ᥹ᠧᓔᑊᰒ⼎䆹Ⳃᔩ乍ⱘ᠔᳝ᄤ乍ˈℸᯊ乊ሖⳂᔩ乍ࠡⱘ"+"ব៤"-"ো˗ݡঠߏ乊ሖⳂᔩ乍៪ऩߏ᳔ࠡ䴶ⱘ"-"ˈ߭䆹乍Ⳃⱘ᠔᳝ᄤ乍㹿ᬊ㓽ˈাᰒ⼎乊ሖⳂᔩ乍ݙᆍˈℸᯊ乊ሖ乍Ⳃࠡⱘ"-"জব៤њॳᴹⱘ"+"োDŽǂǂሩᓔ乊ሖⳂᔩ乍ⱘ᠔᳝ᄤ乍ˈঠߏҹ.rulЎᠽሩৡⱘ㛮ᴀ᭛ӊ乍ˈ߭೼ᓔথ⦃๗ⱘে䖍ⱘ᭛ḷにষЁᰒ⼎ߎ䆹㛮ᴀ᭛ӊⱘݙᆍDŽЎњ๲ᔎᅝ㺙⿟ᑣҷⷕⱘৃ䇏ᗻˈ㛮ᴀ᭛ӊⱘ⑤ҷⷕݙᆍᕔᕔᰃҹϡৠ买㡆ᴹᰒ⼎ⱘˈ৘⾡买㡆᠔ҷ㸼ⱘ৿Нབϟ᠔⼎˖ǂǂⱑᑩ咥ᄫϔ㠀᭛ᴀǂǂ咥ᑩⱑᄫ㹿䗝ᅮⱘ᭛ᴀǂǂ䴦㡆ᑩ咥㡆ᄫ᭛ᴀⱘ㸠ᷛ䆄ǂǂⱑᑩ㑶ᄫInstallShieldⱘߑ᭄ǂǂⱑᑩ㪱ᄫInstallScript㛮ᴀ䇁㿔ⱘ݇䬂ᄫǂǂⱑ㡆ᑩક㑶㡆ᄫᐌ᭄ǂǂⱑ㡆ᑩ㋿㑶㡆ᄫ⫼""ヺোᣀ䍋ᴹⱘ᭛ᴀݙᆍⱑᑩ㓓ᄫ⊼䞞1.3.2Components义䴶ǂǂ乍ⳂᎹ԰ऎにষⱘComponents义䴶⫼ᴹㅵ⧚ᅝ㺙⿟ᑣⱘ৘乍㒘ӊDŽ㔎ⳕᯊˈϔϾᅝ㺙乍Ⳃ䗮ᐌ᳝⿟ᑣ᭛ӊ(ProgramFiles)ǃ⼎՟᭛ӊ(ExampleFiles)ǃᐂࡽ᭛ӊ(HelpFiles)ҹঞ݅ѿⱘDLL᭛ӊ(SharedDLLs)݅ಯϾ㒘ӊDŽঠߏᶤϾ㒘ӊⳂᔩ乍ˈ߭೼Џ⬠䴶ⱘে䖍にষЁᰒ⼎ߎ䆹㒘ӊⳌ10 InstallShieldㅔᯢՓ⫼ᬭ⿟݇ሲᗻⱘᅠᭈ߫㸼ˈ䖭ѯሲᗻ䛑ৃҹᮍഄ䖯㸠ⳌᑨⱘᬍDŽ1.3.3SetupTypes义䴶ǂǂ乍ⳂᎹ԰ऎにষⱘSetupTypes义䴶⫼ᴹㅵ⧚ᦤկ㒭⫼᠋ⱘᅝ㺙㉏ൟDŽ㔎ⳕᯊˈϔϾᅝ㺙乍Ⳃ䗮ᐌ᳝Typical(݌ൟ)ǃCompact(㋻ޥ)੠Custom(ᅮࠊ)݅ϝ⾡ᅝ㺙㉏ൟDŽঠߏᶤ⾡ᅝ㺙㉏ൟˈ߭೼Џ⬠䴶ⱘে䖍にষЁᰒ⼎ߎ䆹ᅝ㺙㉏ൟⳌ݇ⱘ㒘ӊDŽǂǂ೼㒘ӊЁˈ޵ᰃ᭛ӊ㒘ࠡ䴶᳝ϔϾᏺ䩽ো(ř)ⱘ೒ᷛˈ㸼⼎䆹᭛ӊ㒘Ꮖ㹿䗝ܹⳌᑨⱘᅝ㺙㉏ൟЁDŽড໡ঠߏ᭛ӊ㒘ࠡ䴶ⱘ೒ᷛৃ೼"䗝ܹ"੠"ϡ䗝"П䯈䖯㸠ߛᤶDŽ1.3.4SetupFiles义䴶ǂǂ乍ⳂᎹ԰ऎにষⱘSetupFiles义䴶⫼ᴹㅵ⧚೼ᅝ㺙䖛⿟Ё᠔䳔㽕ⱘᅝ㺙᭛ӊˈᅗ䗮ᐌ᳝৿᳝ϟ䴶ϔѯݙᆍDŽ(1)SplashScreen(ਃࡼ⬏䴶)InstallShield⫼Setup.bmp԰Ўᅝ㺙⿟ᑣⱘਃࡼ⬏䴶DŽ㢹೼ϡৠⱘ䇁㋏(Ё᭛ǃEnglish)Ёᬒ㕂৘㞾ⱘԡ೒᭛ӊˈ߭ᅝ㺙⿟ᑣᇚḍ᥂ᅝ㺙⦃๗ⱘϡৠ䇁㋏䗝⫼ⳌᑨⱘSetup.bmp˗㢹ᇚ䆹᭛ӊᬒ㕂೼LanguageIndependent(Ϣ䇁㋏᮴݇)Ⳃᔩ乍Ёˈ߭ϡㅵ᪡԰㋏㒳ᰃԩ⾡䇁㋏ˈ䛑ᇚҹℸԡ೒᭛ӊ԰Ў⿟ᑣᅝ㺙ⱘਃࡼ⬏䴶DŽ(2)LanguageIndependent(Ϣ䇁㋏᮴݇)ǂǂᅗܕ䆌⫼᠋Ў৘⾡᪡԰㋏㒳៪ϧ䮼ЎWindows95/98/NT᪡԰㋏㒳ᣛᅮⳌᑨⱘᅝ㺙᭛ӊˈ䖭ḋϡㅵᗢḋⱘ䇁㋏ˈᅝ㺙⿟ᑣ䛑Ӯḍ᥂Ⳍᑨⱘ᪡԰㋏㒳ᴹᢷ䗝Ⳍᑨⱘ᭛ӊDŽ(3)݊Ҫ䇁㋏Ⳍ݇ⱘ᭛ӊǂǂᅗܕ䆌⫼᠋Ў৘⾡᪡԰㋏㒳៪ϧ䮼ЎWindows95/98/NT᪡԰㋏㒳ᣛᅮⳌᑨⱘᅝ㺙᭛ӊˈ䖭ḋᅝ㺙⿟ᑣӮḍ᥂Ⳍᑨⱘ䇁㋏੠䇁㋏ϟⱘ᪡԰㋏㒳ᴹᢷ䗝Ⳍᑨⱘ᭛ӊDŽ(4)AdvancedFiles(催㑻᭛ӊ)ǂǂ೼⫼݋ԧⱘၦҟথᏗᯊˈܕ䆌⫼᠋೼ⳌᑨⱘၦҟЁᬒ㕂ϔѯ䴲य़㓽᭛ӊDŽ11 InstallShieldㅔᯢՓ⫼ᬭ⿟1.3.5FileGroups义䴶ǂǂ乍ⳂᎹ԰ऎにষⱘFileGroups义䴶⫼ᴹㅵ⧚ᅝ㺙乍Ⳃ᠔䳔㽕ⱘ᭛ӊ㒘DŽ㔎ⳕᯊˈᅝ㺙⿟ᑣ乍Ⳃ䗮ᐌ᳝ExampleFiles(⼎՟᭛ӊ㒘)ǃHelpFiles(ᐂࡽ᭛ӊ㒘)ǃProgramDLLs(ᑨ⫼⿟ᑣ᠔䳔ⱘDLL᭛ӊ㒘)ǃProgramExecutableFiles(ᑨ⫼⿟ᑣ᭛ӊ㒘)ҹঞSharedDLLs(݅ѿDLL᭛ӊ㒘)݅ѨϾ᭛ӊ㒘DŽǂǂঠߏᶤϾ᭛ӊ㒘ˈ߭೼Џ⬠䴶ⱘে䖍にষЁᰒ⼎ߎ䆹᭛ӊ㒘ⱘⳌ݇ሲᗻˈ⫼᠋ৃҹᮍഄ䖯㸠ᬍDŽ1.3.6Resources义䴶ǂǂ乍ⳂᎹ԰ऎにষⱘResources义䴶⫼ᴹㅵ⧚ᅝ㺙乍Ⳃ᠔䳔㽕ⱘᅝ㺙䌘⑤DŽ㔎ⳕᯊˈϔϾᅝ㺙乍Ⳃ䗮ᐌ᳝StringTable(ᄫヺІ㸼)ǃRegistryEntries(⊼ݠ乍)੠ShellObjects(໪໇ᇍ䈵)݅ϝ⾡䌘⑤ˈ݊ЁShellObjects䌘⑤ᰃ೼Windows95/98੠WindowsNT4.0ঞ݊ҹৢ᪡԰㋏㒳Ё߯ᓎ㹿ᅝ㺙ᑨ⫼⿟ᑣⱘ⿟ᑣ᭛ӊ།(FolderҸ)ǃḠ䴶೒ᷛ៪Ⳍᑨⱘᖿ᥋ᮍᓣ(ShortcutҸ)1.3.7Media义䴶ǂǂ乍ⳂᎹ԰ऎにষⱘMedia义䴶⫼ᴹㅵ⧚⿟ᑣথᏗᯊⱘၦҟDŽ೼䆹义䴶Ёࣙ৿MediaBuildWizard(ၦҟ߯ᓎ৥ᇐ)ǃ㔎ⳕⱘၦҟҹঞ⫼᠋ᮄ߯ᓎⱘၦҟㄝ乍ˈऩߏ"MediaBuildWizard"ᇚᓔྟၦҟ߯ᓎ৥ᇐˈ⫼ᴹ߯ᓎᮄⱘၦҟDŽǂǂ䳔㽕䇈ᯢⱘᰃ˖೼৘Ͼ义䴶Ёˈেߏ哴ᷛᯊ䛑ӮᔍߎⳌᑨⱘᖿ᥋㦰ऩˈᅗࣙ৿ᔧࠡ⢊ᗕϟⱘϔѯᐌ⫼᪡԰DŽ14䲚៤ᓔথ⦃๗ⱘ߱ℹᅲ䏉ǂǂࠡ䴶ҟ㒡њ݇Ѣ䲚៤ᓔথ⦃๗ⱘϔѯ෎ᴀᚙމˈ䖭䞠ҹぎ㉏ൟⱘᅝ㺙乍ⳂЎ՟ˈ䖯ϔℹ䇈ᯢ䲚៤ᓔথ⦃๗ⱘՓ⫼䖛⿟DŽ12 InstallShieldㅔᯢՓ⫼ᬭ⿟1.4.1߯ᓎϔϾぎⱘᅝ㺙乍Ⳃǂǂ೼InstallShield5.5Ёˈ߽⫼ProjectWizard(ᅝ㺙乍Ⳃ৥ᇐ)੠ᅝ㺙乍Ⳃ῵ᵓৃҹ߯ᓎWindowsᑨ⫼⿟ᑣǃ᭄᥂ᑧᑨ⫼⿟ᑣҹঞ݊Ҫ㉏ൟ⿟ᑣⱘᅝ㺙乍ⳂDŽ䖭䞠ˈ៥Ӏ佪ܜᇍぎ㉏ൟⱘᅝ㺙乍Ⳃ԰ㅔऩ䇈ᯢˈ݊Ҫᅝ㺙乍Ⳃ㉏ൟᇚ೼ҹৢⱘゴ㡖Ё䰚㓁ҟ㒡DŽǂǂϔϾぎ㉏ൟⱘᅝ㺙乍Ⳃࣙ৿њϔ㠀ᅝ㺙乍Ⳃⱘ෎ᴀḚᶊˈাᰃᅝ㺙㛮ᴀ᭛ӊЁ≵᳝Ⳍᑨⱘᅝ㺙⿟ᑣҷⷕˈ಴㗠ϡᠻ㸠ӏԩ᪡԰DŽ߯ᓎϔϾぎ㉏ൟⱘᅝ㺙乍Ⳃⱘ᳔໻ད໘ᰃৃҹᐂࡽ⫼᠋❳ᙝ੠ᥠᦵInstallScript䇁㿔ⱘ⫼⊩ˈᑊ⬅ℸ㓪ࠊߎㅔ㐕䱣ᛣⱘᅝ㺙⿟ᑣᴹDŽǂǂ೼InstallShield5.5Ёˈᛇ㽕߯ᓎϔϾぎ㉏ൟⱘᅝ㺙乍Ⳃˈা䳔䗝ᢽ"File"㦰ऩ->"New"㦰ऩҸˈ೼"New"ᇍ䆱ḚЁ䗝ᅮ"BlankSetup"ˈᑊऩߏ[⹂ᅮ]ᣝ䪂ेৃˈབ೒1.5᠔⼎DŽℸᯊˈInstallShield5.5㞾ࡼЎ䆹ᅝ㺙乍ⳂৡЎ"BlankSetup"ˈᑊᅮԡࠄ乍ⳂᎹ԰ऎにষⱘScripts义䴶ˈ㗠Ϩ䖬೼䲚៤ᓔথ⦃๗ⱘে䖍にষЁᠧᓔⳌᑨⱘ㛮ᴀ᭛ӊDŽ1.4.2⏏ࡴҷⷕǂǂ೼ぎ㉏ൟᅝ㺙乍Ⳃⱘ㛮ᴀ᭛ӊЁˈϔᓔྟᰃ≵᳝Ⳍᑨⱘᅝ㺙⿟ᑣݙᆍⱘˈᅗ䳔㽕⫼᠋⏏ࡴϔѯҷⷕˈ՟བ˖13 InstallShieldㅔᯢՓ⫼ᬭ⿟...program//↣Ͼᅝ㺙㛮ᴀ⿟ᑣ䛑ᰃҹprogramᓔྟSprintfBox(INFORMATION,"䯂׭","%s","ᙼདʽ");//⍜ᙃᇍ䆱Ḛendprogram//↣Ͼᅝ㺙㛮ᴀ⿟ᑣ䛑ᰃҹendprogram㒧ᴳ1.4.3㓪䆥ᑊ䖤㸠ǂǂᠧᓔBuild㦰ऩˈ䗝ᢽCompile㦰ऩ乍៪ᣝᖿ᥋䬂Ctrl+F7ˈ㋏㒳ᓔྟᇍ"BlankSetup"䖯㸠㓪䆥ˈৠᯊ೼䕧ߎにষЁ೼㒓ഄᰒ⼎ߎ㓪䆥䖛⿟ⱘᚙމˈᔧߎ⦄Done-0error(s),0warning(s)ᄫḋᯊˈ㸼⼎"BlankSetup"ᅝ㺙⿟ᑣৃҹ㹿䖤㸠њDŽǂǂ೼"Build"㦰ऩЁ䗝প"RunSetup"㦰ऩҸ៪ᣝᖿ᥋䬂Ctrl+F5ˈህৃҹ䖤㸠"BlankSetup"ᅝ㺙乍ⳂDŽǂǂ䖤㸠߮ᓔྟˈߎ⦄"Setup"ᇍ䆱Ḛˈ⫼ᴹᰒ⼎ޚ໛ᅝ㺙৥ᇐⱘ䖯ሩᚙމˈབ೒1.6ǂǂ✊ৢᠡᠻ㸠ࠡ䴶⏏ࡴⱘ⿟ᑣҷⷕˈ݊㒧ᵰབ೒1.7᠔⼎DŽǂǂᴀゴⴔ䞡ҟ㒡њInstallShield5.5ⱘ䲚៤ᓔথ⦃๗ˈᑊҹぎ㉏ൟⱘᅝ㺙乍ⳂЎ՟ㅔऩഄ䇈ᯢњᅝ㺙㛮ᴀ⿟ᑣⱘ⏏ࡴǃ㓪䆥ǃ䖤㸠ⱘ䖛⿟DŽϟϔゴᇚ䅼䆎InstallScript㛮ᴀ䇁㿔ⱘ෎⸔ݙᆍDŽ14 InstallShieldㅔᯢՓ⫼ᬭ⿟㄀㄀㄀2ゴゴゴInstallScript㛮ᴀ䇁㿔෎⸔InstallScriptᰃϧ䮼⫼ᴹ㓪ݭInstallShieldᅝ㺙⿟ᑣⱘ㛮ᴀ䇁㿔DŽ⬅ѢInstallScript੠C䇁㿔ᵕЎⳌԐˈ಴㗠ՓᕫVisualC++⫼᠋㓪ݭᅝ㺙㛮ᴀ⿟ᑣ乛Ўᕫᖗᑨ᠟DŽेՓᇍѢ≵᳝ӏԩ䇁㿔෎⸔ⱘ⫼᠋ᴹ䇈ˈ㓪ݭInstallScript⿟ᑣгϡӮ㾝ᕫ᮴Ңϟ᠟ˈ಴ЎInstallScript⿟ᑣ㒧ᵘᰃ䴲ᐌㅔऩⱘDŽᑊϨˈInstallScriptЎ⫼᠋ᦤկњ䍙䖛250Ͼⱘݙ䚼ߑ᭄ˈҢ㗠Փᕫ⫼᠋ϡ䳔㽕໾໮ⱘҷⷕህ㛑㓪ݭߎ݋᳝ϧϮ∈ޚⱘᅝ㺙⿟ᑣᴹDŽ2.1InstallScript⿟ᑣ㒧ᵘǂǂৠ݊Ҫ⿟ᑣ䆒䅵䇁㿔ϔḋˈInstallScript㛮ᴀ䇁㿔г᳝㞾Ꮕⱘ⿟ᑣ㒧ᵘDŽ2.1.1޴ϾInstallScript⿟ᑣǂǂϟ䴶ܜᴹⳟⳟ޴Ͼ↨䕗ㅔऩⱘInstallScript⿟ᑣDŽ[՟Ex_Hello]ϔϾㅔऩⱘInstallScript⿟ᑣˈ⫼ᴹᔍߎ"䯂׭"ᇍ䆱ḚDŽSTRINGszTitle;programszTitle="䯂׭";SetDialogTitle(DLG_MSG_INFORMATION,szTitle);MessageBox("ᙼདʽ",INFORMATION);endprogram⿟ᑣЁˈprogram...endprogramᵘ៤Џ⿟ᑣԧˈ↣ϔϾInstallScript⿟ᑣЁ䛑ᖙ乏ࣙ৿ϔϾϨা᳝ϔϾ䖭ḋⱘЏ⿟ᑣԧDŽ೼Џ⿟ᑣԧ໪ˈা㛑ᰃব䞣ᅮНǃ⫼᠋ߑ᭄ᅮНҹঞ乘໘⧚ᣛҸㄝˈ㗠⿟ᑣԧݙৃҹࣙᣀ㢹ᑆᴵ䇁হˈ↣ϔᴵ䇁হ䛑⬅ߚো"˗"㒧ᴳDŽᴀ՟ЁˈSetDialogTitle੠MessageBox䛑ᰃInstallScriptⱘݙ䚼ߑ᭄ˈᅗӀߚ߿⫼ᴹ䆒㕂ᇍ䆱Ḛⱘᷛ乬੠ᰒ⼎ᣛᅮⱘᙃ᭛ᴀˈINFORMATIONᰃϔϾ㋏㒳乘ᅮНⱘᐌ䞣ˈszTitleব䞣ᰃ೼⿟ᑣԧ໪ᅮНⱘᄫヺІব䞣DŽ[՟Ex_Func]㞾ᏆᅮНϔϾߑ᭄ˈ⫼ᴹᰒ⼎⍜ᙃᇍ䆱ḚDŽSTRINGszTitle;//ᅮНϔϾᄫヺІব䞣prototypeMyMessage(STRING,STRING);//㞾ᅮНߑ᭄ⱘໄᯢ15 InstallShieldㅔᯢՓ⫼ᬭ⿟programszTitle="䯂׭";MyMessage(szTitle,"ᙼདʽ");endprogramfunctionMyMessage(szTitle,szMessage)/*MyMessageߑ᭄ԧ*/beginSetDialogTitle(DLG_MSG_INFORMATION,szTitle);MessageBox(szMessage,INFORMATION);end;ሑㅵᴀ՟ⱘ㒧ᵰ੠Ex_Hello⼎՟ⳌৠˈԚᅗՓ⫼њ㞾ᅮНߑ᭄MyMessageInstallScript䇁㿔㾘ᅮˈϔϾ㞾ᅮНߑ᭄ৡᖙ乏೼program݇䬂ᄫࠡ䴶ໄᯢˈ㗠ߑ᭄ԧҷⷕⱘᅲ⦄ҷⷕᖙ乏೼endprogramৢ䖯㸠ˈϨ↣Ͼ㞾ᅮНⱘߑ᭄ԧ䛑ᖙ乏ҹbeginᓔྟend㒧ᴳ(⊼ᛣendৢ㽕᳝ߚো"˗")⿟ᑣЁⱘ"/*...*/"П䯈ⱘݙᆍ៪"//"ᓔྟϔⳈࠄ㸠ሒⱘݙᆍᰃ⫼ᴹ⊼䞞ⱘˈᅗⱘⳂⱘাᰃЎњᦤ催⿟ᑣⱘৃ䇏ᗻˈᇍ㓪䆥੠䖤㸠ᑊϡ䍋԰⫼DŽℷᰃ಴Ў䖭ϔ⚍ˈ⊼䞞ⱘݙᆍৃҹ⫼∝ᄫᴹ㸼⼎ˈгৃҹ⫼㣅᭛ᴹ䇈ᯢˈা㽕Ѣ⧚㾷ህ㸠DŽ[՟Ex_Include]Փ⫼ࣙ৿᭛ӊDŽ#include"Sddialog.h";STRINGszTitle,szMsg,svDir;programszTitle="SdAskDestPathExample";svDir="C:\EXAMPLE\TARGET";szMsg="";//㦋প⫼᠋ᣛᅮⱘᅝ㺙䏃ᕘif(SdAskDestPath(szTitle,szMsg,svDir,0)=NEXT)thenTARGETDIR=svDir;endif;//ᰒ⼎⫼᠋ᣛᅮⱘᅝ㺙䏃ᕘSprintfBox(INFORMATION,"SdAskDestPath","Successful. TheTarget"+"directoryis:"+TARGETDIR);endprogram#include"Sddialog.rul"䆹⿟ᑣᰃՓ⫼Sd(ScriptDialogˈ㛮ᴀᇍ䆱Ḛ)ᇍ䆱Ḛߑ᭄ⱘϔϾ⼎՟DŽInstallScript䇁㿔㾘ᅮˈ೼䇗⫼Sdᇍ䆱Ḛߑ᭄ᯊˈ䳔㽕೼programࠡࡴϞ#include"Sddialog.h"䇁হˈ㗠೼endprogramৢࡴ#include"Sddialog.rul"DŽϢC䇁㿔ⳌԐˈ#include"Sddialog.h"੠#include"Sddialog.rul"ᰃInstallScriptⱘ㓪䆥ᣛҸˈ⿄Ў乘໘⧚ᣛҸDŽInstallScript㓪䆥㋏㒳Ӯḍ᥂乘໘⧚ᣛҸ#includeЁⱘ᭛ӊৡˈᡞ䆹᭛ӊⱘݙᆍࣙ৿䖯ᴹDŽгህᰃ䇈ˈᅲ䰙⿟ᑣⱘҷⷕ䭓ᑺᰃ೼ॳᴹ䭓ᑺⱘ෎⸔Ϟ๲ࡴњSddialog.h੠Sddialog.rul᭛ӊⱘ䭓ᑺDŽ⿟ᑣЁˈSprintfBoxখ᭄ݙᆍЁⱘ" "ᰃᤶ㸠ヺˈे೼"Successful."᭛ᴀৢಲ䔺ᤶ㸠DŽ16 InstallShieldㅔᯢՓ⫼ᬭ⿟2.1.2InstallScript⿟ᑣⱘ෎ᴀ㒘៤ҢϞ䴶ⱘ޴Ͼ⼎՟ৃҹⳟߎˈϔϾInstallScript⿟ᑣᕔᕔ⬅乘໘⧚Ҹǃߑ᭄ǃ䇁হǃব䞣ҹঞ⊼䞞ㄝ޴Ͼ෎ᴀ䚼ߚ㒘៤ⱘDŽ(1)乘໘⧚Ҹǂǂ೼InstallScript⿟ᑣⱘϔᓔྟ㒣ᐌߎ⦄৿᳝ҹ"#"ᓔ༈ⱘҸˈᅗӀᰃ乘໘⧚ҸDŽInstallScriptᦤկњϝ㉏乘໘⧚Ҹ˖ᅣᅮНҸǃ᭛ӊࣙ৿Ҹ੠ᴵӊ㓪䆥ҸDŽ(2)ߑ᭄ǂǂϔϾInstallScript⿟ᑣᰃ⬅㢹ᑆϾߑ᭄㒘៤ⱘDŽ䖭ѯߑ᭄Ёˈ᳝ⱘᰃInstallScript㋏㒳Ё᠔ᦤկⱘݙ䚼ߑ᭄ˈ᳝ⱘᰃ⫼᠋ḍ᥂㞾Ꮕ䳔㽕㞾Ꮕ㓪ࠊ䆒䅵ⱘߑ᭄(བ՟Ex_FuncЁⱘMyMessage)(3)䇁হǂǂ䇁হᰃ㒘៤⿟ᑣⱘ෎ᴀऩܗˈᅗৃҹᰃ⫼ᴹ߸ᮁⱘᴵӊ䇁হˈгৃҹᰃ⫼ᴹড໡䖤㸠ⱘᕾ⦃䇁হㄝDŽ䖭ѯ䇁হᰃ㒘៤InstallScript⿟ᑣЁⱘ᳔䞡㽕䚼ߚПϔDŽ(4)ব䞣ǂǂ໻໮᭄⿟ᑣ⾏ϡᓔব䞣DŽInstallScriptব䞣ⱘ㉏ൟ↨䕗ㅔऩˈЏ㽕᭄᳝ؐൟ(NUMBER)ǃᄫヺІൟ(STRING)ҹঞ䫒㸼ൟ(LIST)ㄝˈ՟བ՟Ex_HelloЁⱘszTitleᰃϔϾSTRINGൟব䞣DŽ(5)⊼䞞ǂǂ⿟ᑣⱘⳂⱘϡҙ೼Ѣᅲ⦄ᶤ⾡ࡳ㛑ǃ㾷އᶤϾ䯂乬ˈ㗠Ϩ䖬೼Ѣ᭄᥂㒧ᵘ੠ㅫ⊩ⱘѸ⌕DŽ಴ℸ೼⿟ᑣЁ⏏ࡴᖙ㽕ⱘ⊼䞞ᰃ䴲ᐌ䞡㽕ⱘˈᅗ㛑ᦤ催⿟ᑣⱘৃ䇏ᗻˈᐂࡽ⫼᠋ᇍ⿟ᑣⱘ⧚㾷DŽǂǂ䳔㽕䇈ᯢⱘᰃˈInstallScriptϡᬃᣕ᥻ࠊৄⱘ䕧ܹ੠䕧ߎˈ᭄᥂ⱘ䕧ܹ੠䕧ߎᰃ䗮䖛ᇍ䆱Ḛ䖯㸠ⱘDŽ2.1.3InstallScript⿟ᑣⱘкݭ亢ḐሑㅵInstallScript䇁㿔↨C៪C++䇁㿔ᆍᯧ⧚㾷ˈԚᇍѢ߱ᄺ㗙ᴹ䇈ˈϔᓔྟህݏ៤㡃དⱘ㓪⿟дᛃҡ✊ᰃ䴲ᐌ䞡㽕੠ᖙ㽕ⱘDŽ1.ᷛ䆚ヺৡ17 InstallShieldㅔᯢՓ⫼ᬭ⿟ᷛ䆚ヺᰃ⫼ᴹᷛ䆚ব䞣ৡǃߑ᭄ৡǃ㒧ᵘৡǃ᭛ӊৡㄝⱘ᳝ᬜᄫヺᑣ߫DŽᷛ䆚ヺৡⱘདണⳈ᥹ᕅડ⿟ᑣⱘৃ䇏ᗻˈ՟བa1b1ǃc1d㱑✊ᰃড়⊩ⱘᷛ䆚ヺˈԚैᰃϡདⱘᷛ䆚ヺˈ಴Ўᅗϡ㛑䅽Ҏ⧚㾷ᅗӀ᠔ҷ㸼ⱘ৿НDŽϟ䴶޴Ͼॳ߭ᰃৡᯊ᠔ᖙ乏⊼ᛣⱘ˖(1)ড়⊩ᗻInstallScript㾘ᅮᷛ䆚ヺ⬅໻ᇣݭᄫ↡ǃ᭄ᄫᄫヺ(0̣9)੠ϟߦ㒓㒘៤ˈϨ㄀ϔϾᄫヺᖙ乏Ўᄫ↡៪ϟߦ㒓DŽӏԩᷛ䆚ヺЁ䛑ϡ㛑᳝ぎḐǃᷛ⚍ヺোঞ݊Ҫᄫヺˈ՟བϟ䴶ⱘᷛ䆚ヺᰃϡড়⊩ⱘ˖93SalaryˈYouhe.Dingˈ$178ˈ#5f68ˈr⊼ᛣˈInstallScriptЁᷛ䆚ヺⱘ໻ᇣݭᰃ᳝ऎ߿ⱘDŽ՟བˈdataǃDataǃDaTaǃDATAㄝ䛑ᰃϡৠⱘᷛ䆚ヺDŽ⫼᠋ᅮНⱘᷛ䆚ヺϡ㛑੠㋏㒳ⱘ݇䬂ᄫৠৡDŽҹϟᰃ43ϾInstallScript݇䬂ᄫ˖abortbeginBOOLBYREFcaseCHARdefaultdowntoelseendelseifendforendifendprogramendswitchendwhileexitforfunctionGDIgotoHWNDifINTKERNELLISTLONGNUMBERPOINTERprogramprototyperepeatreturnSHORTstepSTRINGswitchthentotypedefuntilUSERwhileǂǂ䳔㽕⊼ᛣⱘᰃˈ⫼᠋ᅮНⱘᷛ䆚ヺ䖬ϡ㛑੠InstallShieldⱘߑ᭄ৡǃ㋏㒳ব䞣ৡҹঞ乘ᅮНⱘᐌ䞣ৡⳌৠDŽ(2)᳝ᬜᗻ㱑✊ˈᷛ䆚ヺⱘ䭓ᑺ(㒘៤ᷛ䆚ヺⱘᄫヺϾ᭄)ᰃӏᛣⱘˈԚ᳔དϡ㛑䍙䖛32Ͼˈ಴ЎInstallShieldⱘ㓪䆥㋏㒳া㛑䆚߿ࠡ32Ͼᄫヺˈгህᰃ䇈ࠡ32ϾᄫヺⳌৠⱘϸϾϡৠᷛ䆚ヺ㹿᳝ⱘ㋏㒳䅸ЎᰃৠϔϾᷛ䆚ヺDŽ(3)ᯧ䇏ᗻǂǂ೼ᅮНᷛ䆚ヺᯊˈ㢹㛑خࠄ"㾕ৡⶹᛣ"ህৃҹ䖒ࠄᯧ䇏ᗻⱘⳂⱘDŽЎњ䖒ࠄ䖭ϾⳂⱘˈ䆌໮VisualBasicǃVisualC++ঞDelphiㄝ⿟ᑣਬᑓ⊯Փ⫼ࣜ⠭߽ⱘৡ㾘߭ᴹᅮНᷛ䆚ヺˈInstallScriptгՓ⫼䖭Ͼ<ৡ㾘߭DŽǂǂࣜ⠭߽ⱘৡ㾘߭ᰃᇚᷛ䆚ヺⱘ㉏ൟ(ᇣݭ)ᴹ԰Ўᷛ䆚ヺⱘࠡ㓔DŽ՟བࠡ䴶ⱘszTitle㸼⼎ϔϾᄫヺІব䞣ˈ݊Ёⱘsz㸼⼎STRINGব䞣㉏ൟDŽ㸼2.1߫ߎњᐌ⫼ব䞣ⱘࠡ㓔DŽ䰸ℸП໪ˈᇍѢߑ᭄ৡⱘৡᕔᕔՓ⫼໮Ͼऩ䆡ᴹ㒘៤ˈ↣Ͼऩ䆡ⱘ㄀ϔᄫ↡䛑ᰃ໻ݭˈ՟བࠡ䴶ⱘSdAskDestPathߑ᭄ৡDŽ18 InstallShieldㅔᯢՓ⫼ᬭ⿟2.㓽䖯੠⊼䞞㓽䖯ᰃᣛ⿟ᑣ೼кݭᯊϡ㽕ᇚ⿟ᑣⱘ↣ϔ㸠䛑⬅㄀ϔ߫ᓔྟˈ㗠Ϩ೼䗖ᔧⱘഄᮍࡴ䖯ϔѯぎ㸠៪ぎḐDŽᅗৠ⊼䞞ϔḋˈгᰃЎњᦤ催⿟ᑣⱘৃ䇏ᗻDŽǂǂ⊼䞞ⱘ䞡㽕ᗻᏆ೼ࠡ䴶䆎ঞ䖛ˈ䖭䞠ϡݡ䞡໡DŽԚ㽕⊼ᛣⱘᰃ˖(1)⊼䞞ᑨ೼㓪⿟ⱘ䖛⿟Ёৠᯊ䖯㸠ˈϡ㽕ᣛᳯ⿟ᑣᓔথᅠ៤ৢݡ㸹ݭ⊼䞞DŽ䙷ḋাӮ໮㢅ད޴סⱘᯊ䯈ˈ᳈ЎϹ䞡ⱘᰃˈᯊ䯈䭓њҹৢ⫮㟇Ӯ䇏ϡព㞾Ꮕݭⱘ⿟ᑣDŽᖙ㽕ⱘ⊼䞞ݙᆍᑨࣙ৿˖㛮ᴀ⿟ᑣⱘᘏԧ⊼䞞(᭛ӊৡǃ԰⫼ǃ߯ᓎᯊ䯈ǃ⠜ᴀǃ԰㗙ঞᓩ⫼ⱘ᠟ݠǃ䖤㸠⦃๗ㄝ)ǃߑ᭄⊼䞞(Ⳃⱘǃㅫ⊩ǃՓ⫼ⱘখ᭄੠䖨ಲؐⱘ৿Нǃᇍ⦃๗ⱘϔѯ؛䆒ㄝ)ঞ݊Ҫⱘᇥ䞣⊼䞞DŽगϛϡ㽕䰜䗄䙷ѯϔⳂњ✊ⱘݙᆍˈ৺߭ӮՓ⊼䞞ⱘᬜᵰ䗖ᕫ݊ডǎѯぎ㸠៪ぎḐDŽᅗৠ⊼䞞ϔḋˈгᰃЎњᦤ催⿟ᑣⱘৃ䇏ᗻDŽǂǂ⊼䞞ⱘ䞡㽕ᗻᏆ೼ࠡ䴶䆎ঞ䖛ˈ䖭䞠ϡݡ䞡໡DŽԚ㽕⊼ᛣⱘᰃ˖(1)⊼䞞ᑨ೼㓪⿟ⱘ䖛⿟Ёৠᯊ䖯㸠ˈϡ㽕ᣛᳯ⿟ᑣᓔথᅠ៤ৢݡ㸹ݭ⊼䞞DŽ䙷ḋাӮ໮㢅ད޴סⱘᯊ䯈ˈ᳈ЎϹ䞡ⱘᰃˈᯊ䯈䭓њҹৢ⫮㟇Ӯ䇏ϡព㞾Ꮕݭⱘ⿟ᑣDŽᖙ㽕ⱘ⊼䞞ݙᆍᑨࣙ৿˖㛮ᴀ⿟ᑣⱘᘏԧ⊼䞞(᭛ӊৡǃ԰⫼ǃ߯ᓎᯊ䯈ǃ⠜ᴀǃ԰㗙ঞᓩ⫼ⱘ᠟ݠǃ䖤㸠⦃๗ㄝ)ǃߑ᭄⊼䞞(Ⳃⱘǃㅫ⊩ǃՓ⫼ⱘখ᭄੠䖨ಲؐⱘ৿Нǃᇍ⦃๗ⱘϔѯ؛䆒ㄝ)ঞ݊Ҫⱘᇥ䞣⊼䞞DŽगϛϡ㽕䰜䗄䙷ѯϔⳂњ✊ⱘݙᆍˈ৺߭ӮՓ⊼䞞ⱘᬜᵰ䗖ᕫ݊ডDŽ19 InstallShieldㅔᯢՓ⫼ᬭ⿟2.2᭄᥂㉏ൟǂǂ⿟ᑣৃҹⳟ៤ᰃ⬅᭄᥂㒧ᵘ੠ㅫ⊩㒘៤ⱘDŽ᭄᥂㒧ᵘԧ⦄ᇍ᭄᥂ⱘᦣ䗄ˈ㗠ㅫ⊩ড᯴њᇍ᭄᥂ⱘ᪡԰ঞ໘⧚DŽӏԩϔ䮼䅵ㅫᴎ䇁㿔䛑ᖙ乏ࣙᣀ᭄᥂㉏ൟǃ䖤ㅫヺϢ㸼䖒ᓣㄝݙᆍᴹᅮН੠ᅲ⦄⿟ᑣЁⱘ᭄᥂㒧ᵘ੠ㅫ⊩DŽ2.2.1෎ᴀ᭄᥂㉏ൟInstallScriptⱘ᭄᥂㉏ൟ↨݊Ҫӏԩ催㑻䇁㿔ⱘ᭄᥂㉏ൟ㽕ㅔऩᯧ⫼ˈᅗা᳝෎ᴀ㉏ൟ੠㒧ᵘ㉏ൟϸ㉏DŽ䖭䞠ܜ䅼䆎InstallScriptⱘ෎ᴀ᭄᥂㉏ൟDŽǂǂ෎ᴀ᭄᥂㉏ൟᰃInstallScriptⱘݙ䚼᭄᥂㉏ൟˈࣙᣀCHAR(ᄫヺൟ)ǃNUMBER(᭄ؐᭈൟ)ㄝˈ㸼2.2߫ߎ৘⾡෎ᴀ᭄᥂ⱘ㉏ൟDŽǂǂ䳔㽕䇈ᯢⱘᰃ˖೼InstallScriptⱘ᭄᥂㉏ൟЁˈ䰸њBOOLǃHWNDঞLIST㉏ൟϡ㛑Փ⫼ᇣݭᇣ᳝݊䖬ൟ㉏᥂᭄ⱘԭ݊ˈ໪ݭᔶᓣˈ՟བintǃnumberǃstringㄝˈ⫼ᴹᦤկϔ⾡ᮍDŽԚᰃˈInstallScript≵᳝᮴ヺো᭄᭄ؐ⚍⍂ঞҹൟ㉏ؐ㉏ൟDŽ20 InstallShieldㅔᯢՓ⫼ᬭ⿟2.2.2ᐌ䞣Ϣব䞣ǂǂḍ᥂⿟ᑣЁ᭄᥂ⱘৃবᗻˈ᭄᥂ৃҹߚЎᐌ䞣੠ব䞣ϸ໻㉏DŽ1.ᐌ䞣ǂǂ೼⿟ᑣ䖤㸠䖛⿟Ёˈ݊ؐϡ㛑㹿ᬍবⱘ䞣⿄Ўᐌ䞣DŽᐌ䞣ৃߚЎϡৠⱘ㉏ൟˈབ1ǃ20ǃ0ǃ-6Ўᭈൟᐌ䞣ˈča’ǃčb’Ўᄫヺᐌ䞣DŽᐌ䞣ϔ㠀Ң݊ᄫ䴶ᔶᓣेৃ߸߿DŽInstallScriptⱘᐌ䞣᳝ᭈൟᐌ䞣ǃᄫヺᐌ䞣੠ᄫヺІᐌ䞣ㄝ㉏ൟDŽ䖭ѯᐌ䞣ⱘ৿Н੠C䇁㿔෎ᴀϔ㟈ˈᬙ䖭䞠ϡݡ䞡໡DŽǂǂ䳔㽕䇈ᯢⱘᰃˈ೼InstallScriptЁ䖬ৃҹ⫼ϔϾᷛ䆚ヺ㸼⼎ϔϾᐌ䞣DŽ[՟Ex_Define]⫼#defineᅮНヺোᐌ䞣DŽ#defineTITLE"䯂׭"programSprintfBox(INFORMATION,TITLE,"%s","ᙼདʽ");endprogramǂǂ⿟ᑣЁ⫼#defineҸ㸠ᅮНTITLEˈՓ݊ҷ㸼ᄫヺІᐌ䞣"䯂׭"ˈℸৢ޵ᰃ೼⿟ᑣЁߎ⦄ⱘTITLE䛑ҷ㸼"䯂׭"ǂǂ䖭⾡ҷ᳓ᐌ䞣ᴀ䑿ⱘᷛ䆚ヺ⿄Ўヺোᐌ䞣DŽ೼⿟ᑣЁՓ⫼ヺোᐌ䞣ϡҙৃҹᦤ催⿟ᑣⱘৃ䇏ᗻ(ᷛ䆚ヺᘏ↨ᐌ䞣ᴀ䑿᳈݋ᛣН)ˈ㗠ϨᬍгᵕЎᮍDŽ2.ব䞣ǂǂব䞣ᰃᣛ೼⿟ᑣᠻ㸠Ё݊ؐৃҹᬍবⱘ䞣DŽব䞣ⱘ԰⫼ᰃᄬټ⿟ᑣЁ䳔㽕໘⧚ⱘ᭄᥂ˈᅗৃҹᬒ೼⿟ᑣЁⱘӏԩԡ㕂ϞDŽԚ᮴䆎བԩˈ೼Փ⫼ϔϾব䞣ࠡᖙ乏ܜᅮН䖭Ͼব䞣DŽǂǂব䞣ᰃ⫼ϟ䴶ⱘḐᓣ䇁হ䖯㸠ᅮНⱘ˖ǂǂ㉏ൟব䞣ৡ㸼;՟བ˖NUMBERnNum1;NUMBERnNum2;NUMBERnNum3;BOOLbValidEntry;ǂǂ݊ЁˈnNum1ǃnNum2ǃnNum3㹿ᅮН៤ᭈൟব䞣ˈ㗠bValidEntry㹿ᅮН៤Ꮧᇨൟব䞣DŽ᳝21 InstallShieldㅔᯢՓ⫼ᬭ⿟ᯊˈ䖬ৃҹᇚৠ㉏ൟⱘব䞣ᅮН೼ϔ㸠䇁হЁˈϡ䖛ব䞣ৡ㽕⫼䗫ো(,)ߚ䱨DŽ՟བϞ䴶ⱘব䞣ৃ䖭ḋᅮН˖NUMBERnNum1,nNum2,nNum3;BOOLbValidEntry;ǂǂ೼ᅮНᄫヺІᐌ䞣ᯊˈৃҹᣛᅮᄫヺІⱘ䭓ᑺˈ՟བ˖STRINGszUserName[128];//ᣛᅮᄫヺІⱘ䭓ᑺЎ128Ͼᄫヺǂǂ㢹ϡᣛᅮ݊䭓ᑺˈ߭InstallScript㞾ࡼᣛᅮDŽ16ԡ᪡԰㋏㒳ЁˈᄫヺІⱘ䭓ᑺ㹿ᣛᅮЎ512Ͼᄫヺˈ㗠32ԡ᪡԰㋏㒳ЁˈᄫヺІⱘ䭓ᑺ㹿ᣛᅮЎ1024ϾᄫヺDŽǂǂ೼ᅮНব䞣ᯊˈ䳔㽕⊼ᛣ˖(1)ϡ㛑೼Џ⿟ᑣԧ(program...endprogramП䯈)៪ߑ᭄ԧݙ䚼(begin...endП䯈)ᅮНব䞣ˈব䞣ᖙ乏ᅮН೼⿟ᑣԧ໪៪ߑ᭄ৡϢbegin݇䬂ᄫП䯈DŽ՟བ˖functionSdAskDestPath(szTitle,szMsg,svDir,nStyle)STRINGszDlg,svDirLoc,szTemp;INTnId,nTemp;HWNDhwndDlg;BOOLbDone;begin...end;(2)೼ৠϔϾЏ⿟ᑣ៪ৠϔϾߑ᭄ԧЁϡ㛑᳝ৠᯊߎ⦄ϸϾⳌৠⱘব䞣ৡDŽ(3)ϡ㛑೼ব䞣ᅮНⱘৠᯊˈ㒭ব䞣䌟߱ؐDŽ2.2.3InstallScript䖤ㅫヺㅔҟǂǂ੠݊Ҫⱘ⿟ᑣ䆒䅵䇁㿔ϔḋˈInstallScript䆄䗄䖤ㅫⱘヺো⿄Ў䖤ㅫヺˈ䖤ㅫヺⱘ䖤ㅫᇍ䈵⿄Ў᪡԰᭄DŽϔϾ᪡԰᭄ৃҹᰃব䞣ǃᐌ䞣៪ᰃ݋ԧⱘ᭄ؐㄝDŽᇍϔϾ᪡԰᭄䖤ㅫⱘ䖤ㅫヺ⿄ЎऩⳂ䖤ㅫヺˈབ-a˗ᇍѠϾ᪡԰᭄䖤ㅫⱘ䖤ㅫヺ⿄ЎঠⳂ䖤ㅫヺˈབ3+5ㄝDŽInstallScriptⱘ䖤ㅫヺߚЎҹϟ޴㉏˖ǂǂㅫᴃ䖤ㅫヺ(+,-,*,/)ǂǂ݇㋏䖤ㅫヺ(<,>,=,<=,>=,!=)ǂǂ䘏䕥䖤ㅫヺ(&&,||,!)ǂǂǂԡ䖤ㅫヺ(&,|,~,^,<<,>>)ǂǂ䌟ؐ䖤ㅫヺ(=)22 InstallShieldㅔᯢՓ⫼ᬭ⿟ǂǂᣛ䩜䖤ㅫヺ(*,&)ǂǂߚ䞣䖤ㅫヺ(.,->)ǂǂϟᷛ䖤ㅫヺ([])ǂᄫヺІ䖤ㅫヺ(^,+,%)ǂǂǂǂǂ݊ᅗ(བBYREF䖤ㅫヺ)2.2.4ㅫᴃ䖤ㅫヺǂǂㅫᴃ䖤ㅫヺࣙᣀᐌ⫼ⱘࡴޣЬ䰸ಯ߭䖤ㅫヺҹঞऩⳂℷ䋳䖤ㅫヺˈབϟ᠔⼎˖+(ℷো䖤ㅫヺˈབ+4ㄝ)-(䋳ো䖤ㅫヺˈབ-4ㄝ)*(Ь⊩䖤ㅫヺˈབ6*8ㄝ)/(䰸⊩䖤ㅫヺˈབ6/8ㄝ)+(ࡴ⊩䖤ㅫヺˈབ6+8ㄝ)-(ޣ⊩䖤ㅫヺˈབ6-8ㄝ)InstallScriptЁㅫᴃ䖤ㅫヺ੠᭄ᄺ䖤ㅫⱘὖᗉঞ䖤ㅫᮍ⊩ᰃϔ㟈ⱘˈԚ㽕⊼ᛣҹϟ޴⚍˖(1)䰸⊩䖤ㅫǂǂϸϾᭈ᭄Ⳍ䰸ˈ㒧ᵰЎᭈ᭄ˈབ7/5ⱘ㒧ᵰЎ1ˈᅗᰃᇚᇣ᭄䚼ߚএᥝˈ㗠ϡᰃಯ㟡ѨܹDŽԚInstallScriptϡᬃᣕ⍂⚍䖤ㅫDŽ(2)Ӭܜ㑻੠㒧ড়ᗻǂǂ೼ϔϾࣙ৿໮⾡ㅫᴃ䖤ㅫⱘ⏋ড়䖤ㅫЁˈܜЬ䰸ৢࡴޣⱘ䖤ㅫ㾘߭ᰃ⬅䖤ㅫヺⱘӬܜ㑻ᴹ䆕ⱘDŽInstallScriptᇚ㸼䖒ᓣ∖ؐЁ໮⾡䖤ㅫП䯈ⱘܜৢ݇㋏(े䖤ㅫヺП䯈ⱘӬܜ݇㋏)⫼䖤ㅫヺⱘӬܜ㑻㸼⼎DŽ೼ㅫᴃ䖤ㅫヺЁˈऩⳂ䖤ㅫヺⱘӬܜ㑻᳔催ˈ݊⃵ᰃЬǃ䰸ˈ᳔ৢᰃࡴޣDŽǂǂӬܜ㑻Ⳍৠⱘ䖤ㅫヺˈ߭ᣝᅗӀⱘ㒧ড়ᗻ䖯㸠໘⧚DŽ᠔䇧䖤ㅫヺⱘ㒧ড়ᗻᰃᣛ䖤ㅫヺ੠᪡԰᭄ⱘ㒧ড়ᮍᓣˈᅗ᳝"ҢᎺ㟇ে"੠"Ңে㟇Ꮊ"ϸ⾡DŽ"ҢᎺ㟇েⱘ㒧ড়"জ⿄"Ꮊ㒧ড়"ˈᰃᣛ䖤ㅫヺᎺ䖍ⱘ᪡԰᭄ܜϢ䖤ㅫヺⳌ㒧ড়ˈݡϢ䖤ㅫヺে䖍ⱘ᪡԰᭄䖯㸠䖤ㅫˈབ3*5/4ⱘ⃵ᑣᰃܜЬৢ䰸˗㗠㞾ে㟇Ꮊⱘ"ে㒧ড়"ⱘ⃵ᑣ߮དⳌডˈᅗᰃᇚ䖤ㅫヺে䖍ⱘ᪡԰᭄ܜϢ䖤ㅫヺⳌ㒧ড়ˈབ-i+6ⳌᔧѢ(-i)+6ǂǂ೼ㅫᴃ䖤ㅫヺЁˈ䰸ऩⳂ䖤ㅫヺ໪ˈ݊ԭ䖤ㅫヺⱘ㒧ড়ᗻ䛑ᰃҢᎺ㟇েⱘDŽ(3)݇ѢкݭḐᓣǂǂ೼Փ⫼䖤ㅫヺ䖯㸠᭄ؐ䖤ㅫᯊˈ㢹кݭᯊ≵᳝೼ঠⳂ䖤ㅫヺϸ䖍ࡴϞぎḐˈ᳝߭ᯊ㓪䆥㋏㒳ӮخߎϢ㞾Ꮕᛇ䈵Ёϡৠⱘ⧚㾷DŽ՟བ˖-5*-6-7੠-5*-6--7//⊼ᛣぎḐ㒧ᵰᰃϡϔḋˈࠡ㗙থ⫳㓪䆥䫭䇃ˈ㗠ৢᵰⱘ㒧ᵰᰃ3723 InstallShieldㅔᯢՓ⫼ᬭ⿟ǂǂЎњ䙓ܡϞ䗄ᚙމⱘথ⫳ˈ೼кݭᯊˈ᳝ᯊᑨ᳝ᛣ䆚ഄࡴϞϔѯᣀোDŽ䖭ḋϡҙ๲ᔎ⿟ᑣⱘৃ䇏ᗻˈ㗠Ϩˈᇸ݊ᔧᇍӬܜ݇㋏⢍䈿ᯊˈࡴϞᣀোᰃ䆕ℷ⹂㒧ᵰⱘ᳔དᮍ⊩DŽ2.2.5䌟ؐ䖤ㅫヺ੠䌟ؐ㸼䖒ᓣǂǂ೼InstallScript㛮ᴀ䇁㿔Ёˈ䌟ؐヺ"="ᰃϔϾঠⳂ䖤ㅫヺˈ㒧ড়ᗻҢে㟇Ꮊˈ݊԰⫼ᰃᇚ䌟ؐヺে䖍᪡԰᭄ⱘؐ䌟㒭Ꮊ䖍ⱘ᪡԰᭄DŽ↣ϔϾড়⊩ⱘ㸼䖒ᓣ೼∖ؐৢ䛑᳝ϔϾ⹂ᅮⱘؐ੠㉏ൟDŽ䌟ؐ㸼䖒ᓣⱘؐᰃ䌟ؐヺে䖍᪡԰᭄ⱘؐˈ䌟ؐ㸼䖒ᓣⱘ㉏ൟᰃ䌟ؐヺে䖍᪡԰᭄ⱘ㉏ൟDŽ՟བϟ䴶䇁হ˖STRINGszName;LONGnValue;BOOLbDone;HWNDhInstance;INTiStyle;LISTLISTINFO;programszName="InstallShield";nValue=15;bDone=FALSE;hInstance=0;iStyle=DLG_MSG_STANDARD|DLG_CENTERED;LISTINFO=ListCreate(STRINGLIST);...ǂǂԚᰃˈInstallScriptϡᬃᣕ໮䞡䌟ؐ䖤ㅫˈ՟བa=b=cⳌᔧѢC++ⱘa=b==cDŽгህᰃ䇈ˈ㢹bϡㄝѢcˈ㸼䖒ᓣЎa=0ˈ㢹b੠cⳌㄝˈ߭㸼䖒ᓣЎa=124 InstallShieldㅔᯢՓ⫼ᬭ⿟2.3䘏䕥䖤ㅫ੠߸ᮁ䗝প᥻ࠊInstallScriptᕔᕔ߽⫼䘏䕥䖤ㅫৢⱘ㒧ᵰᇍ⿟ᑣ䖯㸠߸ᮁǃ䗝পㄝ᥻ࠊDŽ2.3.1݇㋏䖤ㅫヺǂǂ݇㋏䖤ㅫᰃ䘏䕥䖤ㅫЁ↨䕗ㅔऩⱘϔ⾡DŽ᠔䇧"݇㋏䖤ㅫ"ᅲ䰙Ϟᰃ↨䕗ϸϾ᪡԰᭄ᰃ৺ヺড়㒭ᅮⱘᴵӊDŽ㢹ヺড়ᴵӊˈ߭݇㋏㸼䖒ᓣⱘؐЎ"ⳳ"ˈ৺߭Ў"؛"DŽ೼InstallScript㓪䆥㋏㒳Ёˈᕔᕔᇚ"ⳳ"㸼⼎ЎTRUEˈᇚ"؛"㸼⼎ЎFALSEDŽ㗠ӏԩϡЎ0ⱘ᭄㹿䅸Ўᰃ"ⳳ"ˈ0㹿䅸Ўᰃ"؛"ǂǂ⬅Ѣ݇㋏䖤ㅫ䳔㽕ϸϾ᪡԰᭄ˈ᠔ҹ݇㋏䖤ㅫヺ䛑ᰃঠⳂ䖤ㅫヺDŽInstallScriptᦤկњϟ߫6⾡݇㋏䖤ㅫヺ˖<(ᇣѢ)ˈ<=(ᇣѢㄝѢ)ˈ>(໻Ѣ)ˈ>=(໻ѢㄝѢ)ˈ=(ⳌㄝѢ)ˈ!=(ϡㄝѢ)ǂǂ݊Ёˈࠡ4⾡ⱘӬܜ㑻ⳌৠϨ催Ѣৢ䴶ⱘϸ⾡ˈԚ݇㋏䖤ㅫヺⱘӬܜ㑻ԢѢㅫᴃ䖤ㅫヺDŽ䳔㽕䇈ᯢⱘᰃ˖(1)InstallScript䌟ؐ䖤ㅫヺ੠ㄝѢⱘ݇㋏䖤ㅫヺՓ⫼ৠϔϾ"="ヺোDŽ(2)InstallScriptϡᬃᣕ䌟ؐ੠݇㋏䖤ㅫৠ೼ϔϾ㸼䖒ᓣЁⱘᚙᔶDŽ՟བˈϟ䴶ⱘ䇁হᰃϡܕ䆌ⱘ˖if((listID=ListCreate(NUMBERLIST))=LIST_NULL)then...endif;2.3.2䘏䕥䖤ㅫヺǂǂ䘏䕥䖤ㅫヺᰃ⫼Ѣᇚ໮Ͼ݇㋏㸼䖒ᓣ៪䘏䕥䞣("ⳳ"៪"؛")㒘៤ϔϾ䘏䕥㸼䖒ᓣDŽInstallScriptᦤկњϟ߫3⾡䘏䕥䖤ㅫヺ˖!䘏䕥䴲(ऩⳂ)&&䘏䕥Ϣ(ঠⳂ)||䘏䕥៪(ঠⳂ)25 InstallShieldㅔᯢՓ⫼ᬭ⿟"䘏䕥䴲"ᰃᣛᇚ"ⳳ"ব"؛"ˈ"؛"ব"ⳳ""䘏䕥Ϣ"ᰃᣛᔧϸϾ᪡԰᭄䛑ᰃ"ⳳ"ᯊˈ㒧ᵰᠡЎ"ⳳ"ˈ৺߭Ў"؛""䘏䕥៪"ᰃᣛᔧϸϾ᪡԰᭄Ё᳝ϔϾᰃ"ⳳ"ᯊˈ㒧ᵰህЎ"ⳳ"ˈ㗠া᳝ᔧᅗӀ䛑Ў"؛"ᯊˈ㒧ᵰᠡЎ"؛""䘏䕥䴲"ǃ"䘏䕥Ϣ"੠"䘏䕥៪"ⱘӬܜ㑻ձ⃵Ң催ࠄԢˈϨ"䘏䕥䴲"ⱘӬܜ㑻䖬↨݇㋏䖤ㅫヺ催ˈ㗠"䘏䕥Ϣ"੠"䘏䕥៪"ⱘӬܜ㑻ै↨݇㋏䖤ㅫヺԢDŽǂǂ੠CϡϔḋˈInstallScriptᇍ䘏䕥㸼䖒ᓣⱘؐ䴲ᐌᬣᛳˈ՟བϟ䴶ҷⷕ˖if(iVar=10)&&(MyFunction()=0)thenMessageBox("Thatissotrue.",INFORMATION);endif;ǂǂা᳝ᔧ&&䖤ㅫヺᎺ䖍ⱘ㒧ᵰЎTRUEᯊˈে䖍ⱘߑ᭄MyFunctionᠡӮ㹿ᠻ㸠DŽЎњϡᓩ䍋䇃㾷ˈ᳔དᇚϞ䗄ҷⷕᬍݭ៤˖if(iVar=10)thenif(MyFunction()=0)thenMessageBox("Thatissotrue.",INFORMATION);endif;endif;2.3.3if䇁হif䇁হᰃ⫼ᴹ߸ᅮ᠔㒭ᅮⱘᴵӊᰃ৺⒵䎇ˈᑊḍ᥂߸ᅮⱘ㒧ᵰ("ⳳ"៪"؛")އᅮᠻ㸠㒭ߎⱘϸ⾡᪡԰ПϔDŽInstallScriptᦤկњϟ߫5⾡ᔶᓣⱘif䇁হDŽ(1)if-then㒧ᵘif-then㒧ᵘ݋᳝ϟ߫ᔶᓣ˖if(ᴵӊ㸼䖒ᓣ)thenǂǂǂǂǂ䇁হendif;ǂǂᔧ"ᴵӊ㸼䖒ᓣ"㸼䖒Ў"ⳳ"ᯊˈthenৢ䴶ⱘ䇁হᠡӮ㹿ᠻ㸠DŽϔϾ"ᴵӊ㸼䖒ᓣ"ৃҹᰃϔϾᏗᇨ៪ᭈൟᐌ䞣ǃব䞣ǃѻ⫳Ꮧᇨ៪ᭈൟ㒧ᵰⱘ㸼䖒ᓣҹঞ㛑䖨ಲᭈൟ㒧ᵰⱘߑ᭄DŽǂǂ՟བ˖26 InstallShieldㅔᯢՓ⫼ᬭ⿟if(szStringA="exit")thenAskYesNo("Areyousureyouwanttoexit?",NO);endif;ǂǂᔧᄫヺІszStringA੠"exit"Ⳍㄝᯊˈߑ᭄AskYesNoᠡӮ㹿ᠻ㸠ˈ৺߭䏇䖛if-then㒧ᵘˈᠻ㸠ৢ䴶ⱘ䇁হDŽᴵӊ㸼䖒ᓣϸ䖍ⱘ೚ᣀো"()"ᰃৃ䗝ⱘˈԚ᳔ད㛑Փ⫼ˈ಴Ўᅗ㛑ᦤ催⿟ᑣҷⷕⱘৃ䇏ᗻDŽ(2)if-then-else㒧ᵘif-then-else㒧ᵘ݋᳝ϟ߫ᔶᓣ˖if(ᴵӊ㸼䖒ᓣ)thenǂǂǂǂǂǂ䇁হ1elseǂǂǂǂǂǂ䇁হ2endif;ǂǂᔧ"ᴵӊ㸼䖒ᓣ"㸼䖒Ў"ⳳ"ᯊˈᠻ㸠thenৢ䴶ⱘ䇁হ1ˈ㗠ᔧ"ᴵӊ㸼䖒ᓣ"㸼䖒Ў"؛"ᯊˈᠻ㸠䇁হ2DŽ՟བ˖ifszStringA="exit"thenAskYesNo("Areyousureyouwanttoexit?",NO);//szStringAㄝѢ"exit"ᯊelseMessageBox("Pleasewait...",INFORMATION);//szStringAϡㄝѢ"exit"ᯊendif;(3)if-then-elseⱘጠ༫㒧ᵘǂǂ೼if-then-else䇁হЁҹࣙ৿ϔϾ៪໮Ͼif-then-else䇁হ⿄Ўif-then-else䇁হⱘጠ༫DŽ݊ϔ㠀ᔶᓣབϟ˖if(ᴵӊ㸼䖒ᓣ1)thenif(ᴵӊ㸼䖒ᓣ2)thenǂǂǂǂǂǂǂ䇁হ1//ᔧᴵӊ㸼䖒ᓣ2ЎTRUEᯊᠻ㸠elseǂǂǂǂǂǂǂ䇁হ2//ᔧᴵӊ㸼䖒ᓣ2ЎFALSEᯊᠻ㸠endif;elseif(ᴵӊ㸼䖒ᓣ3)thenǂǂǂǂǂǂǂ䇁হ3//ᔧᴵӊ㸼䖒ᓣ3ЎTRUEᯊᠻ㸠elseǂǂǂǂǂǂǂ䇁হ4//ᔧᴵӊ㸼䖒ᓣ3ЎFALSEᯊᠻ㸠27 InstallShieldㅔᯢՓ⫼ᬭ⿟endif;endif;ǂǂ՟བ˖ifszStringA="exit"thenAskYesNo("Areyousureyouwanttoexit?",NO);elseifszStringA="continue"thenMessageBox("Pleasewait...",INFORMATION);elseUserErrorHandler;endif;endif;ǂǂᔧᄫヺІszStringA੠"exit"Ⳍㄝᯊˈᠻ㸠ߑ᭄AskYesNo˗ᔧszStringA੠"continue"Ⳍㄝᯊˈᠻ㸠MessageBoxˈ㗠ᔧszStringAㄝѢ݊Ҫؐᯊˈ⫼᠋㞾ᅮНⱘUserErrorHandlerߑ᭄㹿ᠻ㸠DŽ(4)elseif㒧ᵘelseif㒧ᵘ݋᳝ϟ߫ᔶᓣ˖if(ᴵӊ㸼䖒ᓣ1)thenǂǂǂǂǂ䇁হ1elseif(ᴵӊ㸼䖒ᓣ2)thenǂǂǂǂǂ䇁হ2elseif(ᴵӊ㸼䖒ᓣ3)thenǂǂǂǂǂ䇁হ3...endif;ǂǂ՟བ˖ifszStringA="exit"thenAskYesNo("Areyousureyouwanttoexit?",NO);elseifszStringA="continue"thenMessageBox("Pleasewait...",INFORMATION);elseifszStringA="reboot"thengotoStartHere;endif;...StartHere:...28 InstallShieldㅔᯢՓ⫼ᬭ⿟ǂǂǂҷⷕЁˈStartHereᰃϔϾ䇁হᷛোDŽᔧᄫヺІszStringA੠"exit"Ⳍㄝᯊˈᠻ㸠ߑ᭄AskYesNo˗㢹ϡⳌᯊㄝˈ߭ᇚszStringA੠"continue"↨䕗ˈⳌㄝᯊᠻ㸠ߑ᭄MessageBox˗㢹ϡⳌㄝˈݡᇚszStringA੠"reboot"↨䕗ˈ...(5)if੠goto㒧ᵘif੠gotoⱘ㒧ᵘ݋᳝ϟ߫ᔶᓣ˖if(ᴵӊ㸼䖒ᓣ)gotoᷛো;ǂǂǂǂᔧᴵӊ㸼䖒ᓣЎ"ⳳ"ᯊˈᇚ⌕⿟䕀ࠄ"ᷛো"᠔೼ⱘԡ㕂DŽ䖭⾡ᔶᓣ᳔ㅔऩˈ՟བ˖Name:AskText("Companyname:","",szSrc);if(szSrc="")gotoName;ǂǂϔᮺszSrcЎぎᄫヺІᯊˈህϡذഄ㽕∖⫼᠋䕧ܹⳌ݇ݙᆍDŽ2.3.4switch...endswitch䇁হǂǂᔧ⿟ᑣ᳝໮Ͼᴵӊ߸ᮁᯊˈ㢹Փ⫼if䇁হ߭ৃ㛑Փጠ༫໾໮ˈ䰡Ԣњ⿟ᑣⱘৃ䇏ᗻDŽᓔ݇䇁হswitch㛑ᕜདഄ㾷އ䖭Ͼ䯂乬ˈᅗ݋᳝ϟ߫ᔶᓣ˖switch(㸼䖒ᓣ)caseᐌ䞣1˖䇁হ1caseᐌ䞣2˖䇁হ2...caseᐌ䞣n˖䇁হndefault˖䇁হn+1endswitch;ǂǂᔧ㸼䖒ᓣⱘؐϢcaseЁᶤϾؐⳌㄝᯊˈህᠻ㸠䆹caseЁ""োৢ䴶ⱘ᠔᳝䇁হDŽ㢹caseЁ᠔᳝ⱘؐ䛑ϡㄝѢ㸼䖒ᓣⱘؐˈ߭ᠻ㸠default:ৢ䴶ⱘ䇁হˈ㢹defaultϡᄬ೼ˈ߭䏇ߎswitch㒧ᵘDŽǂǂ䖭䞠ⱘ㸼䖒ᓣৃҹᰃϔϾᐌ䞣ǃব䞣ǃㅫᴃ㸼䖒ᓣǃ䘏䕥㸼䖒ᓣ៪ϔϾ᳝䖨ಲؐⱘߑ᭄ˈԚᖙ乏⫼೚ᣀো"()"ᣀ䍋ᴹDŽcaseৢ䴶া㛑ᰃϔϾᐌ᭄៪ᐌ䞣ৡˈϡ㛑Ўব䞣ৡǃ᳝䖨ಲؐⱘߑ᭄ৡǃᄫヺІ㸼⍝ঞⱘᄫヺІৡҹঞ݊Ҫ㉏ൟⱘ㸼䖒ᓣㄝDŽǂǂ՟བ˖STRINGszMsg,svResult;NUMBERnvResult;program29 InstallShieldㅔᯢՓ⫼ᬭ⿟GetSystemInfo(VIDEO,nvResult,svResult);//㦋ᕫ㋏㒳ᰒव㉏ൟswitch(nvResult)caseIS_UNKNOWN:szMsg="⫼᠋ᰒव㉏ൟ᳾ⶹ";caseIS_EGA:szMsg="EGAᰒव";caseIS_VGA:szMsg="VGAᰒव";caseIS_SVGA:szMsg="SuperVGA(800x600)ᰒव";caseIS_XVGA:szMsg="XVGA(1024x768)ᰒव";caseIS_UVGA:szMsg="ߚ䕼⥛໻Ѣ1024x768ⱘᰒव";default:szMsg="䫭䇃";endswitch;MessageBox(szMsg,INFORMATION);endprogramǂǂ↣⃵া᳝ϔϾcase䇁হഫ㹿ᠻ㸠ˈᠻ㸠ৢˈᇚ䏇ߎswitch㒧ᵘˈᠻ㸠endswitchৢ䴶ⱘ䇁হˈ䖭ϔ⚍ϢC䇁㿔ϡৠˈInstallScripⱘcase䇁হৢϡ䳔㽕break30 InstallShieldㅔᯢՓ⫼ᬭ⿟2.4ᕾ⦃䇁হǂǂ೼InstallScript䇁㿔Ёˈৃҹ⫼ҹϟ޴⾡ᔶᓣⱘ䇁হᴹᅲ⦄ᕾ⦃˖(1)⫼goto䇁হ੠if䇁হᵘ៤ᕾ⦃(2)⫼while..endwhile䇁হ(3)⫼repeat..until䇁হ(4)⫼for..endfor䇁হ2.4.1⫼⫼⫼goto䇁হ੠if䇁হᵘ៤ᕾ⦃goto䇁হЎ᮴ᴵӊ䕀৥䇁হˈᅗⱘϔ㠀ᔶᓣЎ˖goto䇁হᷛো˗ǂǂ䇁হᷛো⫼ᷛ䆚ヺ㸼⼎ˈᅗⱘৡ㾘߭Ϣব䞣ৡⳌৠˈϡ㛑⫼ᭈ᭄ᴹ԰ЎᷛোDŽ㒧ᵘ࣪⿟ᑣ䆒䅵ᮍ⊩Џᓴ䰤ࠊՓ⫼goto䇁হˈ಴ЎⒹ⫼goto䇁হᇚՓ⿟ᑣ⌕⿟᮴㾘ᕟǃৃ䇏ᗻᏂDŽԚгϡᰃ㒱ᇍ⽕ℶՓ⫼goto䇁হDŽϔ㠀ᴹ䇈ˈৃҹ᳝ϸ⾡⫼䗨˖ϔᰃҢᕾ⦃ԧЁ䏇ࠄᕾ⦃ԧ໪ˈ঺ϔᰃϢif䇁হϔ䍋ᵘ៤ᕾ⦃㒧ᵘDŽǂǂ՟བ˖Name:AskText("Companyname:","",szSrc);if(szSrc="")thenMessageBox("Pleaseenterthecompanyname.",SEVERE);gotoName;endif;2.4.2while..endwhile䇁হ31 InstallShieldㅔᯢՓ⫼ᬭ⿟while..endwhileᕾ⦃䇁হ݋᳝ϟ߫ᔶᓣ˖while(㸼䖒ᓣ)ǂǂǂǂ䇁হendwhile;¯䇁হāᰃℸᕾ⦃ⱘᕾ⦃ԧˈᅗৃҹᰃϔᴵ䇁হˈгৃҹᰃ໮ᴵⱘ໡ড়䇁হDŽᔧ"㸼䖒ᓣ"Ў"ⳳ"ᯊᓔྟᠻ㸠whileᕾ⦃ԧЁⱘ䇁হˈ✊ৢড໡ᠻ㸠ˈ↣⃵ᠻ㸠䛑Ӯ߸ᮁ"㸼䖒ᓣ"ᰃ৺Ў"ⳳ"ˈ㢹Ў"؛"ˈ߭㒜ℶᕾ⦃DŽ[՟Ex_While]ϔϾㅔऩⱘwhile..endwhileᕾ⦃⿟ᑣDŽNUMBERnCount;programnCount=1;while(nCount<5)MessageBox("Thisisstilltrue.",INFORMATION);nCount=nCount+1;endwhile;endprogramǂǂ⬅ѢnCountⱘ߱ྟؐЎ1ˈ಴ℸwhileⱘ㸼䖒ᓣЎ"ⳳ"ˈᕾ⦃ԧ㄀ϔ⃵㹿ᠻ㸠ˈৠᯊnCount㹿๲ࡴ1ˈᔧᕾ⦃4⃵ৢˈnCount㹿๲ࡴࠄ5ˈℸᯊwhileⱘ㸼䖒ᓣЎ"؛"ˈ㒧ᴳᕾ⦃ˈᠻ㸠endwhileৢ䴶ⱘ䇁হDŽǂǂ䳔㽕䇈ᯢⱘᰃˈwhile..endwhileᕾ⦃ৃҹՓ⫼ጠ༫ˈԚ↣ϔϾwhileᕾ⦃ԧ䛑ᖙ乏ҹendwhileᴹ㒧ᴳDŽ೼whileᕾ⦃ԧЁϡ㛑ᅮН䇁হ"ᷛো"2.4.3repeat..until䇁হrepeat..untilᕾ⦃䇁হ݋᳝ϟ߫ᔶᓣ˖repeatǂǂǂǂ䇁হuntil(㸼䖒ᓣ);"䇁হ"ᰃℸᕾ⦃ⱘᕾ⦃ԧˈᅗৃҹᰃϔᴵ䇁হˈгৃҹᰃ໮ᴵⱘ໡ড়䇁হDŽᔧ䇁হᠻ㸠ࠄuntilᯊˈᇚ߸ᮁ"㸼䖒ᓣ"ᰃ৺Ў"ⳳ"ˈ㢹ᰃˈ߭㒻㓁ᠻ㸠ᕾ⦃ԧˈⳈࠄϟϔ⃵㸼䖒ᓣㄝѢ"؛"ЎℶDŽ[՟Ex_Repeat]repeat..untilᕾ⦃⿟ᑣDŽNUMBERnCount;program32 InstallShieldㅔᯢՓ⫼ᬭ⿟nCount=1;repeatMessageBox("Countislessthan5",INFORMATION);nCount=nCount+1;until(nCount=5);endprogramǂǂৠwhileϔḋˈ೼repeatᕾ⦃ԧЁгϡ㛑ᅮН䇁হ"ᷛো"2.4.4for..endfor䇁হfor..endforᕾ⦃䇁হ݋᳝ϟ߫ᔶᓣ˖forX=AtoBstepCǂǂǂǂ䇁হendfor;ǂǂ݊ЁˈXЎᕾ⦃᥻ࠊব䞣(៪⿄ᕾ⦃ব䞣)ˈৃҹ⫼ӏϔㅔऩব䞣ᴹ㸼⼎˗AЎᕾ⦃ব䞣߱ؐ˗BЎᕾ⦃ব䞣㒜ؐ˗CЎᕾ⦃ব䞣ⱘ๲䞣៪ℹ䭓DŽ㢹ⳕ⬹step݇䬂ᄫˈ߭๲䞣㞾ࡼЎ1DŽ݇䬂ᄫtoгৃ⫼downtoҷ᳓ˈ㸼⼎Ң᭄ؐҢ催ࠄԢ㞾ࡼޣএCⱘ䞣DŽ[՟Ex_For]for..endforᕾ⦃⿟ᑣDŽNUMBERiCount;programforiCount=1to5MessageBox("Youwillseethis5times",INFORMATION);endfor;endprogram[՟Ex_DownFor]Փ⫼downtoⱘfor..endforᕾ⦃⿟ᑣDŽNUMBERj;programforj=20downto10step5MessageBox("Youwillseethis3times",INFORMATION);endfor;endprogramǂǂৠrepeatϔḋˈ೼forᕾ⦃ԧЁгϡ㛑ᅮН䇁হ"ᷛো"33 InstallShieldㅔᯢՓ⫼ᬭ⿟2.4.5abort੠੠੠exitabort(ᓖᐌЁᮁ)੠exit(䗔ߎ)ᰃInstallScriptⱘϸϾ݇䬂ᄫDŽ೼ᅝ㺙⿟ᑣᠻ㸠䖛⿟Ёˈᔧ⫼᠋ᣝϟEsc䬂ǃF3䬂៪ऩߏᅝ㺙ᇍ䆱ḚЁⱘ[Cancel]ᣝ䪂ᯊˈ㋏㒳ᇚ㞾ࡼᠻ㸠abortˈ݊ⳂⱘᰃᇚᏆᅝ㺙ⱘݙᆍҢ䅵ㅫᴎ㋏㒳Ё⏙䰸ᥝDŽӏԩᯊ׭ˈা㽕ᅝ㺙⿟ᑣ䘛ࠄabortˈ䛑Ӯ䖯㸠Ϟ䗄ⱘ໘⧚DŽ㗠exitাᰃЁᮁᅝ㺙⿟ᑣⱘᠻ㸠ˈ಴ℸ㢹⫼᠋೼᳾ᅝ㺙ᅠПࠡ䳔㽕⿟ᑣЁᮁˈ߭ᑨ೼Џ⿟ᑣԧЁՓ⫼abortᴹҷ᳓exitDŽԚгᑨ⊼ᛣˈ㱑✊exit䖬ৃҷ᳓⿟ᑣЁⱘendprogramˈϢprogramϔ䍋ᵘ៤ϔϾЏ⿟ᑣԧˈԚ᳔དϡ㽕䖭ḋ2.5ߑߑߑ᭄᭄᭄ǂǂ೼㒧ᵘ࣪⿟ᑣ䆒䅵Ёˈ䗮ᐌ䳔㽕㢹ᑆϾ῵ഫᅲ⦄䕗໡ᴖⱘࡳ㛑ˈ㗠↣ϔϾ῵ഫ㞾៤㒧ᵘˈ⫼ᴹ㾷އϔѯᄤ䯂乬DŽ䖭⾡῵ഫ࣪ⱘ㒧ᵘ䆒䅵ᗱᛇ㛑ᕜདഄথ᣹"ಶ䯳"࡯䞣ˈ೼ҷⷕᬍ੠䞡⫼ϞˈᵕЎᮍ੠ᖿ᥋DŽߑ᭄ℷᰃ㒧ᵘ࣪䆒䅵⿟ᑣⱘ෎ᴀ㒧ᵘDŽ2.5.1ὖ䗄InstallScriptܕ䆌⫼᠋೼ᅝ㺙⿟ᑣЁՓ⫼ϟ߫ϝ⾡㉏ൟⱘߑ᭄˖(1)InstallShieldݙ䚼ߑ᭄InstallShieldЁᅮНњ250໮Ͼⱘݙ䚼ߑ᭄ˈࣙᣀᄫヺІ໘⧚ǃ᭛ӊǃ䏃ᕘҹঞ᭛ӊ།ㄝ᪡԰ⱘߑ᭄DŽ䰸њSdᇍ䆱Ḛߑ᭄໪ˈ݊Ҫ໻໮᭄ݙ䚼ߑ᭄ৃҹⳈ᥹೼⿟ᑣЁ䖯㸠䇗⫼DŽ(2)⫼᠋㞾ᅮНⱘߑ᭄ǂǂ㞾ᅮНⱘߑ᭄ᰃ⫼᠋㞾Ꮕᵘ䗴ⱘߑ᭄ˈᅗᖙ乏೼Џ⿟ᑣԧprogram݇䬂ᄫࠡໄᯢˈ㗠೼endprogramৢ䖯㸠ᅮНˈᠡ㛑೼⿟ᑣЁ䖯㸠䇗⫼DŽ(3)DLLߑ᭄Windowsࡼᗕ䫒᥹ᑧ(DynamicLinkingLibraryˈㅔ⿄DLL)ᦤկњϔѯ⡍ᅮ㒧ᵘⱘߑ᭄ˈ㛑㹿ᑨ⫼⿟ᑣ೼䖤㸠䖛⿟Ё㺙ܹ੠䖲᥹ˈϨ໮Ͼ⿟ᑣৃҹ݅ѿৠϔϾࡼᗕ䫒᥹ᑧˈҢ㗠ৃҹ໻໻㡖ⳕݙᄬ੠⺕Ⲭぎ䯈DŽҢ㓪⿟㾦ᑺᴹ䇈ˈࡼᗕ䫒᥹ᑧৃҹᦤ催⿟ᑣ῵ഫⱘ♉⌏ᗻˈ಴Ўᅗᴀ䑿ᰃৃҹऩ⣀䆒䅵ǃ㓪䆥੠䇗䆩ⱘDŽৠ໻໮᭄㓪⿟䇁㿔ϔḋˈ೼InstallShield5.5Ёгৃᮍ䇗⫼DLLߑ᭄DŽ34 InstallShieldㅔᯢՓ⫼ᬭ⿟2.5.2㞾ᅮНߑ᭄ⱘໄᯢ੠ᅮНǂǂ೼InstallScript㛮ᴀ䇁㿔ЁˈՓ⫼⫼᠋㞾ᅮНߑ᭄ᖙ乏ܜ䖯㸠ߑ᭄ⱘໄᯢˈ✊ৢ䖯㸠ߑ᭄ⱘᅮНDŽ(1)㞾ᅮНߑ᭄ⱘໄᯢǂǂ㞾ᅮНⱘߑ᭄ᖙ乏೼Џ⿟ᑣԧprogram݇䬂ᄫࠡᣝϟ߫ᔶᓣ䖯㸠ໄᯢ˖prototypeߑ᭄ৡ(ᔶখ㉏ൟ1ˈᔶখ㉏ൟ2ˈ...);ǂǂ݊ЁˈprototypeᰃInstallScriptⱘ݇䬂ᄫˈᅗ䗮ⶹ㓪䆥఼䆹㸠䇁হᰃ⫼ᴹໄᯢϔϾ㞾ᅮНߑ᭄DŽ"ᔶখ㉏ൟ"ᰃᣛInstallScriptⱘ෎ᴀ᭄᥂㉏ൟˈབINTǃSTRING៪SHORTㄝDŽ՟བϟ䴶ⱘߑ᭄ໄᯢ䛑ᰃড়⊩ⱘ˖prototypeFunctionName(INT,STRING,SHORT);//ໄᯢ᳝ϝϾᔶখⱘߑ᭄prototypeCopyBitmapExample();//ໄᯢϔϾ≵᳝ᔶখⱘߑ᭄prototypeFileTransfer(LONG,LONG,LONG,STRING,STRING);//ໄᯢ᳝ѨϾᔶখⱘߑ᭄ߑ᭄ৡᰃϔϾ᳝ᬜⱘInstallScriptᷛ䆚ヺ(⊼ᛣৡ㾘߭)ˈߑ᭄ৡৢ䴶ᖙ乏䎳ϔᇍ೚ᣀো"()"ˈҹऎ߿Ѣব䞣ৡঞ݊Ҫ⫼᠋ᅮНⱘᷛ䆚ৡDŽߑ᭄ⱘᔶᓣখ᭄ݙোᣀ೼ݭˈখ᭄㸼Ёখ᭄Ͼ᭄ৃҹᰃ0ˈ㸼⼎≵᳝খ᭄ˈԚ೚ᣀোϡ㛑ⳕ⬹ˈгৃҹᰃϔϾ៪໮Ͼখ᭄ˈԚ໮Ͼখ᭄䯈㽕⫼䗫োߚ䱨DŽ(2)ߑ᭄ⱘᅮНǂǂߑ᭄ໄᯢৢˈᖙ乏೼Џ⿟ᑣԧendprogramৢᣝ✻ϟ߫ⱘᔶᓣ䖯㸠Ⳍᑨⱘߑ᭄ᅮН˖functionߑ᭄ৡ(ᔶখ1ˈᔶখ2ˈ...)ǂᅮНߑ᭄ݙ䚼Փ⫼ⱘব䞣˗beginǂǂǂǂǂ䇁হend;ǂǂߑ᭄ⱘߑ᭄ԧ⬅begin੠endП䯈ⱘ㢹ᑆᴵ䇁হ㒘៤ˈ⫼Ѣᅲ⦄䖭Ͼߑ᭄ᠻ㸠ⱘࡼ԰DŽ"ߑ᭄ৡ"ᖙ乏੠ໄᯢᯊⱘߑ᭄Ⳍৠˈ"ᔶখ"ᑨϢໄᯢᯊⱘᔶখ㉏ൟϔϔᇍᑨˈԚ"ᔶখৡ"ৃҹӏᛣⱘ᳝ᬜInstallScriptᷛ䆚ヺDŽབᵰ䳔㽕೼ߑ᭄ЁՓ⫼݊Ҫব䞣ˈ߭䖭ѯব䞣ᑨ೼beginࠡ䖯㸠ᅮНDŽ[՟Ex_MyFunc]Փ⫼㞾ᅮНߑ᭄SetupScreenprototypeSetupScreen(NUMBER);//ໄᯢϔϾߑ᭄ˈা᳝ϔϾᔶখprogramSetupScreen(WHITE);//㞾ᅮНߑ᭄೼⿟ᑣԧЁⱘ䇗⫼endprogramfunctionSetupScreen(nColor)//ߑ᭄ⱘᅮНˈ⊼ᛣnColorϢNUMBERᰃϔϔᇍᑨⱘnumbernDx,nDy;//ߑ᭄ݙ䚼ব䞣ⱘᅮНbegin35 InstallShieldㅔᯢՓ⫼ᬭ⿟GetExtents(nDx,nDy);Enable(FULLWINDOWMODE);Enable(INDVFILESTATUS);Enable(BITMAP256COLORS);Enable(DIALOGCACHE);SetTitle("Installing",24,nColor);SetColor(BACKGROUND,BK_BLUE);SetColor(STATUSBAR,BLUE);SetTitle("Setup",0,BACKGROUNDCAPTION);Enable(BACKGROUND);Delay(1);end;ǂǂǂ੠C䇁㿔ϔḋˈϡܕ䆌೼ϔϾߑ᭄ԧЁݡᅮНߑ᭄DŽ(3)ߑ᭄ⱘ䇗⫼ǂǂߑ᭄䇗⫼ⱘϔ㠀ᔶᓣЎ˖ǂǂǂߑ᭄ৡ(ᅲ䰙খ᭄㸼);ǂǂ᠔䇧"ᅲ䰙খ᭄"(ㅔ⿄"ᅲখ")ˈᅗϢ"ᔶখ"Ⳍᇍᑨˈᰃᅲ䰙䇗⫼ߑ᭄ᯊ᠔㒭ᅮⱘᐌ䞣ǃব䞣៪㸼䖒ᓣˈϨᖙ乏᳝⹂ᅮⱘؐDŽ䳔㽕⊼ᛣⱘᰃ˖ᅲখϢᔶখⱘϾ᭄ᑨⳌㄝˈ㉏ൟᑨϔ㟈ˈϨᣝ乎ᑣᇍᑨˈϔϔӴ䗦᭄᥂DŽInstallScriptЁˈ䇗⫼ϔϾߑ᭄ⱘᮍᓣৃҹ᳝ᕜ໮ˈ՟བ˖RectangleArea(nLong,nWide);//԰ЎϔϾ䇁হˈϡՓ⫼䖨ಲؐˈা㽕∖ߑ᭄ᅠ៤ϔᅮⱘ᪡԰nArea=RectangleArea(nLong,nWide);//ᇚߑ᭄ⱘ䖨ಲؐ䌟ќϔϾব䞣nTotal=RectangleArea(nLong1,nWide1)+RectangleArea(nLong2,nWide2);//ᇚߑ᭄ⱘ䖨ಲؐখϢ䖤ㅫ2.5.3BYREFখ᭄੠ߑ᭄ⱘ䖨ಲؐǂǂ೼InstallScriptⱘ໻໮᭄ߑ᭄Ёˈߑ᭄ⱘখ᭄Ӵ䗦ᮍᓣᰃ"ᣝؐӴ䗦"ⱘDŽ᠔䇧"ᣝؐӴ䗦"ˈᰃᣛᔧϔϾߑ᭄㹿䇗⫼ᯊˈ㋏㒳ḍ᥂ᅲখ੠ᔶখⱘᇍᑨ݇㋏ᇚᅲ䰙খ᭄ⱘؐϔϔӴ䗦㒭ᔶখˈկߑ᭄ᠻ㸠ᯊՓ⫼DŽߑ᭄ᴀ䑿ϡᇍᅲখ䖯㸠᪡԰ˈгህᰃ䇈ˈेՓᔶখⱘؐ೼ߑ᭄Ёথ⫳њব࣪ˈᅲখⱘؐгϡӮফࠄᕅડDŽ36 InstallShieldㅔᯢՓ⫼ᬭ⿟ᔧ✊ˈ⬅Ѣᶤ⾡ॳ಴ˈ⫼᠋᳝ᯊᛇ㽕䅽ᔶখⱘᬍবᕅડᅲখˈ䖭䞠ህ䳔㽕Փ⫼BYREF(ᓩ⫼)݇䬂ᄫDŽ᠔䇧"ᓩ⫼"ˈㅔऩഄ䇈ˈᅗᅲ䰙Ϟᰃ㒭ϔϾᏆⶹব䞣䍋Ͼ߿ৡˈᇍᓩ⫼ⱘ᪡԰гህᰃᇍ㹿ᅗᓩ⫼ⱘব䞣ⱘ᪡԰DŽϔϾߑ᭄㛑Փ⫼ᓩ⫼Ӵ䗦ⱘᮍᓣᰃ೼ߑ᭄ໄᯢᯊᇚᔶখ㉏ൟࠡࡴϞᓩ⫼݇䬂ᄫ"BYREF"DŽ՟བ˖prototypeStrInvert(BYREFSTRING);ǂǂ㢹ᔶখ߫㸼ЁϡℶϔϾᔶখᅮН៤ᓩ⫼ᔶᓣˈ߭ᖙ乏೼↣Ͼᓩ⫼ᔶখ㉏ൟࠡࡴϞᓩ⫼݇䬂ᄫ"BYREF"DŽ՟བ˖prototypeStrChangeChar(BYREFSTRING,CHAR,BYREFBOOL);//⊼ᛣˈ㄀ѠϾᔶখ≵᳝㹿ব៤ᓩ⫼ᔶᓣDŽǂǂϟ䴶ᴹⳟⳟߑ᭄খ᭄ⱘᓩ⫼Ӵ䗦ⱘ⼎՟DŽ[՟Ex_ByRef]ߑ᭄খ᭄ⱘᓩ⫼Ӵ䗦DŽprototypeSwapString(BYREFSTRING,BYREFSTRING);STRINGmyStr1,myStr2;programmyStr1="䖭ᰃ㄀ϔϾᄫヺІ";myStr2="䖭ᰃ㄀ѠϾᄫヺІ";MessageBox(myStr1,INFORMATION);//㒧ᵰᰒ⼎"䖭ᰃ㄀ϔϾᄫヺІ"SwapString(myStr1,myStr2);MessageBox(myStr1,INFORMATION);//㒧ᵰᰒ⼎"䖭ᰃ㄀ѠϾᄫヺІ"endprogramfunctionSwapString(svString1,svString2)STRINGsTemp;beginsTemp=svString1;svString1=svString2;svString2=sTemp;end;ǂǂᅲ䰙Ϟˈབᵰ⫼᠋䳔㽕ߑ᭄ᬍবⱘ᭄ؐϾ᭄া᳝ϔϾⱘ䆱ˈ䙷МՓ⫼ߑ᭄ⱘ䖨ಲؐህᰒᕫ䴲ᐌ䱣ᛣDŽ՟བ˖functionRectangleArea(nLength,nWidth)INTnVal;begin37 InstallShieldㅔᯢՓ⫼ᬭ⿟nVal=nLength*nWidth;returnnVal;end;ǂǂ݊Ёˈ݇䬂ᄫreturn䋳䋷ᇚৢ䴶ⱘؐ԰Ўߑ᭄ⱘ䖨ಲؐˈᑊᇚ⌕⿟䖨ಲࠄ䇗⫼ℸߑ᭄ⱘԡ㕂໘DŽ⬅Ѣreturnⱘৢ䴶ৃҹᰃᐌ䞣ǃব䞣៪ӏԩড়⊩ⱘ㸼䖒ᓣˈ಴ℸߑ᭄RectangleAreaৃҹᬍ៤ϟ߫ᔶᓣ˖functionRectangleArea(nLength,nWidth)beginreturnnLength*nWidth;end;ǂǂ䳔㽕⊼ᛣⱘᰃˈϔᮺᠻ㸠return䇁হৢˈ೼ߑ᭄ԧݙreturnৢ䴶ⱘ䇁হϡݡ㹿ᠻ㸠DŽ2.5.4ሔ䚼ব䞣੠ܼሔব䞣InstallScriptЁ↣ϔϾব䞣ᖙ乏ܜᅮНৢՓ⫼ˈ㢹ব䞣ᰃ೼ߑ᭄ᅮНᯊߑ᭄ৡ੠beginП䯈ᅮНⱘব䞣ˈ߭ℸব䞣ህᰃϔϾሔ䚼ব䞣ˈᅗা㛑೼ߑ᭄ԧݙՓ⫼ˈ㗠೼ߑ᭄ԧ໪߭ϡ㛑Փ⫼ᅗDŽ㢹ব䞣ᰃ೼Џ⿟ᑣԧprogramࠡᅮНˈ߭䆹ব䞣ህᰃϔϾܼ䚼ব䞣ˈᅗ㛑㹿ৢ䴶ⱘ᠔᳝ߑ᭄៪䇁হᓩ⫼DŽǂǂ೼ϔϾ⿟ᑣЁˈϡ㛑᳝ϸϾৠৡⱘܼሔব䞣ˈԚሔ䚼ব䞣೼݊԰⫼㣗ೈ໪ৃҹৠৡˈ⫮㟇ৃҹ੠ܼሔব䞣ৠৡDŽ[՟Ex_Variable]ߑ᭄ⱘሔ䚼ব䞣DŽSTRINGszVal;//ᅮНⱘܼሔব䞣prototypeAFunction();programszVal="YES";//㒭ܼሔব䞣䌟ؐˈ㒧ᵰЎ"YES"AFunction();MessageBox(szVal,INFORMATION);//szVal㒧ᵰҡЎ"YES"endprogramfunctionAFunction()STRINGszVal;//ߑ᭄ݙ䚼ⱘሔ䚼ব䞣ˈ੠ܼሔব䞣ৠৡbeginszVal="NO";//㒭ሔ䚼ব䞣䌟ؐˈ㒧ᵰЎ"NO"end;ǂǂ೼InstallScriptЁˈߑ᭄ⱘᔶখব䞣㹿䅸Ўᰃሔ䚼ব䞣DŽ38 InstallShieldㅔᯢՓ⫼ᬭ⿟2.5.5Փ⫼DLLߑ᭄ǂǂߎѢᇍInstallShieldߑ᭄ࡳ㛑ⱘᠽሩˈInstallShieldϧϮ⠜䖬ܕ䆌⫼᠋Փ⫼໪䚼DLLЁⱘߑ᭄ˈ݊Փ⫼ℹ偸བϟ˖(1)佪ܜՓ⫼ϟ߫ᔶᓣ೼Џ⿟ᑣԧprogramࠡໄᯢ᠔㽕Փ⫼ⱘDLLߑ᭄˖prototype.<ߑ᭄ৡ>(ᔶখ㉏ൟ߫㸼);(2)✊ৢˈՓ⫼UseDLLߑ᭄ᇚDLL᭛ӊ䇗ܹݙᄬ˗(3)᥹ⴔˈ⫼ϟ߫ᔶᓣ䇗⫼Ꮖໄᯢ䖛ⱘDLLߑ᭄˗ǂǂǂǂߑ᭄ৡ(ᅲখ);(4)᳔ৢˈՓ⫼UnUseDLLᇚDLL᭛ӊҢݙᄬЁ䞞ᬒߎᴹDŽ[՟Ex_DLL]Փ⫼DLLߑ᭄DŽ#defineDLL_FILE"C:\EXAMPLE\DLLS\MSVC\MSC\EXAMPLE\WINDEBUG\MYDLL.DLL"//ໄᯢ೼MYDLL.DLL᭛ӊЁⱘMydllReturnߑ᭄prototypeMYDLL.MydllReturn(INT,POINTER);STRINGszDLL,svString;INTnValue;POINTERpsvString;NUMBERnResult;BOOLbDone;programszDLL=DLL_FILE;/*--------------------------------------------------------------------------**ᇚMYDLL.DLL᭛ӊ䇗ܹݙᄬDŽ*--------------------------------------------------------------------------*/nResult=UseDLL(szDLL);if(nResult=0)thenMessageBox("UseDLLsuccessful .DLLfileloaded.",INFORMATION);elseMessageBox("UseDLLfailed. Couldn’tload.DLLfile.",INFORMATION);39 InstallShieldㅔᯢՓ⫼ᬭ⿟abort;endif;bDone=FALSE;while(bDone!=TRUE)Disable(BACKBUTTON);AskText("Enteranexamplestring.","Examplestring.",svString);psvString=&svString;nValue=StrLength(svString);//䇗⫼DLLߑ᭄MydllReturn(nValue,psvString);SprintfBox(INFORMATION,"UseDLL","MydllReturn()changedthestring"+"to:%s",svString);//⬅⫼᠋᥻ࠊwhileᕾ⦃ⱘ㒜ℶif(AskYesNo("Doanotherexample?",YES)=NO)thenbDone=TRUE;endif;endwhile;/*--------------------------------------------------------------------------**ᇚMYDLL.DLL᭛ӊҢݙᄬЁ䞞ᬒߎᴹDŽ*--------------------------------------------------------------------------*/if(UnUseDLL(szDLL)<0)thenMessageBox("UnUseDLLfailed. DLLstillinmemory.",SEVERE);elseMessageBox("UnUseDLLsuccessful. .DLLfileremovedfrommemory.",INFORMATION);endif;endprogram40 InstallShieldㅔᯢՓ⫼ᬭ⿟2.6ᄫヺІ᪡԰ǂǂৠC䇁㿔ϔḋˈInstallScriptг᳝䆌໮ᄫヺІ᪡԰ⱘ䖤ㅫヺঞ݊ݙ䚼ߑ᭄DŽ2.6.1ᄫヺ੠ᄫヺІǂǂ㱑✊InstallScriptᬃᣕ᭄㒘㉏ൟˈԚᅗাᬃᣕϔ㓈᭄㒘DŽϨ䖭䞠ⱘᄫヺ᭄㒘੠ᄫヺІⱘὖᗉᕜϡϔḋDŽ՟བ˖CHARstr[10];programstr="ABCDE";//ѻ⫳㓪䆥䫭䇃endprogramǂǂԚᰃˈSTRING㉏ൟⱘᄫヺІὖᗉϢC䇁㿔ϔḋDŽᅗᰃϔϾҹ˃˃Ў㒜ℶヺⱘϔ㓈ᄫヺ᭄㒘ˈՓ⫼᭄㒘ϟᷛৃҹ㦋ᕫⳌᑨⱘᄫヺDŽ՟བ˖[՟Ex_String]Փ⫼ᄫヺІDŽprototypeBlankLeadingZeros(BYREFSTRING);STRINGszString;programszString="00001234";BlankLeadingZeros(szString);MessageBox(szString,INFORMATION);endprogramfunctionBlankLeadingZeros(szString)//ᇚᄫヺІⱘࠡᇐᄫヺ˃0˃বЎぎḐDŽINTiVal,iLength;beginiVal=0;//ᄫヺ᭄㒘ⱘϟᷛҢ0ᓔྟiLength=StrLength(szString);while(szString[iVal]="0")&&(iVal<=iLength)szString[iVal]="";iVal=iVal+1;endwhile;end;㒧ᵰᰃᇚ"00001234"ᄫヺІবЎ"1234"2.6.2ᄫヺІⱘ䖤ㅫヺǂǂ೼InstallScript㛮ᴀ⿟ᑣЁˈ⫼᠋ᠧѸ䘧᳔໮ⱘᰃᄫヺІⱘ᪡԰DŽЎℸˈInstallScriptᦤկњϟ߫ⱘᄫヺІ䖤ㅫヺ˖41 InstallShieldㅔᯢՓ⫼ᬭ⿟^(೼ϔϾ䏃ᕘ៪᭛ӊৡৢ⏏ࡴ঺ϔϾ䏃ᕘ)+(೼ϔϾᄫヺІৢ⏏ࡴ঺ϔϾᄫヺІ)%(೼ϔϾᄫヺІЁᶹᡒϔϾᄤІ)ǂǂ՟བ˖szStringVar="C:\MYPATH\"^"YOURPATH\FILENAME";ǂǂⱘ㒧ᵰЎ"C:MYPATHYOURPATHFILENAME"ǂǂԚᰃˈབᵰ⫼᠋ᖬ䆄೼C:\MYPATHৢࡴϞড᭰ᴴˈे˖szStringVar="C:\MYPATH"^"YOURPATH\FILENAME";ǂǂ݊㒧ᵰҡ✊ᰃϞ䗄㒧ᵰDŽ಴ЎInstallScriptⱘ"^"䖤ㅫヺ㞾ࡼ⏏ࡴⳌᑨⱘড᭰ᴴDŽǂǂ⫼ᄫヺІⱘ"+"ৃҹᇚϞ䗄㸼䖒ᓣᬍЎϟ߫ᔶᓣ˖szStringVar="C:\MYPATH\"+"YOURPATH\FILENAME";ǂǂԚᰃˈ೼Փ⫼ᄫヺІ䖤ㅫヺЁˈϡ㛑೼䖤ㅫヺⱘϸ䖍Փ⫼೚ᣀো"()"DŽ՟བˈϟ䴶ⱘ㸼䖒ᓣᰃ䫭䇃ⱘ˖szPath=szTestPath^(AUTOFILE+".BAT");ǂǂ㗠ᑨ䆹⫼ϟ߫ᔶᓣ˖szFile=AUTOFILE+".BAT";szPath=szTestPath^szFile;ǂǂ䳔㽕⡍߿⊼ᛣⱘᰃˈᄫヺІ䖤ㅫヺ"%"ᰃ೼ϔϾᄫヺІЁᶹᡒϔϾᄤІˈ㗠ϡᰃC䇁㿔ⱘ∖ԭ䖤ㅫヺDŽ՟བ˖szStringVarA="Thisisasamplestring.";if(szStringVarA%"sample")thenMessageBox("Operationcomplete",INFORMATION);42 InstallShieldㅔᯢՓ⫼ᬭ⿟endif;ǂǂ݊㒧ᵰᰃMessageBox㹿ᠻ㸠DŽ㢹೼ᶹᡒᯊϡ㽕∖໻ᇣݭᬣᛳˈ߭Ϟ䗄ҷⷕৃᬍЎ˖szStringVarA="Thisisasamplestring.";if(szStringVarA%"SAMPLE")thenMessageBox("Operationcomplete",INFORMATION);endif;ǂǂ䳔㽕䇈ᯢⱘᰃˈᄫヺІ䖤ㅫヺ%Ϣݙ䚼ߑ᭄StrFindⳌԐˈԚStrFind䖬䖨ಲ㹿ᶹᡒⱘᄫヺІ佪ᄫヺ೼ᄫヺІЁⱘԡ㕂DŽ2.6.3ᄫヺІ੠᭄ؐ䕀ᤶǂǂՓ⫼InstallShieldⱘݙ䚼ߑ᭄ৃҹᕜᆍᯧഄᅲ⦄ᄫヺІ੠᭄ؐП䯈ⱘ䕀ᤶDŽ1.StrToNumߑ᭄StrToNumߑ᭄ᰃᇚᄫヺІ䕀ᤶ៤᭄ؐDŽߑ᭄ॳൟབϟ˖StrToNum(nvVar,szString);ǂǂ݊ЁˈnvVarᰃ䕀ᤶৢ䖨ಲⱘNUMBER᭄ؐˈ㗠szString⫼ᴹᣛᅮ⑤ᄫヺІDŽᔧ䕀ᤶ៤ࡳৢˈߑ᭄䖨ಲ0ˈ৺߭䖨ಲ䋳ؐDŽ䳔㽕䇈ᯢⱘᰃˈ೼ᇚᄫヺІ䕀ᤶ៤᭄ؐ䖛⿟Ёˈৃ㛑᳝ϟ߫޴⾡ᚙމ˖(1)㢹ᄫヺІЁⱘᄫヺ䛑ᰃ⬅"0"~"9"㒘៤ⱘˈ߭ᇚ݊䕀ᤶ៤Ⳍᑨⱘ᭄ؐDŽ(2)㢹ᄫヺІࠡ䴶ⱘϔϾ៪໮Ͼᄫヺ⬅"0"~"9"㒘៤ˈ߭া䕀ᤶ݊ࠡ䴶ⱘᄫヺDŽ՟བ"-123ABC456"㹿䕀ᤶ៤-123(3)㢹ᄫヺІ㄀ϔϾᄫヺϡᰃ"0"~"9"៪ϡᰃℷ䋳োˈ߭ϡ㛑䕀ᤶDŽ(4)㢹ᄫヺІ㄀ϔϾᄫヺᰃℷ䋳োˈ㗠㄀ѠϾᄫヺϡᰃ"0"~"9"ˈ߭ϡ㛑䕀ᤶDŽ43 InstallShieldㅔᯢՓ⫼ᬭ⿟2.NumToStrߑ᭄ǂǂǂϢStrToNumⳌᇍᑨⱘNumToStrߑ᭄ᰃᇚ᭄ؐ䕀ᤶ៤ᄫヺІˈ݊ߑ᭄ॳൟབϟ˖NumToStr(svString,nValue);ǂǂǂ݊ЁˈsvStringᰃ䕀ᤶৢ䖨ಲⱘᄫヺІˈ㗠nValue⫼ᴹᣛᅮ㽕䕀ᤶⱘNUMBER᭄ؐDŽ[՟Ex_NumToStr]ᇚ᭄ؐ䕀ᤶ៤ᄫヺІDŽ#defineDISK_DRIVE"C:\"STRINGszDrive,svString;NUMBERnSpace,nResult;programszDrive=DISK_DRIVE;nSpace=GetDiskSpace(szDrive);nResult=NumToStr(svString,nSpace);if(nResult<0)thenMessageBox("NumToStrfailed.",SEVERE);abort;endif;SprintfBox(INFORMATION,"NumToStr","DiskSpace:%s",svString);endprogram3.Sprintfߑ᭄Sprintfߑ᭄ᰃᇚᄫヺǃᄫヺІǃ᭄ؐᣝϔᅮⱘḐᓣ䕀ᤶ៤঺໪ϔϾᄫヺІˈᅗ੠MFCⱘCString㉏ЁⱘFormatߑ᭄ᵕЎⳌԐDŽSprintfߑ᭄ॳൟབϟ˖Sprintf(svResult,szFormat[,arg][,...]);ǂǂ݊ЁˈsvResultᰃ䖨ಲⱘᄫヺІˈszFormat⫼ᴹᣛᅮḐᓣ᥻ࠊⱘᄫヺІˈargᰃব䞣៪ᐌ䞣߫44 InstallShieldㅔᯢՓ⫼ᬭ⿟㸼ˈᅗⱘϾ᭄ϡ㛑䍙䖛10ϾDŽߑ᭄៤ࡳ䇗⫼ৢˈ䖨ಲᕫࠄⱘᄫヺІ䭓ᑺDŽǂǂ䳔㽕䇈ᯢⱘᰃˈszFormatᄫヺІ᠔ࣙ৿ⱘḐᓣᄫヺᖙ乏⫼ⱒߚো"%"ᴹᓩᇐˈ⬅ѢᅗⱘḐᓣϢFormatߑ᭄៪Cⱘprintfㄝߑ᭄ⱘ৿НⳌৠˈᬙ䖭䞠ϡݡ䞡໡DŽ՟བ˖Sprintf(svResult,"%s:%d*%d","ሣᐩߚ䕼⥛Ў",640,480);ǂǂ߭svResultⱘؐЎ˖¯ሣᐩߚ䕼⥛Ў˖640*480”2.6.4ᄫヺІ᪡԰ߑ᭄ǂǂ੠C䇁㿔ϔḋˈInstallShieldгᦤկњ䆌໮ᄫヺІߑ᭄ˈབ㸼2.3᠔⼎DŽ45 InstallShieldㅔᯢՓ⫼ᬭ⿟2.7㒧ᵘԧ㉏ൟ੠ᣛ䩜ǂǂ㟇ℸˈ៥Ӏ᠔Փ⫼ⱘ᭄᥂㉏ൟ䛑ᰃ෎ᴀⱘ㉏ൟˈབINTǃNUMBERǃSTRINGㄝDŽԚInstallScript䖬ܕ䆌⫼᠋ᣝϔᅮⱘ㾘߭䖯㸠᭄᥂㒧ᵘԧ㉏ൟⱘᵘ䗴DŽৠᯊᦤկᣛ䩜ⱘὖᗉˈᮍ⫼᠋ᇍব䞣ⱘഄഔ䖯㸠᪡԰DŽ2.7.1⫼⫼⫼typedefᅮНϔϾ㒧ᵘԧϔϾ㒧ᵘԧᰃ⬅໮⾡㉏ൟⱘ᭄᥂㒘៤ⱘᭈԧDŽ㒘៤㒧ᵘⱘ৘Ͼߚ䞣⿄Ў㒧ᵘԧⱘ᭄᥂៤ਬ(ㅔ⿄Ў៤ਬ)DŽ㒧ᵘԧᰃInstallScriptᦤկⱘᵘ䗴໡ᴖ᭄᥂㉏ൟⱘଃϔ᠟↉DŽ1.ᅮН㒧ᵘԧ㒧ᵘԧᅮНⱘḐᓣЎ˖typedef㒧ᵘԧৡbeginǂǂǂǂǂǂǂ៤ਬᅮН1˗ǂǂǂǂǂǂǂ៤ਬᅮН2˗...ǂǂǂǂǂǂǂ៤ਬᅮНn˗end;㒧ᵘԧᅮНᰃҹ݇䬂ᄫtypedefᓔྟⱘˈ㒧ᵘԧৡᑨᰃϔϾ᳝ᬜড়⊩ⱘᷛ䆚ヺDŽ೼㒧ᵘԧЁⱘ↣Ͼ៤ਬ䛑ᖙ乏䗮䖛"៤ਬᅮН"ᴹ⹂ᅮ៤ਬৡঞ݊㉏ൟDŽ՟བ˖typedefEMPLOYEEbeginSTRINGszName[50];//ྦྷৡSTRINGszDepartment[50];//䚼䮼NUMBERnExtension;//⬉䆱ߚᴎোⷕend;ǂǂ݊ЁˈEMPLOYEEᰃ㞾ᏅᅮНⱘ㒧ᵘԧৡˈ䆹㒧ᵘ᳝3Ͼ៤ਬব䞣DŽϔᮺ㒧ᵘԧ㉏ൟᅮНৢˈህৃҹᅮН݊㒧ᵘԧব䞣DŽ՟བ˖EMPLOYEEstructEmployee;ǂǂՓ⫼㒧ᵘԧ㉏ൟᯊ㽕⊼ᛣ˖(1)ϡ㛑⫼䌟ؐ䖤ㅫヺᇚϔϾ㒧ᵘݙᆍ䌟ќ঺ϔϾ㒧ᵘˈབnewstruct=struct1˗46 InstallShieldㅔᯢՓ⫼ᬭ⿟(2)៤ਬব䞣㉏ൟ㢹ᰃSTRINGˈ߭ᖙ乏ᣛᅮ݊໻ᇣ˗(3)ϡ㛑೼ߑ᭄ԧݙ䚼ᅮНϔϾ㒧ᵘԧ㉏ൟ˗(4)៤ਬব䞣㉏ൟ៪㒧ᵘԧᴀ䑿ϡ㛑Փ⫼BYREF݇䬂ᄫˈ᭄᥂ⱘӴ䗦⫼ᣛ䩜ᴹ䖯㸠DŽ2.㒧ᵘԧব䞣ⱘᓩ⫼ǂǂᔧϔϾ㒧ᵘԧব䞣ᅮНПৢˈህৃᓩ⫼䖭Ͼব䞣DŽՓ⫼ᯊˈ䙉ᕾϟ߫㾘߭˖(1)া㛑ᓩ⫼㒧ᵘԧব䞣Ёⱘ៤ਬব䞣ˈᑊՓ⫼ϟ߫Ḑᓣ˖ǂǂǂǂ㒧ᵘԧব䞣ৡ.៤ਬব䞣ৡ՟བ˖structEmployee.nExtension=3057;"."ᰃ៤ਬ䖤ㅫヺˈᅗⱘӬܜ㑻ᰃ᳔催ⱘˈ಴㗠ৃҹᡞstructEmployee.nExtension԰ЎϔϾᭈԧᴹⳟᕙˈᅗৃҹڣ᱂䗮ব䞣䙷ḋ䖯㸠䌟ؐ៪৘⾡䖤ㅫDŽ(2)㢹៤ਬᴀ䑿জᰃϔϾ㒧ᵘԧব䞣ˈᓩ⫼ᯊ䳔㽕໮Ͼ៤ਬ䖤ㅫヺϔ㑻ϔ㑻ഄᡒࠄ᳔Ԣϔ㑻ⱘ៤ਬDŽ՟བ˖typedefPOINTbeginSHORTnX;SHORTnY;end;typedefRECTbeginPOINTptUpperLeft;POINTptLowerRight;end;RECTrc;᳝߭˖rc.ptUpperLeft.nX=0;2.7.2ᣛ䩜བᵰ೼⿟ᑣЁᅮНњϔϾব䞣ˈ೼㓪䆥ᯊ㋏㒳ህӮ㒭䖭Ͼব䞣ߚ䜡ݙᄬऩܗˈᑊḍ᥂⿟ᑣЁᅮНⱘব䞣㉏ൟˈߚ䜡ϔᅮ䭓ᑺⱘݙᄬぎ䯈ˈ↣ϾݙᄬऩܗЁᄬᬒⴔব䞣ⱘؐDŽЎњѢݙᄬऩܗⱘᄬপˈ㋏㒳Ў↣ϔϾݙᄬऩܗߚ䜡ϔϾഄഔDŽ䖭Ͼ"ഄഔ"⿄Ў"ᣛ䩜"1.ᅮН੠ᓩ⫼ᣛ䩜ব䞣ǂǂᣛ䩜ব䞣(pointer)ᰃᄬᬒݙᄬഄഔⱘব䞣ˈϔ㠀ᚙމϟ䆹ഄഔᰃ঺ϔϾব䞣ᄬټ೼ݙᄬЁⱘ佪ഄഔˈ䖭ᯊজ⿄䆹ᣛ䩜ব䞣"ᣛ৥"䖭Ͼব䞣DŽ՟བ˖47 InstallShieldㅔᯢՓ⫼ᬭ⿟INTi;POINTERp;...i=5;p=&i;ǂǂ݊ЁˈiᰃϔϾؐЎ5ⱘᭈൟব䞣ˈpᰃϔϾᣛ䩜ব䞣ˈ&iᰃপব䞣i೼ݙᄬЁⱘഄഔ˗Ѣᰃpⱘ᭄ؐህㄝѢব䞣i೼ݙᄬЁⱘഄഔؐˈ಴ℸpᰃϔϾᣛ৥ব䞣iⱘᣛ䩜DŽǂǂ䳔㽕⊼ᛣⱘᰃ˖ϔᮺϔϾব䞣ᅮНৢˈ䆹ব䞣೼ݙᄬЁⱘഄഔгህ⹂ᅮϟᴹˈϡㅵҹৢᇍ䆹ব䞣བԩ䌟ؐˈ೼⿟ᑣ䖤㸠ᳳ䯈ˈ݊ݙᄬഄഔᘏᰃ೎ᅮϡবⱘDŽǂǂᣛ䩜ব䞣੠᠔᳝ব䞣ϔḋˈ䙉ᕾܜᅮНৢՓ⫼ⱘॳ߭DŽInstallScriptЁᅮНϔϾᣛ䩜ব䞣ᰃ೼ব䞣ৡࠡࡴϞ݇䬂ᄫPOINTERˈ㢹ᰃ㒧ᵘԧ㉏ൟˈ߭ᣝϟ߫Ḑᓣ˖ǂǂǂ㒧ᵘԧ㉏ൟৡPOINTERᣛ䩜ব䞣ৡ1ˈ[ᣛ䩜ব䞣ৡ2,...];՟བ˖EMPLOYEEPOINTERpPointerName˗ǂǂ䖭ᯊˈ㒧ᵘԧ៤ਬব䞣ⱘᓩ⫼ህৃҹڣϟ߫ᔶᓣ˖pPointerName->nExtension=3057;⿟ᑣЁˈ"->"⿄Ўᣛ৥䖤ㅫヺˈᅗⱘᎺ䖍ᖙ乏ᰃϔϾᣛ䩜ব䞣ˈᅗㄝᬜѢᣛ䩜ব䞣᠔ᣛ৥ⱘ㒧ᵘԧ㉏ൟব䞣DŽǂǂ೼ᅮНϔϾᣛ䩜ৢˈ㋏㒳гӮ㒭ᣛ䩜ߚ䜡ϔϾݙᄬऩܗˈԚߚ䜡ⱘぎ䯈໻ᇣ䛑ᰃⳌৠⱘˈ಴Ўᣛ䩜ব䞣ⱘ᭄ؐᰃᶤϾব䞣ⱘഄഔˈ㗠ഄഔؐⱘ䭓ᑺᰃϔḋⱘDŽInstallScriptЁ᳝ϸϾϧ䮼⫼Ѣᣛ䩜ⱘ䖤ㅫヺ˖&(পഄഔ䖤ㅫヺ)ǃ*(পؐ䖤ㅫヺ)ǂǂ䖤ㅫヺ"&"া㛑ᇍব䞣᪡԰ˈ԰⫼ᰃপ䆹ব䞣ⱘഄഔ˗䖤ㅫヺ"*"⫼Ѣᣛ䩜㉏ൟⱘব䞣᪡԰ˈ԰⫼ᰃপ䆹ᣛ䩜᠔ᣛݙᄬऩܗЁᄬټⱘݙᆍDŽ՟བ˖EMPLOYEEMyStructure;POINTERpNum;STRINGsvString;...pPointerName=&MyStructure;//ᇚ㒧ᵘԧব䞣ഄഔ䌟ќ㒧ᵘԧᣛ䩜pNum=&nvNumber;//ᇚNUMBERব䞣ഄഔ䌟ќᣛ䩜ব䞣SprintfBox(INFORMATION,"","%d",*pNum);2.ߑ᭄ⱘᣛ䩜Ӵ䗦48 InstallShieldㅔᯢՓ⫼ᬭ⿟ǂǂᣛ䩜гৃ԰Ўߑ᭄ⱘᔶখ㉏ൟˈ䖭ḋⱘᔶখᬍবৢᇚᕅડᅲখⱘؐDŽ[՟Ex_Pointer]ߑ᭄ⱘᣛ䩜Ӵ䗦DŽtypedefRECT//ᅮНϔϾ㒧ᵘԧbeginSHORTsX;SHORTsY;end;RECTRectangle;//ᅮНϔϾ㒧ᵘԧব䞣RECTPOINTERpRect;//ᅮНϔϾ㒧ᵘԧᣛ䩜ব䞣prototypeSizeRectangle(RECTPOINTER);//ᇚߑ᭄ⱘᔶখᅮН៤ᣛ䩜programpRect=&Rectangle;SizeRectangle(pRect);//㒧ᵰRectangleⱘsX੠sYߚ߿Ў10੠5...endprogramfunctionSizeRectangle(pRectangle)beginpRectangle->sX=10;pRectangle->sY=5;end;2.8䫒䫒䫒㸼㸼㸼ǂǂӫ᠔਼ⶹˈ೼Փ⫼᭄㒘ᄬᬒ᭄᥂ࠡˈᖙ乏џܜᅮНད᭄㒘ⱘ䭓ᑺDŽ㗠ϨˈⳌ䚏ⱘ᭄㒘ܗ㋴ⱘԡ㕂੠䎱⾏䛑ᰃ೎ᅮⱘˈгህᰃ䇈ӏԩϔϾ᭄㒘ܗ㋴ⱘഄഔ䛑ৃҹ⫼ϔϾㅔऩⱘ݀ᓣ䅵ㅫߎᴹˈ಴ℸ䖭⾡㒧ᵘৃҹ᳝ᬜഄᇍ᭄㒘ܗ㋴䖯㸠䱣ᴎ䆓䯂DŽԚ᭄㒘ܗ㋴ⱘᦦܹ੠ߴ䰸Ӯᓩ䍋໻䞣᭄᥂ⱘ⿏ࡼˈҢ㗠Փㅔऩⱘ᭄᥂໘⧚বᕫ䴲ᐌ໡ᴖǃԢᬜDŽЎњ㛑᳝ᬜഄ㾷އ䖭ѯ䯂乬ˈϔ⾡⿄Ў"䫒㸼"ⱘ㒧ᵘ㉏ൟᕫࠄњᑓ⊯ⱘᑨ⫼DŽ2.8.1ὖ䗄ǂǂ䫒㸼ᰃϔ⾡ࡼᗕ᭄᥂㒧ᵘˈᅗⱘ⡍⚍ᰃ⫼ϔ㒘ӏᛣⱘᄬټऩܗ(ৃҹᰃ䖲㓁ⱘˈгৃҹᰃϡ䖲㓁ⱘ)ᄬᬒ᭄᥂ܗ㋴DŽ䫒㸼Ё↣ϔϾܗ㋴⿄Ў"㒧⚍"ˈ↣ϔϾ㒧⚍䛑ᰃ⬅᭄᥂ඳ੠ᣛ䩜ඳ㒘៤ⱘˈ↣Ͼ㒧⚍Ёⱘᣛ䩜ඳᣛ৥ϟϔϾ㒧⚍DŽǂǂᅲ䰙Ϟˈ䫒㸼Ёⱘ↣Ͼ㒧⚍ৃҹ᳝㢹ᑆϾ᭄᥂੠㢹ᑆϾᣛ䩜DŽ㒧⚍Ёা᳝ϔϾᣛ䩜ⱘ䫒㸼⿄ПЎऩ䫒㸼ˈᰃ᳔ㅔऩⱘ䫒㸼㒧ᵘDŽ49 InstallShieldㅔᯢՓ⫼ᬭ⿟ǂǂԚ೼InstallScriptЁˈՓ⫼ⱘᰃ੠C䇁㿔ⳌԐⱘऩ䫒㸼㒧ᵘˈᑊᇚᣛ䩜ඳⱘ᪡԰ব៤InstallScriptݙ䚼ⱘᎹ԰ᮍᓣˈ䖭Փᕫ⫼᠋া䳔䗮䖛Ⳍᑨⱘߑ᭄ህৃҹㅔऩഄ৥䫒㸼⏏ࡴᄫヺІ៪ᭈൟ᭄᥂DŽ䖭ѯߑ᭄བ㸼2.4᠔⼎DŽҢ㸼2.4ЁৃҹⳟߎˈInstallScriptⱘऩ䫒㸼㒧ᵘߚЎϸ⾡㉏ൟ˖ϔ㉏ᰃ⬅ᄫヺІ㒘៤ⱘ䫒㸼˗঺ϔ㉏ᰃ⬅ᭈൟ᭄᥂㒘៤ⱘ䫒㸼DŽInstallScript㾘ᅮ˖೼ৠϔϾ䫒㸼Ёˈ㒧⚍ⱘ᭄᥂ඳ㽕М⬅ᄫヺІ㒘៤ˈ㽕М⬅ᭈൟ᭄᥂㒘៤ˈ㗠ϡ㛑ৠᯊᄬ೼䖭ϸ⾡᭄᥂㉏ൟDŽ2.8.2ᓎゟ䫒㸼ǂǂ೼InstallScriptЁˈՓ⫼ListCreateߑ᭄ህৃҹᓎゟϔϾऩ䫒㸼DŽ䖭ϔ⚍㽕↨C䇁㿔ⱘ䫒㸼᪡԰ㅔऩ䆌໮DŽ՟བϟ䴶ⱘ⼎՟DŽ[՟Ex_CreateList]߯ᓎ䫒㸼DŽ50 InstallShieldㅔᯢՓ⫼ᬭ⿟LISTlistID;//ᅮНϔϾ䫒㸼ব䞣NUMBERnItem,nvItem;programlistID=ListCreate(NUMBERLIST);//߯ᓎ䫒㸼//Ẕᶹ䫒㸼ᰃ৺㹿៤ࡳ߯ᓎDŽif(listID=LIST_NULL)thenMessageBox("ϡ㛑߯ᓎ䫒㸼DŽ",SEVERE);abort;endif;//৥䫒㸼⏏ࡴ᭄᥂nItem=1078;ListAddItem(listID,nItem,AFTER);nItem=304;ListAddItem(listID,nItem,AFTER);//䖨ಲ䫒㸼ᔧࠡ㒧⚍ⱘ᭄᥂ˈ㒧ᵰЎ304ListCurrentItem(listID,nvItem);SprintfBox(INFORMATION,"ListCreate","Currentiteminlist:%d",nvItem);//䖨ಲ䫒㸼Ё㄀ϔϾ㒧⚍ⱘ᭄᥂ˈ㒧ᵰЎ1078ListGetFirstItem(listID,nvItem);SprintfBox(INFORMATION,"ListCreate","Firstiteminlist:%d",nvItem);ListDestroy(listID);//ߴ䰸䫒㸼ᑊᇚ䫒㸼ҢݙᄬЁ䞞ᬒߎᴹDŽendprogramǂ䳔㽕⊼ᛣⱘᰃˈᔧ䫒㸼Փ⫼ᅠПৢˈᖙ乏䇗⫼ListDestroyᴹߴ䰸䫒㸼ˈҹ䞞ᬒ㹿䫒㸼᠔ऴ⫼ⱘݙᄬぎ䯈DŽ2.8.3䫒㸼ܗ㋴ⱘ෎ᴀ᪡԰InstallScriptЁⱘListAddItemǃListDeleteItemǃListFindItemঞListSetCurrentItem៪ListAddStringǃListDeleteStringǃListFindStringঞListSetCurrentStringߑ᭄ߚ߿ᇍ䫒㸼ЁⱘᄫヺІ៪ᭈൟ᭄᥂ⱘ㒧⚍䖯㸠⏏ࡴǃߴ䰸ǃᶹᡒঞᬍㄝ᪡԰DŽ[՟Ex_AddAndSet]৥䫒㸼⏏ࡴ㒧⚍ᑊ䖯㸠ᬍDŽ#include"Sddialog.h"STRINGszTitle,szMsg;LISTlistID;NUMBERnItem;programlistID=ListCreate(NUMBERLIST);if(listID=LIST_NULL)thenMessageBox("Unabletocreatelist.",SEVERE);abort;endif;//⏏ࡴ㒧⚍᭄᥂51 InstallShieldㅔᯢՓ⫼ᬭ⿟nItem=1078;ListAddItem(listID,nItem,AFTER);nItem=1304;ListAddItem(listID,nItem,AFTER);szTitle="ListSetCurrentItemExample";szMsg="ElementsinlistID:";//ᰒ⼎䫒㸼ݙᆍSdShowInfoList(szTitle,szMsg,listID);nItem=305;/*--------------------------------------------------------------------------**ᇚᔧࠡ㒧⚍ⱘ᭄᥂⬅1304᳈ᬍ៤305*--------------------------------------------------------------------------*/if(ListSetCurrentItem(listID,nItem)<0)thenMessageBox("ListSetCurrentItemfailed.",SEVERE);endif;//ᰒ⼎ᬍৢⱘ䫒㸼ݙᆍSdShowInfoList(szTitle,szMsg,listID);//ߴ䰸䫒㸼ListDestroy(listID);endprogram#defineSD_SINGLE_DIALOGS1#defineSD_SHOWINFOLIST1#include"Sddialog.rul"ǂǂᔧ✊ˈ⫼᠋䖬ৃ䗮䖛ListGetFirstItem੠ListGetNextItemߑ᭄ᴹ䘡ग़䫒㸼ⱘ㒧⚍ݙᆍDŽ[՟Ex_SearchAll]䘡ग़䫒㸼ⱘ㒧⚍ݙᆍDŽSTRINGszTitle,szMsg;LISTlistID;NUMBERnItem,nvItem,nResult;program//߯ᓎϔϾᭈൟ᭄᥂䫒㸼ᑊ⏏ࡴϔѯ㒧⚍᭄᥂listID=ListCreate(NUMBERLIST);if(listID=LIST_NULL)thenMessageBox("Unabletocreatelist.",SEVERE);abort;endif;//⏏ࡴ㒧⚍᭄᥂nItem=1078;ListAddItem(listID,nItem,AFTER);nItem=304;ListAddItem(listID,nItem,AFTER);//ҹϟᰃ䫒㸼ⱘ䘡ग़䖛⿟nResult=ListGetFirstItem(listID,nvItem);52 InstallShieldㅔᯢՓ⫼ᬭ⿟while(nResult!=END_OF_LIST)szTitle="ListGetFirstItem&ListGetNextItem";//ᰒ⼎nvItem.SprintfBox(INFORMATION,szTitle,"%i",nvItem);nResult=ListGetNextItem(listID,nvItem);endwhile;//ߴ䰸䫒㸼ListDestroy(listID);endprogram53 InstallShieldㅔᯢՓ⫼ᬭ⿟2.9㓪䆥乘໘⧚InstallScript⿟ᑣⱘ⑤ҷⷕЁৃࣙ৿৘⾡㓪䆥ᣛҸˈ䖭ѯᣛҸ⿄Ў乘໘⧚ҸDŽ㱑✊ᅗӀᅲ䰙ϞϡᰃDŽInstallScript䇁㿔ⱘϔ䚼ߚˈԚैᠽሩњInstallScript⿟ᑣ䆒䅵ⱘ⦃๗DŽInstallScriptᦤկⱘ乘໘⧚ҸЏ㽕᳝ᅣᅮНҸǃ᭛ӊࣙ৿Ҹ੠ᴵӊ㓪䆥ҸDŽ䖭ѯҸ೼⿟ᑣЁ䛑ᰃҹ"#"ᴹᓩᇐˈ↣ϔᴵ乘໘⧚Ҹᖙ乏ऩ⣀ऴ⫼ϔ㸠DŽ⬅ѢᅗϡᰃInstallScriptⱘ䇁হˈ಴ℸϔ㠀೼㒧ሒ≵᳝ߚো"˗"2.9.1ᅣᅮНǂǂ೼ҹࠡⱘ⿟ᑣЁˈ᳒⫼#defineᅮН䖭ḋⱘϔϾヺোᐌ䞣˖#defineTITLE"䯂׭"ǂǂ݊Ёˈ#defineᰃᅣᅮНҸˈᅗⱘ԰⫼ᰃᇚᄫヺІ"䯂׭"⫼TITLEᴹҷ᳓˗TITLE⿄ЎᅣৡDŽݡབ˖#defineMAX_SIZE145ǂǂ䖭ḋˈᇚ᭄ؐ145⫼ᅣMAX_SIZEᴹҷ᳓DŽ䳔㽕⊼ᛣⱘᰃ˖(1)#defineǃMAX_SIZE੠145П䯈ϔᅮ㽕᳝ぎḐˈϨϔ㠀ᇚᅣৡᅮН៤໻ݭˈҹϢ᱂䗮ᷛ䆚ヺⳌऎ߿DŽ(2)ᅣ㹿ᅮНৢˈϔ㠀ϡ㛑ݡ䞡ᮄᅮНˈ㗠া᳝ᔧՓ⫼ϟ߫Ҹᠡৃҹ˖#undefᅣৡ(3)ϔϾᅮН䖛ⱘᅣৡৃҹ⫼ᴹᅮН݊ᅗᮄⱘᅣˈԚ㽕⊼ᛣ݊Ёⱘᣀোˈ՟བ˖#defineWIDTH80#defineLENGTH(WIDTH+10)ǂǂǂǂᅣLENGTHㄝӋѢ˖#defineLENGTH(80+10)ǂǂǂǂԚ݊Ёⱘᣀোϡ㛑ⳕ⬹ˈ಴Ўᔧvar=LENGTH*20;ǂǂǂ㢹ᅣLENGTHᅮНЁ᳝ᣀোˈ߭乘໘⧚ৢব៤˖var=(80+10)*20;ǂǂǂ㢹ᅣLENGTHᅮНЁ≵᳝ᣀোˈ߭乘໘⧚ৢব៤˖var=80+10*20;ǂǂǂᰒ✊ˈϸ㗙ⱘ㒧ᵰᰃϡϔḋⱘDŽ(4)InstallScriptⱘᅣᅮНϡ㛑ᏺখ᭄ˈҙ䰤ѢՓ⫼ㅔऩⱘᅣᅮНDŽ54 InstallShieldㅔᯢՓ⫼ᬭ⿟2.9.2"᭛ӊࣙ৿"໘⧚ǂǂ᠔䇧"᭛ӊࣙ৿"ᰃᣛᇚ঺ϔϾ⑤᭛ӊⱘݙᆍড়ᑊࠄ⑤⿟ᑣЁDŽInstallScript䇁㿔ᦤկњ#includeҸ⫼ᴹᅲ⦄᭛ӊࣙ৿ⱘ᪡԰ˈᅗⱘḐᓣབϟ˖#include"᭛ӊৡ"ǂǂ՟བ˖//ᇚ㋏㒳㔎ⳕ䏃ᕘЁⱘ᭛ӊࣙ৿䖯ᴹ#include"SUPPORT.RUL"//ࣙ৿ϔϾ৿᳝ব䞣៪㞾ᅮНߑ᭄ໄᯢⱘ᭛ӊ#include"DECLARE.RUL"//ҢLIBRARY᭛ӊ།Ёࣙ৿ϔϾ᭛ӊ#include"..LIBRARYWINSUB.H"#include"..LIBRARYSYSCHK.H"//ҢDIALOGS᭛ӊ།Ёࣙ৿ϔϾ᭛ӊ#include"..DIALOGSWELCOMEWELCOME.H"#include"..DIALOGSREGINSREGINS.H"#include"..DIALOGSICONSICONS.H""᭛ӊࣙ৿"Ҹᰃᕜ᳝⫼ⱘˈᅗৃҹ㡖ⳕ⿟ᑣ䆒䅵Ҏਬⱘ䞡໡ࢇࡼDŽԚ೼Փ⫼#includeҸ䳔㽕⊼ᛣ˖(1)ϔᴵ#includeҸা㛑ࣙ৿ϔϾ᭛ӊˈ㢹ᛇࣙ৿໮Ͼ᭛ӊ乏⫼໮ᴵ᭛ӊࣙ৿ҸDŽ(2)ࣙ৿ⱘ᭛ӊ᠔ᣛᯢⱘ䏃ᕘܼৡ(৿᭛ӊৡ)ϡ㛑䍞䖛260ϾᄫヺDŽ(3)ᔧ೼᭛ӊЁՓ⫼䏃ᕘᯊˈᑨ䆹⫼ऩড᭰ᴴ""ҷ᳓ঠড᭰ᴴ"\"(4)㢹᭛ӊЁϡᣛᯢ݋ԧⱘ䏃ᕘˈ߭㓪䆥఼ᇚ೼ᅝ㺙⿟ᑣ乍Ⳃ᭛ӊ།Ё៪InstallShieldⱘinclude᭛ӊ།ЁᶹᡒDŽ(5)ϡ㛑ᇚC䇁㿔ⱘ.H᭛ӊࣙ৿䖯ᴹˈ಴Ў㓪䆥఼ϡ㛑䆚߿C䇁㿔㒧ᵘDŽ2.9.3ᴵӊ㓪䆥ǂǂϔ㠀ᚙމϟˈ㛮ᴀ⑤⿟ᑣЁ᠔᳝ⱘ䇁হ䛑খࡴ㓪䆥ˈԚ᳝ᯊгᏠᳯḍ᥂ϔᅮⱘᴵӊএ㓪䆥㛮ᴀ⑤᭛ӊⱘϡৠ䚼ߚˈ䖭ህᰃ"ᴵӊ㓪䆥"DŽᴵӊ㓪䆥Փᕫৠϔ㛮ᴀ⑤⿟ᑣ೼ϡৠⱘ㓪䆥ᴵӊϟᕫࠄϡৠⱘⳂᷛҷⷕDŽInstallScriptᦤկⱘᴵӊ㓪䆥Ҹ᳝޴⾡ᐌ⫼ⱘᔶᓣˈ⦄ߚ߿ҟ㒡བϟ˖(1)㄀ϔ⾡ᔶᓣ#ifdefᷛ䆚ヺ1ǂǂǂǂ⿟ᑣ↉1[#ifndefᷛ䆚ヺ155 InstallShieldㅔᯢՓ⫼ᬭ⿟ǂǂǂǂ⿟ᑣ↉2]#endifǂǂ݊Ёˈ#ifdefǃ#ifndef੠#endif䛑ᰃ݇䬂ᄫˈ"⿟ᑣ↉"ᰃ⬅㢹ᑆᴵ乘໘⧚Ҹ៪䇁হ㒘៤ⱘDŽ䖭⾡ᔶᓣⱘ৿Нᰃ˖བᵰᷛ䆚ヺᏆ㹿#defineҸᅮН䖛ˈ߭㓪䆥"⿟ᑣ↉1"ˈབᵰᷛ䆚ヺ᳾㹿#defineҸᅮН䖛ˈ߭㓪䆥"⿟ᑣ↉2"(2)㄀Ѡ⾡ᔶᓣ#ifdefᷛ䆚ヺǂǂǂǂ⿟ᑣ↉1[#elseǂǂǂǂ⿟ᑣ↉2]#endifǂǂ䖭⾡ᔶᓣᰃ㄀ϔ⾡ᔶᓣⱘ᳓ҷˈᅗⱘ৿Нᰃ˖བᵰᷛ䆚ヺᏆ㹿#defineҸᅮН䖛ˈ߭㓪䆥"⿟ᑣ↉1"ˈ৺߭㓪䆥"⿟ᑣ↉2"(3)㄀ϝ⾡ᔶᓣ#ifndefᷛ䆚ヺǂǂǂǂ⿟ᑣ↉1[#elseǂǂǂǂ⿟ᑣ↉2]#endifǂǂ䖭Ϣࠡϔ⾡ᔶᓣⱘऎ߿ҙ೼Ѣˈབᵰᷛ䆚ヺ≵᳝㹿#defineҸᅮН䖛ˈ߭㓪䆥"⿟ᑣ↉1"ˈ৺߭ህ㓪䆥"⿟ᑣ↉2"(4)㄀ಯ⾡ᔶᓣ#if㸼䖒ᓣ1ǂǂǂǂǂ⿟ᑣ↉1[#elif㸼䖒ᓣ2ǂǂǂǂǂ⿟ᑣ↉2...][#elseǂǂǂǂǂ⿟ᑣ↉n]#endifǂǂ݊Ёˈ#ifǃ#elifǃ#else੠#endifᰃ݇䬂ᄫDŽᅗⱘ৿Нᰃˈབᵰ"㸼䖒ᓣ1"Ў"ⳳ"ህ㓪䆥"⿟ᑣ↉1"ˈ৺߭བᵰ"㸼䖒ᓣ2"Ў"ⳳ"ህ㓪䆥"⿟ᑣ↉2"ˈ...ˈབᵰ৘㸼䖒ᓣ䛑ϡЎ"ⳳ"ህ㓪䆥"⿟ᑣ↉n"ǂǂՓ⫼InstallScript乘໘⧚Ҹ䳔㽕⊼ᛣ˖(1)乘໘⧚Ҹা㛑ᬒ೼Џ⿟ᑣԧ໪䚼DŽ(2)೼#ifdefㄝ乘໘⧚Ҹⱘৠϔ㸠Ϟϡ㛑⏏ࡴ⊼䞞DŽ(3)೼#ifdefㄝ乘໘⧚ҸЁϡ㛑Փ⫼ڣifǃwhileঞswitchㄝ⌕᥻ࠊ䇁হDŽ(4)೼#ifdef៪#ifndef䇁হЁা㛑⌟䆩ᭈൟᐌ䞣DŽ56 InstallShieldㅔᯢՓ⫼ᬭ⿟(5)⫼᠋䖬ৃҹ#error乘໘⧚ҸᴹᅮН㞾Ꮕⱘ䫭䇃ᙃDŽ՟བ˖#definePRODUCTID1#if(PRODUCTID=1)#definePRODUCTNAME"Lite"#elif(PRODUCTID=2)#definePRODUCTNAME"Professional"#endif#ifndefPRODUCTNAME#errorPRODUCTIDoutofrange.#endifǂǂǂ㢹PRODUCTNAME≵᳝⫼#defineᅮН䖛ˈ߭⫼᠋ᅮНⱘ䫭䇃⍜ᙃ"3outofrange."㹿ᰒ⼎(㢹PRODUCTIDЎ3)57 InstallShieldㅔᯢՓ⫼ᬭ⿟2.10᭛ӊঞ᭛ӊ།᪡԰InstallShieldᦤկњ䆌໮ߑ᭄⫼ᴹᇍ᭛ӊ䖯㸠෎ᴀ᪡԰ҹঞᇍ᭛ӊ།䖯㸠߯ᓎǃߴ䰸੠ᶹᡒㄝ᪡԰DŽ2.10.1᭛ӊ෎ᴀ᪡԰ǂǂ᭛ӊ෎ᴀ᪡԰ࣙᣀ໡ࠊǃߴ䰸ǃᶹᡒǃ䞡ᮄৡҹঞ㦋প៪䆒㕂᭛ӊⱘሲᗻㄝDŽ(1)᭛ӊⱘ໡ࠊInstallShieldᦤկⱘCopyFileϢXCopyFileߑ᭄⫼ᴹ໡ࠊ᭛ӊⱘˈᅗӀⱘॳൟབϟ˖CopyFile(szSrcFile,szTargetFile);XCopyFile(szSrcFile,szTargetFile,nOp);ǂǂ䖭ϸϾߑ᭄䛑ᰃ⫼ᴹᇚ᭛ӊҢ⑤᭛ӊ།໡ࠊࠄⳂᷛ᭛ӊ།ЁDŽ㱑✊ˈCopyFileߑ᭄ϡڣXCopyFileৃҹ໡ࠊ⑤᭛ӊ།ϟ᠔᳝ⱘᄤ᭛ӊ།Ёⱘ᭛ӊˈԚᅗৃҹᇚ໡ࠊࠄⳂᷛ᭛ӊ།Ёⱘ᭛ӊ䞡ᮄৡDŽᰒ✊ˈXCopyFileߑ᭄ᇍ៤ᡍ໡ࠊ᭛ӊ䴲ᐌ᳝ᬜˈᑊৃḍ᥂⬅nOpᣛᅮⱘᮍᓣᴹ᪡԰DŽnOpৃҹᰃϟ߫ⱘ乘ᅮНؐ˖COMP_NORMALℷᐌᮍᓣˈ໡ࠊᯊ㽚ⲪⳌৠⱘ᭛ӊCOMP_UPDATE_SAMEᅗ੠COMP_UPDATE_DATE៪COMP_UPDATE_VERSION㒘ড়COMP_UPDATE_DATEা᳝ᔧ⑤᭛ӊⱘ᮹ᳳ੠ᯊ䯈↨ⳌৠⱘⳂᷛ᭛ӊᮄᯊᠡӮ㽚ⲪCOMP_UPDATE_VERSIONা᳝ᔧ⑤᭛ӊⱘ⠜ᴀ↨ⳌৠⱘⳂᷛ᭛ӊᮄᯊᠡӮ㽚ⲪSELFREGISTER໡ࠊ᭛ӊᯊ䖬䖯㸠㞾៥⊼ݠ᪡԰SHAREDFILEᡞ໡ࠊⱘ᠔᳝᭛ӊᔧ԰ᰃ݅ѿⱘLOCKEDFILE䆄ᔩ䫕ᅮⱘ.dll੠.exe᭛ӊҹWindows䞡ਃৢ᳈ᮄEXCLUDE_SUBDIR໡ࠊᯊϡ৿᳝ᄤ᭛ӊ།INCLUDE_SUBDIR䖲ৠᄤ᭛ӊ།Ёⱘ᭛ӊϔ䍋໡ࠊǂǂᔧ✊ˈ䖭ϸϾߑ᭄䛑᳝ৃ㛑䖨ಲϟ߫ⱘؐ˖0៤ࡳ໡ࠊCOPY_ERR_CREATEDIRⳂᷛ᭛ӊ།ϡ㛑߯ᓎCOPY_ERR_MEMORYϡ㛑Ў໡ࠊ᭛ӊ䖯⿟ߚ䜡ᖙ㽕ⱘݙᄬCOPY_ERR_NODISKSPACEⳂᷛ⺕ⲬЁ≵᳝䎇໳ⱘৃ⫼ぎ䯈COPY_ERR_OPENINPUTᡒϡࠄ⑤᭛ӊ།58 InstallShieldㅔᯢՓ⫼ᬭ⿟COPY_ERR_OPENOUTPUTϡ㛑໡ࠊߑ᭄Ёᣛᅮⱘ᭛ӊCOPY_ERR_TARGETREADONLYⳂᷛ᭛ӊ།ݭᡸ-51㞾៥⊼ݠ⊼᳝≵ӊ᭛ݠ៤ࡳ(া⫼ѢXCopyFileߑ᭄)ǂǂ݊Ҫ䋳᭄ѻ⫳᳾ⶹⱘ䫭䇃ǂǂ䳔㽕䇈ᯢⱘᰃˈInstallShieldՓ⫼㋏㒳ব䞣SRCDIR੠TARGETDIR㸼⼎⑤᭛ӊ།੠Ⳃᷛ᭛ӊ།ⱘ䏃ᕘDŽ⬅Ѣᅝ㺙⿟ᑣЁ݊Ҫߑ᭄гӮՓ⫼䖭ѯব䞣ˈ಴ℸ೼䇗⫼CopyFileϢXCopyFileߑ᭄ࠡˈᖙ乏ܜ⫼VarSaveߑ᭄ᇚSRCDIR੠TARGETDIRⱘᔧࠡؐᄬˈ✊ৢ䆒㕂Ⳍᑨⱘ䏃ᕘˈ᳔ৢ⫼VarRestoreߑ᭄ᘶ໡SRCDIR੠TARGETDIRⱘॳᴹؐDŽ[՟Ex_CopyFile]᭛ӊ໡ࠊ⼎՟DŽ#defineSOURCE_DIR"C:\Windows"#defineTARGET_DIR"D:\Temp"NUMBERnResult;programVarSave(SRCTARGETDIR);//ᇚ㔎ⳕⱘ⑤᭛ӊ།੠Ⳃᷛ᭛ӊ།䏃ᕘᄬSRCDIR=SOURCE_DIR;//䆒ᅮ⑤᭛ӊ།䏃ᕘTARGETDIR=TARGET_DIR;//䆒ᅮⳂᷛ᭛ӊ།䏃ᕘ//໡ࠊ᭛ӊˈᅗㄝᬜѢXCopyFile("*.TXT","",COMP_NORMAL)nResult=CopyFile("*.TXT","*.*");if(nResult<0)thenMessageBox("ϡ㛑໡ࠊ᭛ӊʽ",SEVERE);elseMessageBox("᭛ӊ໡ࠊᅠ↩DŽ",INFORMATION);endif;VarRestore(SRCTARGETDIR);//ᘶ໡㔎ⳕⱘ⑤᭛ӊ།੠Ⳃᷛ᭛ӊ།䏃ᕘEndprogram(2)᭛ӊⱘߴ䰸Ϣ䞡ᮄৡInstallShieldᦤկⱘDeleteFileϢRenameFileߑ᭄ߚ߿⫼ᴹ᭛ӊⱘߴ䰸Ϣ䞡ᮄৡˈᅗӀⱘॳൟབϟ˖DeleteFile(szFile);RenameFile(szFileOld,szFileNew);ǂǂ䳔㽕䇈ᯢⱘᰃ˖DeleteFileߑ᭄ϡ㛑ߴ䰸㋏㒳᭛ӊǃা䇏᭛ӊǃ䱤৿᭛ӊҹঞ㔥㒰Ϟ≵᳝ߴ䰸ᴗ䰤ⱘ᭛ӊDŽᑊϨ䆹ߑ᭄Փ⫼TARGETDIR԰Ў݊Ꮉ԰䏃ᕘDŽ㗠RenameFileߑ᭄ᰃᇚ⬅SRCDIRᣛᅮⱘ⑤᭛ӊ།ϟⱘ᭛ӊ䞡ᮄৡᑊ⿏㟇⬅TARGETDIRᣛᅮⱘⳂᷛ᭛ӊ།ЁDŽ[՟Ex_Rename]᭛ӊ䞡ᮄৡ⼎՟DŽ#defineTARGET_DIR"D:\Temp"programVarSave(SRCTARGETDIR);//ᇚ㔎ⳕⱘ⑤᭛ӊ།੠Ⳃᷛ᭛ӊ།䏃ᕘᄬ59 InstallShieldㅔᯢՓ⫼ᬭ⿟SRCDIR=TARGET_DIR;//䆒ᅮ⑤᭛ӊ།䏃ᕘTARGETDIR=TARGET_DIR;//䆒ᅮⳂᷛ᭛ӊ།䏃ᕘ//ᇚMy.TXT᭛ӊ䞡ᮄৡЎMyNew.TXTif(RenameFile("My.TXT","MyNew.TXT")<0)thenMessageBox("᭛ӊϡ㛑䞡ᮄৡʽ",SEVERE);elseMessageBox("᭛ӊᏆ䞡ᮄৡDŽ",INFORMATION);endif;VarRestore(SRCTARGETDIR);//ᘶ໡㔎ⳕⱘ⑤᭛ӊ།੠Ⳃᷛ᭛ӊ།䏃ᕘ(3)᭛ӊⱘᶹᡒInstallShieldᦤկϸϾߑ᭄⫼ᴹᶹᡒ᭛ӊˈᅗӀᰃ˖FindFile(szPath,szFileName,svResult);FindAllFiles(szDir,szFileName,svResult,nOp);ǂǂ݊ЁˈszDir੠szPath⫼ᴹᣛᅮ㽕ᶹᡒⱘ䏃ᕘˈszFileName㸼⼎㽕ᶹᡒⱘ᭛ӊৡˈᅗৃҹՓ⫼䗮䜡ヺˈsvResult⫼ᴹ䖨ಲᶹᡒࠄⱘ㄀ϔϾ᭛ӊDŽᇍѢFindAllFilesߑ᭄ᴹ䇈ˈ䖬ৃՓ⫼nOpᣛᅮᶹᡒⱘᮍᓣˈᔧnOpЎCONTINUEᯊ㸼⼎ҢϞϔ⃵ᶹᡒذℶⱘԡ㕂໘ᓔྟᶹᡒˈᔧnOpЎRESETᯊ㸼⼎೼szDirЁҢ༈ᓔྟᶹᡒDŽ[՟Ex_FindFiles]ᶹᡒC:Windowsϟⱘ᠔᳝.INI᭛ӊDŽ#defineTARGET_DIR"C:\Windows"NUMBERnResult;STRINGsvFileName;programnResult=FindAllFiles(TARGET_DIR,"*.ini",svFileName,RESET);while(nResult=0)MessageBox(svFileName,INFORMATION);nResult=FindAllFiles(TARGET_DIR,"*.ini",svFileName,CONTINUE);endwhile;endprogramendprogram(4)᭛ӊሲᗻⱘ㦋প੠䆒㕂InstallShieldᦤկⱘSetFileInfoϢGetFileInfoߑ᭄ߚ߿⫼ᴹ䆒㕂Ϣ㦋প᭛ӊⱘሲᗻDŽSetFileInfoߑ᭄ⱘॳൟབϟ˖60 InstallShieldㅔᯢՓ⫼ᬭ⿟SetFileInfo(szPathFile,nType,nAttribute,szValue);ǂǂ䆹ߑ᭄ᰃ⫼ᴹ䆒㕂⬅szPathFileᣛᅮ᭛ӊⱘ⬅szValueᣛᅮⱘᯊ䯈ǃ᮹ᳳ៪⫼ᴹ᳈ᬍ᭛ӊⱘሲᗻDŽᛇ㽕᭛ӊⱘᯊ䯈੠᮹ᳳৠᯊ㹿ᬍবˈ⫼᠋ᖙ乏ϸ⃵䇗⫼䆹ߑ᭄ˈԚ㢹ᬍব᭛ӊⱘ݊Ҫ໮Ͼሲᗻˈ߭া㽕೼nAttributeЁՓ⫼"|"㒘ড়䖯㸠ϔ⃵䇗⫼ህৃᅲ⦄DŽ݊ЁnType⫼ᴹᣛᅮ㽕᳈ᬍⱘ᭛ӊ⡍ᕕˈᅗৃҹᰃϟ߫ؐПϔ˖FILE_ATTRIBUTE㸼⼎ϔϾ៪໮Ͼሲᗻᇚ㹿᳈ᬍFILE_DATE㸼⼎᭛ӊⱘ᮹ᳳᇚ㹿᳈ᬍFILE_TIME㸼⼎᭛ӊⱘᯊ䯈ᇚ㹿᳈ᬍǂǂ㢹ᔧnTypeЎFILE_ATTRIBUTEᯊᣛᅮⱘ᭛ӊሲᗻ(nTypeЎ݊ᅗؐᯊˈ䆹খ᭄Ў0)ˈ߭szValueЎ""ˈ㗠nAttributeৃҹᰃϟ߫ؐПϔ៪"|"㒘ড়˖FILE_ATTR_ARCHIVED䆒㕂"ᄬḷ"ሲᗻFILE_ATTR_HIDDEN䆒㕂"䱤৿"ሲᗻFILE_ATTR_READONLY䆒㕂"া䇏"ሲᗻFILE_ATTR_SYSTEM䆒㕂"㋏㒳"ሲᗻFILE_ATTR_NORMALᔧℸؐऩ⣀ᣛᅮᯊˈ⏙䰸᠔᳝ⱘ᭛ӊሲᗻˈǂǂ঺ϔϾߑ᭄GetFileInfoᰃ⫼ᴹ㦋পϔϾᏆᄬ೼᭛ӊszPathNameⱘሲᗻǃᯊ䯈ǃ᮹ᳳ੠໻ᇣDŽᅗⱘॳൟབϟ˖GetFileInfo(szPathName,nType,nvResult,svResult);݊ЁˈnType⫼ᴹᣛᅮ㦋প᭛ӊሲᗻⱘ⡍ᕕˈᅗৃҹᰃϟ߫ؐПϔ˖FILE_ATTRIBUTE㦋প᭛ӊሲᗻˈ㒧ᵰ೼nvResultЁFILE_DATE㦋প᭛ӊ᮹ᳳ,ḐᓣЎYYYYMMDD,㒧ᵰ೼svResultЁFILE_SIZE㦋প᭛ӊ໻ᇣˈ㒧ᵰ೼nvResultЁFILE_TIME㦋প᭛ӊᯊ䯈,ḐᓣЎHH:MM:SS,㒧ᵰ೼svResultЁǂǂ䳔㽕䇈ᯢⱘᰃˈ⫼GetFileInfo㦋প᭛ӊሲᗻᯊ᳔དܜᇚnTypeᣛᅮЎFILE_ATTRIBUTEˈ㢹䖨ಲⱘnvResultؐㄝѢFILE_ATTR_NORMALˈ߭≵᳝ӏԩሲᗻ˗Ԛ㢹䖨ಲⱘnvResultϡㄝѢFILE_ATTR_NORMALˈ߭䳔㽕Ϣ㋏㒳乘ᅮНⱘ᭛ӊሲᗻؐ䖯㸠"Ϣ"(&)᪡԰ҹ⹂ᅮ᭛ӊⱘ݋ԧሲᗻˈ՟བϟ䴶ⱘҷⷕ⠛ᮁ˖if(nvResult=FILE_ATTR_NORMAL)then//ℷᐌ᭛ӊelseif(FILE_ATTR_HIDDEN&nvResult)then//䆹᭛ӊ᳝"䱤৿"ሲᗻendif;if(FILE_ATTR_READONLY&nvResult)then//䆹᭛ӊ᳝"া䇏"ሲᗻendif;endif;61 InstallShieldㅔᯢՓ⫼ᬭ⿟ǂǂ݊Ёˈ䖨ಲⱘnvResultؐৃ㛑ᰃ˖FILE_ATTR_ARCHIVEDᄬḷ᭛ӊFILE_ATTR_DIRECTORYⳂᔩ᭛ӊFILE_ATTR_HIDDEN䱤৿᭛ӊFILE_ATTR_READONLYা䇏᭛ӊFILE_ATTR_SYSTEM㋏㒳᭛ӊFILE_ATTR_NORMALℷᐌ᭛ӊendprogram2.10.2᭛ӊ།Ϣ䏃ᕘ᪡԰ǂǂ⫼Ѣ᭛ӊ།Ϣ䏃ᕘ᪡԰ⱘInstallShieldߑ᭄᳝ᕜ໮ˈ㸼2.5߫ߎ᠔᳝ⱘⳌ݇ߑ᭄DŽǂǂ䳔㽕䇈ᯢⱘᰃ˖1.݇ѢDeleteDirߑ᭄DeleteDirߑ᭄㛑໳ߴ䰸⬅szDirᣛᅮⱘ᭛ӊ།៪᭛ӊ།Ёⱘ᠔᳝ݙᆍˈ݋ԧⱘߴ䰸᪡԰䖬পއѢnFlagⱘؐDŽ㢹nFlagЎALLCONTENTSᯊˈ߭ߴ䰸䆹᭛ӊ།᠔᳝ⱘݙᆍ˗㢹nFlagЎONLYDIRᯊˈ߭ҙᔧ᭛ӊ།Ёⱘ᭛ӊЎぎᯊᠡӮߴ䰸䆹᭛ӊ།DŽ䳔㽕⊼ᛣⱘᰃ˖(1)DeleteDirߑ᭄ϡӮᇚߴ䰸ⱘ᭛ӊ།ᬒܹWindows㋏㒳ⱘ"ಲᬊキ"ˈ಴㗠ϔᮺ᭛ӊ།ߴ䰸ৢϡ㛑ݡᘶ໡DŽ62 InstallShieldㅔᯢՓ⫼ᬭ⿟(2)䆹ߑ᭄ϡ㛑ߴ䰸ᔧࠡ᭛ӊ།ҹঞ㔥㒰㋏㒳Ё≵᳝ߴ䰸ᴗ䰤ⱘ᭛ӊDŽ(3)ᔧᣛᅮⱘ᭛ӊ།ϟ᳝"া䇏"ǃ"䱤৿"៪"㋏㒳"᭛ӊᯊˈ䆹ߑ᭄ϡӮߴ䰸䆹᭛ӊ།DŽ(4)szDirᣛᅮⱘ᭛ӊ།䏃ᕘЁⱘ""ᑨᰃ"\"ˈ՟བ˖DeleteDir("D:\Temp",ALLCONTENTS);endprogram2.݇ѢFindAllDirsFindAllDirsߑ᭄⫼ᴹᶹᡒszDirᣛᅮⱘ᭛ӊ།៪䆹᭛ӊ།ϟⱘ᠔᳝ᄤ᭛ӊ།ˈᑊᇚᶹᡒⱘ㒧ᵰᄬ೼ᄫヺІ䫒㸼listDirsЁDŽߑ᭄ЁⱘnOp⫼ᴹᣛᅮᰃ(ЎINCLUDE_SUBDIR)৺(ЎEXCLUDE_SUBDIR)ᶹᡒ᠔᳝ᄤ᭛ӊ།DŽ[՟Ex_FindFolders]ᶹᡒCⲬϟⱘ᠔᳝ᄤ᭛ӊ།DŽLISTlistDirs;programlistDirs=ListCreate(STRINGLIST);FindAllDirs("C:\",INCLUDE_SUBDIR,listDirs);ListDestroy(listDirs);endprogramǂǂ䳔㽕䇈ᯢⱘᰃˈFindAllDirsߑ᭄ᬃᣕWindows95/98ⱘ䭓᭛ӊ།ৡDŽ3.݇ѢGetValidDrivesListGetValidDrivesListߑ᭄⫼ᴹ㦋প㋏㒳Ё᳝ᬜⱘ偅ࡼ఼߫㸼ˈ䖨ಲⱘ㒧ᵰপއѢϟ䴶ⱘnDriveTypeؐ˖FIXED_DRIVEᶹᡒ⹀Ⲭ偅ࡼ఼REMOTE_DRIVEᶹᡒ㔥㒰偅ࡼ఼REMOVEABLE_DRIVEᶹᡒ䕃Ⲭ偅ࡼ఼CDROM_DRIVEᶹᡒCD-ROMǂǂ՟བˈϟ䴶ⱘҷⷕᇚᶹᡒ᠔᳝ⱘᴀഄ偅ࡼ఼ˈᑊᇚ㒧ᵰᄬᬒ೼ᄫヺІ߫㸼Ё˖listDirs=ListCreate(STRINGLIST);GetValidDrivesList(listDirs,REMOVEABLE_DRIVE,-1);GetValidDrivesList(listDirs,FIXED_DRIVE,10000);GetValidDrivesList(listDirs,CDROM_DRIVE,-1);ListDestroy(listDirs);ǂǂҷⷕЁˈGetValidDrivesListߑ᳔᭄ৢϔϾখ᭄⫼ᴹᣛᅮ㽕ᶹᡒⱘ偅ࡼ఼᠔৿᳝ⱘ᳔ᇥⱘ⺕Ⲭぎ䯈ˈ㢹ℸখ᭄ᇣѢ0ˈ߭ᶹᡒᯊϡӮẔ⌟⺕Ⲭぎ䯈ˈҢ㗠໻໻ࡴᖿᶹᡒ䗳ᑺˈ䖭ᇍᶹᡒ䕃偅੠CD-ROM⡍߿᳝⫼DŽ63 InstallShieldㅔᯢՓ⫼ᬭ⿟2.11ᐌ⫼ᇍ䆱Ḛ᪡԰(ϞϞϞ)ǂǂ԰ЎϢ⫼᠋ѸѦⱘ䞡㽕᠟↉ˈᇍ䆱ḚᰃInstallShieldᅝ㺙⿟ᑣЁ᳔䞡㽕гᰃ᳔Џ㽕ⱘ⫼᠋⬠䴶DŽ೼ᅝ⿟ᑣ⿟ᑣ䖤㸠䖛⿟Ёˈᇍ䆱Ḛ䗮䖛৘⾡᥻ӊ(བᣝ䪂ǃ㓪䕥Ḛǃ߫㸼Ḛǃ㒘ড়Ḛㄝ)ᴹᤩᤝ⫼᠋ⱘ䕧ܹᙃ៪᭄᥂DŽǂǂ෎Ѣᇍ䆱Ḛⱘ䖭⾡䞡㽕ᗻˈInstallShieldЎ⫼᠋ᦤկњ໻䞣ⱘᇍ䆱Ḛߑ᭄ˈ䖭݊Ёࣙᣀݙᓎᇍ䆱Ḛ੠Sdᇍ䆱Ḛߑ᭄DŽᔧ✊ˈ⫼᠋гৃҹ೼ᅝ㺙⿟ᑣҷⷕЁᅮН㞾Ꮕⱘᇍ䆱Ḛ(೼4.4㡖Ёˈᇚ䅼䆎བԩᅮࠊᇍ䆱Ḛ)2.11.1ݙᓎᇍ䆱Ḛ੠Sdᇍ䆱ḚInstallShield೼㋏㒳ݙ䚼ᅮНњϔѯᇍ䆱Ḛˈ䖭ѯᇍ䆱Ḛ⿄ПЎݙᓎᇍ䆱Ḛˈ݊Ⳍᑨⱘᇍ䆱Ḛߑ᭄ৃҹ೼᠔᳝⠜ᴀЁՓ⫼DŽԚЎњᦤ催ᇍ䆱Ḛⱘࡳ㛑੠ᑨ⫼㛑࡯ˈ԰Ў㸹ܙ੠ᢧሩˈInstallShield䖬ᦤկњϔѯ催ᬜǃ䗖ᑨ㛑࡯ᔎⱘ㛮ᴀᇍ䆱Ḛ(ScriptDialog)ˈ⬅ѢᅗӀᰃ⫼InstallScript㛮ᴀ䇁㿔ҷⷕᴹݭⱘˈ಴ℸজ⿄ПЎSdᇍ䆱ḚDŽ1.ݙᓎᇍ䆱ḚInstallShieldⱘݙᓎᇍ䆱Ḛߑ᭄Ёˈ䰸њAskYesNoǃMessageBoxǃSprintfBoxㄝᇥ䞣ᇍ䆱Ḛᰃ䇗⫼WindowsAPIߑ᭄໪ˈ݊ԭⱘഛᰃInstallShield㞾Ꮕᵘ䗴ⱘDŽ㸼2.6߫ߎњInstallShieldܼ䚼ⱘݙᓎᇍ䆱Ḛߑ᭄DŽǂǂ՟བϟ䴶ⱘҷⷕˈ݊㒧ᵰབ೒2.1᠔⼎DŽ64 InstallShieldㅔᯢՓ⫼ᬭ⿟programWelcome("⃶䖢",0);Endprogram2.Sdᇍ䆱ḚInstallSheldᦤկњ໻䞣ⱘ㛮ᴀᇍ䆱Ḛկ⫼᠋Փ⫼ˈ㛮ᴀᇍ䆱ḚᰃᣝInstallScript⡍ᅮⱘᴎࠊᴹ߯ᓎⱘˈᑊᦤկᇍ䆱Ḛⱘ㛮ᴀ䇁㿔ҷⷕկ⫼᠋ᦷᨽDŽЎњϢݙᓎᇍ䆱Ḛߑ᭄Ⳍऎ߿ˈ㛮ᴀᇍ䆱Ḛⱘߑ᭄ৡ䛑ᰃҹSdЎᓔ༈DŽ㸼2.7߫ߎњInstallShieldܼ䚼ⱘSdᇍ䆱Ḛߑ᭄ˈ65 InstallShieldㅔᯢՓ⫼ᬭ⿟ǂǂԚՓ⫼㛮ᴀᇍ䆱Ḛᯊϔᅮ㽕⊼ᛣ˖(1)Ϣݙᓎᇍ䆱Ḛߑ᭄Ⳍ↨ˈ䇗⫼Sdᇍ䆱Ḛᯊ䖬䳔㽕೼ᅝ㺙㛮ᴀ⿟ᑣЁ⏏ࡴ঺໪ϸᴵ䇁হˈབϟ᠔⼎˖#include"sddialog.h"//⏏ࡴSdᇍ䆱Ḛⱘ༈᭛ӊ66 InstallShieldㅔᯢՓ⫼ᬭ⿟programSdWelcome("⃶䖢","");//䇗⫼Sdᇍ䆱Ḛendprogram#include"sddialog.rul"//⏏ࡴSdᇍ䆱Ḛⱘ㛮ᴀ᭛ӊ݊㒧ᵰབ೒2.2᠔⼎DŽ(2)㢹䇗⫼Sdᇍ䆱Ḛߑ᭄ᯊˈ݊ᄫヺІᅲখЎNULLᄫヺІ("")ᯊˈSdᇍ䆱Ḛᇚ䆹খ᭄Փ⫼㔎ⳕⱘᄫヺІ᭛ᴀDŽ䖭ϔ⚍ˈг䗖⫼ѢInstallShieldⱘݙᓎᇍ䆱Ḛߑ᭄DŽ(3)⫼᠋ৃҹ䗮䖛䇗⫼DialogSetInfoᬍবᶤѯᇍ䆱ḚЁⱘ᥻ӊDŽ(4)೼Sdᇍ䆱Ḛߑ᭄Ёˈ⫼᠋ৃҹᇚ%PᦦܹࠄᄫヺІЁˈ⫼Ѣᬒ㕂ѻકৡ⿄DŽ㔎ⳕᯊˈѻકৡ⿄%P㸼⼎ぎᄫヺІˈԚ⫼᠋ৃҹՓ⫼SdProductNameߑ᭄ᴹ䆒ᅮ݊݋ԧⱘؐDŽ(5)Ўњᦤ催㋏㒳ᇍSetup.rulⱘ㓪䆥䗳ᑺҹঞޣᇣ㓪䆥᭛ӊSetup.insⱘᄫ㡖᭄ˈ೼䳔㽕ࣙ৿Sdᇍ䆱Ḛ㛮ᴀ᭛ӊࠡˈܜᇍSD_SINGLE_DIALOGS䖯㸠ᅣᅮНˈ✊ৢݡᇍ݋ԧⱘᇍ䆱Ḛᷛ䆚(খ㾕㸼2.7)䖯㸠ᅮНDŽ՟བ㢹䇗⫼SdShowInfoListǃSdLicenseᇍ䆱Ḛᯊˈ߭ৃ᳝བϟᅮН˖...endprogram#defineSD_SINGLE_DIALOGS1#defineSD_SHOWINFOLIST1#defineSD_LICENSE1#include"Sddialog.rul"(6)೼᠔᳝InstallShieldᇍ䆱ḚЁˈ㢹ᇍ䆱Ḛ৿᳝[Next]ǃ[Back]ҹঞ[Cancel]ᣝ䪂DŽ߭ऩߏ[Next]ǃ[Back]ᣝ䪂ˈᇍ䆱Ḛߑ᭄Ⳍᑨഄ䖨ಲNEXTǃBACKПؐˈ㗠ऩߏ[Cancel]ᣝ䪂ˈ߭ᇚᔍߎ"ExitSetup"67 InstallShieldㅔᯢՓ⫼ᬭ⿟ᇍ䆱Ḛˈ⫼Ѣ⹂䅸ᰃ৺ⳳⱘ䗔ߎᅝ㺙DŽ2.11.2ᙃᰒ⼎ᇍ䆱Ḛǂǂᇍ䆱Ḛߑ᭄MessageBoxǃSprintfBoxǃSdLicenseǃSdShowInfoListǃSdShowMsg੠SdStartCopyߚ߿⫼ᴹᰒ⼎⫼᠋䌘᭭ǃᅝ㺙䖯⿟ǃ䫭䇃ҷⷕㄝᙃDŽ1.MessageBox੠SprintfBoxMessageBox੠SprintfBox䛑ᰃ䇗⫼WindowsⱘAPIߑ᭄ⱘ⍜ᙃᇍ䆱ḚˈϨSprintfBox䖬㛑Փ⫼བSprintfߑ᭄ⱘḐᓣ᥻ࠊヺDŽᅗӀⱘॳൟབϟ˖MessageBox(szMsg,nType);SprintfBox(nType,szTitle,szFormat[,arg][,...]);ǂǂ݊ЁˈnType⫼ᴹᣛᅮ೼ᇍ䆱ḚЁᰒ⼎ⱘ೒ᷛ㉏ൟˈ݊乘ᅮНؐⱘ৿Нབ೒2.3᠔⼎DŽǂǂখ᭄szMsgᣛᅮ㽕ᰒ⼎ⱘ⍜ᙃݙᆍˈབᵰ⍜ᙃ໾䭓ˈ߭ৃ೼⍜ᙃ᭛ᴀЁ⏏ࡴ" "䕀НヺᴹՓ݊ᤶ㸠ˈszTitleᣛᅮᇍ䆱Ḛⱘᷛ乬DŽ[՟Ex_MessageBox]Փ⫼MessageBoxSTRINGszTitle;STRINGszMyComp;NUMBERnvDx,nvDy;programszTitle="៥ⱘ⬉㛥";SetDialogTitle(DLG_MSG_INFORMATION,szTitle);//䆒㕂ᇍ䆱Ḛⱘᷛ乬Ў"៥ⱘ⬉㛥"GetExtents(nvDx,nvDy);Sprintf(szMyComp,"%s:%dx%d","ሣᐩߚ䕼⥛Ў",nvDx,nvDy);MessageBox(szMyComp,INFORMATION);endprogram[՟Ex_SprintfBox]Փ⫼SprintfBoxNUMBERnvDx,nvDy;68 InstallShieldㅔᯢՓ⫼ᬭ⿟programGetExtents(nvDx,nvDy);SprintfBox(INFORMATION,"៥ⱘ⬉㛥","%s:%dx%d","ሣᐩߚ䕼⥛Ў",nvDx,nvDy);endprogramǂǂ䖭ϸϾ⼎՟ⱘ㒧ᵰ䛑ᰃϔḋⱘˈབ೒2.4᠔⼎DŽᰒ✊ˈSprintfBox㽕↨MessageBoxࡳ㛑ᔎ໻ᕫ໮DŽǂǂ䳔㽕䇈ᯢⱘᰃ˖㔎ⳕᯊˈ䖭ϸϾᇍ䆱Ḛߑ᭄ᰒ⼎ⱘᇍ䆱ḚЁᘏ᳝ϔϾ[⹂ᅮ]ᣝ䪂DŽЎњ㛑থ᣹WindowsAPIⱘMessageBoxⱘࡳ㛑ˈ⫼᠋ৃҹ೼Ϟ՟ⱘ෎⸔Ϟ԰བϔѯᬍDŽ[՟Ex_SprintfBoxEx]ᠽሩՓ⫼SprintfBox៪MessageBox#defineMB_OK0x0000//ᇍ䆱ḚЁ৿᳝[⹂ᅮ]ᣝ䪂#defineMB_OKCANCEL0x0001//ᇍ䆱ḚЁ৿᳝[⹂ᅮ]ǃ[প⍜]ᣝ䪂#defineMB_ABORTRETRYIGNORE0x0002//ᇍ䆱ḚЁ৿᳝[㒜ℶ]ǃ[䞡䆩]ǃ[ᗑ⬹]ᣝ䪂#defineMB_YESNOCANCEL0x0003//ᇍ䆱ḚЁ৿᳝[ᰃ]ǃ[৺]ǃ[প⍜]ᣝ䪂#defineMB_YESNO0x0004//ᇍ䆱ḚЁ৿᳝[ᰃ]ǃ[৺]ᣝ䪂#defineMB_RETRYCANCEL0x0005//ᇍ䆱ḚЁ৿᳝[䞡䆩]ǃ[প⍜]ᣝ䪂#defineMB_ICONHAND0x0010//ᇍ䆱ḚЁ৿᳝Xᔶ೒ᷛ#defineMB_ICONQUESTION0x0020//ᇍ䆱ḚЁ৿᳝˛ᔶ೒ᷛ#defineMB_ICONEXCLAMATION0x0030//ᇍ䆱ḚЁ৿᳝ʽᔶ೒ᷛ#defineMB_ICONASTERISK0x0040//ᇍ䆱ḚЁ৿᳝iᔶ೒ᷛNUMBERnvDx,nvDy;programGetExtents(nvDx,nvDy);SprintfBox(MB_YESNO|MB_ICONQUESTION,"៥ⱘ⬉㛥","%s:%dx%d","ሣᐩߚ䕼⥛Ў",nvDx,nvDy);endprogramǂǂ㒧ᵰ೼ᇍ䆱ḚЁᰒ⼎ߎ[ᰃ]੠[৺]ᣝ䪂ˈϨ೒ᷛব៤њᏺ䯂োⱘ೒ᷛˈབ೒2.5᠔⼎ˈ݊ЁMB_OKㄝヺোᐌ䞣ⱘؐᖙ乏ᣝϞ䗄ҷⷕЁⱘؐ䖯㸠ᅮНDŽ69 InstallShieldㅔᯢՓ⫼ᬭ⿟ǂǂৠḋˈ㢹ᇚMessageBoxߑ᭄ЁⱘnType䆒㕂៤MB_YESNO|MB_ICONQUESTIONˈгӮ᳝㉏Ԑⱘ㒧ᵰDŽ2.SdShowInfoList੠SdStartCopyߑ᭄SdShowInfoList੠SdStartCopyᰃ⫼ᴹᰒ⼎໮ᴵᙃⱘᇍ䆱ḚDŽᅗӀⱘॳൟབϟ˖SdShowInfoList(szTitle,szMsg,listID);SdStartCopy(szTitle,szMsg,listData);ǂǂ݊ЁˈszTitleЎᇍ䆱Ḛⱘᷛ乬ˈszMsgЎᇍ䆱ḚЁ᳔ࠡ䴶ᰒ⼎ⱘ⍜ᙃDŽListID੠ListDataᰃLIST᭄᥂㉏ൟⱘ䫒㸼ব䞣DŽ[՟Ex_ShowInfo]Փ⫼SdShowInfoList੠SdStartCopy#include"Sddialog.h"STRINGszTitle,szMsg;STRINGsvReturn,szInfo;NUMBERnvReturn;LISTlistInfo;programlistInfo=ListCreate(STRINGLIST);//߯ᓎ䫒㸼//Ẕ⌟㋏㒳ᰃ৺᳝CD-ROMGetSystemInfo(CDROM,nvReturn,svReturn);if(nvReturn=TRUE)thenszInfo="ᙼⱘ䅵ㅫᴎЁ᳝ϔϾCD-ROM偅ࡼ఼DŽ";elseszInfo="ᙼⱘ䅵ㅫᴎЁ≵᳝CD-ROM偅ࡼ఼DŽ";endif;//ᇚϞ䗄ᙃᦦܹ䫒㸼ЁListAddString(listInfo,szInfo,AFTER);//Ẕ⌟ᔧࠡ㋏㒳ᯊ䯈GetSystemInfo(TIME,nvReturn,svReturn);70 InstallShieldㅔᯢՓ⫼ᬭ⿟Sprintf(szInfo,"⦄೼ⱘᯊ䯈ᰃ˖%s.",svReturn);//ᇚϞ䗄㒧ᵰᦦܹ䫒㸼ЁListAddString(listInfo,szInfo,AFTER);//Ẕ⌟㋏㒳෎ᴀݙᄬ໻ᇣGetSystemInfo(BASEMEMORY,nvReturn,svReturn);Sprintf(szInfo,"ᙼⱘ䅵ㅫᴎⱘ෎ᴀݙᄬ໻ᇣЎ˖%ldk",nvReturn);ListAddString(listInfo,szInfo,AFTER);szTitle="SdShowInfoList⼎՟";szMsg="ϟ䴶ⱘᙃ੠ᙼⱘ䅵ㅫᴎ᳝݇˖";SdShowInfoList(szTitle,szMsg,listInfo);szTitle="SdStartCopy⼎՟";SdStartCopy(szTitle,szMsg,listInfo);endprogram#defineSD_SINGLE_DIALOGS1#defineSD_SHOWINFOLIST1#defineSD_STARTCOPY1#include"Sddialog.rul"㒧ᵰབ೒2.6ǃ2.7᠔⼎DŽ71 InstallShieldㅔᯢՓ⫼ᬭ⿟72 InstallShieldㅔᯢՓ⫼ᬭ⿟㄀㄀㄀3ゴゴゴ෎ᴀᅝ㺙⿟ᑣⱘᓎゟǂǂϞϔゴҟ㒡њInstallScript㛮ᴀ䇁㿔ⱘϔѯ෎⸔ݙᆍˈ݊Ⳃⱘᰃᐂࡽ⫼᠋㛑໳㓪ࠊߎ݋᳝䕗催∈ᑇⱘᅝ㺙⿟ᑣDŽᔧ✊ˈᓎゟϔϾᅝ㺙⿟ᑣ᮴䳔⫼᠋Ң༈ᓔྟˈ಴ЎinstallshildⱘProjectWizard㛑ᖿ䗳᳝ᬜഄ⫳៤ᅝ㺙乍Ⳃ᠔䳔ⱘ⿟ᑣḚᶊDŽ䳔㽕⫼᠋᠔خⱘˈህᰃ೼䆹Ḛᶊⱘ෎⸔Ϟ⏏ࡴ៪ᬍϔѯݙᆍҹᅠ୘ᅝ㺙⿟ᑣࡳ㛑DŽ3.1߯ᓎᅝ㺙乍Ⳃǂǂ೼installshild5.5ЁˈProjectWizard⫼ᴹࠊ԰ϔ㠀ᑨ⫼⿟ᑣⱘᅝ㺙乍ⳂˈVisualBasicProjectWizard߭䖬ϧ䮼ЎVB6.0ᑨ⫼⿟ᑣ䖯㸠ᅮࠊDŽᴀ㡖ⴔ䞡䅼䆎ProjectWizardⱘՓ⫼ᮍ⊩DŽ3.1.1Փ⫼ProjectWizardǂǂ䖤㸠installshild5.5ৢˈঠߏProjectにষЁⱘProjectWizardህৃᓔྟᅝ㺙乍Ⳃ৥ᇐDŽ(1)佪ܜˈߎ⦄བ೒3.1᠔⼎ⱘ"Welcome"ᇍ䆱Ḛˈ㽕∖⫼᠋䕧ܹᑨ⫼⿟ᑣৡ⿄ǃ݀ৌৡ⿄ǃ䗝ᢽᑨ⫼⿟ᑣ᠔Փ⫼ⱘᓔথ⦃๗ǃᑨ⫼⿟ᑣⱘ㉏ൟǃ⠜ᴀোҹঞᑨ⫼⿟ᑣⱘৃᠻ㸠᭛ӊৡˈऩߏBrowseᣝ䪂("..."ヺোⱘᣝ䪂)ৃᇚ⺕ⲬЁᏆ᳝ⱘᑨ⫼⿟ᑣⱘৃᠻ㸠᭛ӊৡ䇗ܹDŽऩߏ[ᐂࡽ]ᣝ䪂ˈᔍߎ䆹ᇍ䆱Ḛⱘᐂࡽ䇈ᯢDŽ73 InstallShieldㅔᯢՓ⫼ᬭ⿟ǂǂᔧ✊ˈ⫼᠋ϡϔᅮ⦄೼ህ೼"Welcome"ᇍ䆱ḚЁ䕧ܹⳌᑨⱘݙᆍˈ಴Ў೼installshildⱘ乍ⳂᎹ԰ऎにষЁгৃҹ䖯㸠Ϟ䗄ݙᆍⱘᬍ੠⏏ࡴDŽ(2)⬭㔎ⳕؐˈऩߏ[ϟϔℹ]ᣝ䪂ˈߎ⦄བ೒3.2᠔⼎ⱘ"ChooseDialogs"ᇍ䆱ḚDŽ䆹ᇍ䆱Ḛ⫼ᴹ䅽⫼᠋Ң߫㸼Ё䗝ᅮᅝ㺙䖛⿟Ё᠔ߎ⦄ⱘᇍ䆱ḚDŽ೼ᇍ䆱Ḛ߫㸼乍ࠡ䴶ⱘᮍḚЁ᳝䩽ো(ř)ⱘ㸼⼎㹿䗝ЁˈऩߏᇣᮍḚৃҹ೼䗝Ё੠᳾䗝ЁП䯈䖯㸠ߛᤶDŽ↣⃵䗝ᅮᇍ䆱Ḛ߫㸼乍ᯊˈ"ChooseDialogs"ᇍ䆱ḚⱘᎺϟ㾦ᇚӮᰒ⼎Ⳍᑨⱘᇍ䆱Ḛ῵ൟˈऩߏ[Preview]ᣝ䪂䖬ৃᣝℷᐌ↨՟ᰒ⼎䆹῵ൟDŽ74 InstallShieldㅔᯢՓ⫼ᬭ⿟(3)⬭㔎ⳕؐˈऩߏ[ϟϔℹ]ᣝ䪂ˈߎ⦄བ೒3.3᠔⼎ⱘ"ChooseTargetPlatforms"ᇍ䆱ḚDŽ䆹ᇍ䆱Ḛ⫼ᴹ䅽⫼᠋䗝ᢽϔϾ៪໮Ͼ᪡԰㋏㒳㉏ൟˈҹއᅮৃҹ೼ાѯ᪡԰㋏㒳Ё䖯㸠ᅝ㺙DŽ(4)⬭㔎ⳕؐˈऩߏ[ϟϔℹ]ᣝ䪂ˈߎ⦄བ೒3.4᠔⼎ⱘ"SpecifyLanguages"ᇍ䆱ḚDŽ䆹ᇍ䆱Ḛ⫼ᴹ䅽⫼᠋䗝ᢽϔϾ៪໮Ͼ䇁㋏ˈҹއᅮ߯ᓎⱘᅝ㺙乍Ⳃৃҹᬃᣕાѯ䇁㋏DŽ䳔㽕䇈ᯢⱘᰃˈinstallshild5.5㣅᭛ϧϮ⠜াᬃᣕEnglish䇁㋏ⱘᅝ㺙乍ⳂDŽ75 InstallShieldㅔᯢՓ⫼ᬭ⿟(5)⬭㔎ⳕؐˈऩߏ[ϟϔℹ]ᣝ䪂ˈߎ⦄བ೒3.5᠔⼎ⱘ"SpecifySetupTypes"ᇍ䆱ḚDŽ䆹ᇍ䆱Ḛ⫼ᴹ䅽⫼᠋䗝ᢽϔϾ៪໮Ͼᑨ⫼⿟ᑣⱘᅝ㺙㉏ൟˈҹއᅮ⿟ᑣᅝ㺙ᯊկ⫼᠋䗝ᢽⱘᅝ㺙㉏ൟDŽ䳔㽕䇈ᯢⱘᰃˈ໮Ͼᅝ㺙㉏ൟ߫㸼乍ⱘ䗝ᅮ᪡԰ᰃ䗮䖛哴ᷛᴹ䖯㸠ⱘDŽᔧ⫼᠋ᣝԣShift䬂ϡᬒˈݡऩߏ哴ᷛৃ䗝ᅮ໮Ͼ䖲㓁ⱘ߫㸼乍ˈ㢹ऩߏ哴ᷛࠡᣝԣⱘ䬂ᰃCtrlˈ߭ৃ䗝ᅮ໮Ͼϡ䖲㓁ⱘ߫㸼乍DŽ䖭⾡᪡԰ᮍᓣ೼Windowsᑨ⫼⿟ᑣЁ޴Тᰃϔ㟈ⱘDŽ76 InstallShieldㅔᯢՓ⫼ᬭ⿟(6)⬭㔎ⳕؐˈऩߏ[ϟϔℹ]ᣝ䪂ˈߎ⦄བ೒3.6᠔⼎ⱘ"SpecifyComponents"ᇍ䆱ḚDŽ䆹ᇍ䆱Ḛ⫼ᴹ䅽⫼᠋⏏ࡴ៪ߴ䰸ᅝ㺙乍ⳂЁⱘ㒘ӊˈऩߏ[Add]ᣝ䪂ᇚ೼Components߫㸼Ё⏏ࡴϔϾ㒘ӊˈऩߏ[Delete]ߴ䰸䗝ᅮⱘ㒘ӊDŽ(7)⬭㔎ⳕؐˈऩߏ[ϟϔℹ]ᣝ䪂ˈߎ⦄བ೒3.7᠔⼎ⱘ"SpecifyFileGroups"ᇍ䆱ḚDŽ䆹ᇍ䆱Ḛ⫼ᴹ䅽⫼᠋⏏ࡴ៪ߴ䰸ᅝ㺙乍ⳂЁⱘ᭛ӊ㒘ˈऩߏ[Add]ᣝ䪂ᇚ೼FileGroups߫㸼ḚЁ⏏ࡴϔϾ᭛ӊ㒘ˈऩߏ[Delete]ߴ䰸䗝ᅮⱘ᭛ӊ㒘DŽ77 InstallShieldㅔᯢՓ⫼ᬭ⿟(8)⬭㔎ⳕؐˈऩߏ[ϟϔℹ]ᣝ䪂ˈߎ⦄བ೒3.8᠔⼎ⱘ"Summary"ᇍ䆱ḚDŽ䆹ᇍ䆱Ḛᰒ⼎⫼᠋৥ᇐЁ䗝ᅮⱘᙃᨬ㽕ˈ㢹⫼᠋ᇍ݊Ёᶤ乍䆒㕂ϡ⒵ᛣˈৃऩߏ[Ϟϔℹ]ᣝ䪂䖯㸠䞡ᮄ䗝ᢽDŽӏԩᯊ׭ˈऩߏ[প⍜]ᣝ䪂䛑Ӯ㒜ℶ߯ᓎᅝ㺙乍ⳂDŽ(9)ऩߏ[ᅠ៤]ᣝ䪂ˈinstallshieldᓔྟ߯ᓎDŽ⿡ㄝ⠛ࠏˈϔϾৡЎ"YourApplicationName"ⱘᅝ㺙乍ⳂⱘḚᶊህ߯ᓎདњˈৠᯊ䆹乍Ⳃⱘ᠔᳝ݙᆍ䛑㹿ᬒ೼㔎ⳕⱘC:MyInstallationsYourApplicationName᭛ӊ།ЁDŽᔧ✊ˈ⫼᠋ϡᖙᔧᖗ߯ᓎⱘᅝ㺙乍Ⳃৡᰃ৺੠ҹࠡ߯ᓎⱘᅝ㺙乍Ⳃৡ䞡ৡˈ಴ЎinstallshildӮ㞾ࡼ೼䞡ৡⱘ乍Ⳃৡৢ䴶ձ⃵ࡴϞ"-1"ǃ"-2"...3.1.2ᬍᅝ㺙乍Ⳃሲᗻǂǂᛇ㽕ᬍবϞ䗄ᅝ㺙乍Ⳃⱘ㔎ⳕሲᗻˈৃ䗝ᢽ"Project"㦰ऩϟⱘ"Settings..."ҸDŽᔍߎⳌᑨⱘ"ProjectSettings"ᇍ䆱Ḛˈབ೒3.9᠔⼎DŽ78 InstallShieldㅔᯢՓ⫼ᬭ⿟ǂǂᇍ䆱ḚЁ৿᳝"General"(ϔ㠀ᙃ)ǃ"Information"(乍Ⳃᙃ)ǃ"Owner"(ࠊ䗴ଚᙃ)ǃ"Instructions"(䇈ᯢ)ǃ"Language"(䇁㋏)ǃ"OperatingSystems"(᪡԰㋏㒳)ㄝ义䴶DŽǂǂ݊Ёˈ"Information"义䴶ৃկ⫼᠋䖯㸠ᓔথ⦃๗ǃᑨ⫼⿟ᑣⱘ㉏ൟҹঞᑨ⫼⿟ᑣ䗖⫼ⱘ㸠Ϯⱘ䞡ᮄ䗝ᢽDŽ㗠"Owner"义䴶⫼ᴹᣛᅮѻકৡ⿄ǃ԰㗙ǃᓔথଚǃEmailഄഔǃЏ义ǃ݀ৌৡ⿄ǃ⠜ᴗ䇈ᯢҹঞ⠜ᴀㄝᙃDŽǂǂ䖭䞠ˈ៥Ӏⴔ䞡䅼䆎"Language"੠"OperatingSystems"ϸϾ义䴶DŽӏԩᯊ׭ˈ䗝ᢽ䖭ϸϾᷛㅒᘏৃҹ䖯㸠䇁㋏੠᪡԰ᑇৄⱘ⏏ࡴDŽǂǂ⏏ࡴ䇁㋏ⱘ᪡԰ℹ偸བϟ˖(1)ᇚ"ProjectSettings"ᇍ䆱Ḛߛᤶࠄ"Language"义䴶(খ㾕೒3.9)˗(2)ऩߏ[Add...]ᣝ䪂ৃ৥䇁㋏߫㸼Ё๲ࡴᮄⱘ䇁㋏ˈབ೒3.10᠔⼎˗(3)প⍜"Showonlyavailablelanguages"䗝Ёᷛ䆄ˈ߭䇁㋏߫㸼Ёᰒ⼎ߎ᠔᳝ⱘ䇁㋏˗(4)䗝ᅮ"Chinese(PRC)"ˈऩߏ[OK]ᣝ䪂ˈᇚ㒭ℸᅝ㺙乍Ⳃ⏏ࡴϔϾᮄⱘ䇁㋏"Chinese(PRC)"ǂǂ⏏ࡴ᪡԰ᑇৄⱘ᪡԰ℹ偸བϟ˖(1)ᇚ"ProjectSettings"ᇍ䆱Ḛߛᤶࠄ"OperatingSystems"义䴶˗(2)ऩߏ[Add...]ᣝ䪂ৃ৥᪡԰㋏㒳߫㸼Ё๲ࡴᮄⱘ᪡԰㋏㒳ˈབ೒3.11᠔⼎˗(3)প⍜"Showonlyavailableplatforms"䗝Ёᷛ䆄ˈ᪡԰㋏㒳߫㸼Ёᰒ⼎ߎ݊Ҫϔѯ᪡԰㋏79 InstallShieldㅔᯢՓ⫼ᬭ⿟㒳˗(4)䗝ᅮᶤ᪡԰㋏㒳߫㸼乍ˈऩߏ[OK]ᣝ䪂ˈᇚ㒭ℸᅝ㺙乍Ⳃ⏏ࡴϔϾᮄⱘ᪡԰ᑇৄDŽ80 InstallShieldㅔᯢՓ⫼ᬭ⿟3.2⧚㾷⿟ᑣḚᶊǂǂࠡ䴶߯ᓎⱘᅝ㺙㛮ᴀ⿟ᑣSetup.rulᰃ⫼ᴹ䖯㸠ᅝ㺙߱ྟ࣪ǃᰒ⼎ᅝ㺙ᇍ䆱Ḛǃᅝ㺙᠔᳝ⱘ᭄᥂ҹঞ߯ᓎ⿟ᑣ㦰ऩ乍੠Ḡ䴶೒ᷛㄝ᪡԰ⱘDŽ3.2.1ᅝ㺙߱ྟ࣪ǂǂϟ䴶ܜᴹⳟⳟᅝ㺙㛮ᴀ⿟ᑣSetup.rulⱘ䚼ߚ⑤ҷⷕ˖#include"sdlang.h"//乘ᅮН䇁㿔ᷛ䆚ⱘ༈᭛ӊ#include"sddialog.h"//Sdᇍ䆱Ḛⱘ༈᭛ӊ#defineUNINST_LOGFILE_NAME"Uninst.isu"//ҹϟᰃᅝ㺙䖛⿟᠔䳔㽕ⱘ㞾ᅮНߑ᭄ໄᯢprototypeShowDialogs();prototype......//ҹϟᰃܼሔব䞣ⱘᅮНBOOLbWinNT,bIsShellExplorer,bInstallAborted,bIs32BitSetup;STRINGsvDir;STRINGsvName,svCompany,svSerial;STRINGsvDefGroup;STRINGszAppPath;STRINGsvSetupType;programDisable(BACKGROUND);//ᅝ㺙⬠䴶ϡՓ⫼㚠᱃㡆//ᅝ㺙߱ྟ࣪CheckRequirements();SetupInstall();SetupScreen();//ᰒ⼎ᅝ㺙䖛⿟ⱘᇍ䆱Ḛif(ShowDialogs()<0)gotoend_install;//ᅝ㺙᠔᳝ⱘ᭛ӊif(ProcessBeforeDataMove()<0)gotoend_install;if(MoveFileData()<0)gotoend_install;81 InstallShieldㅔᯢՓ⫼ᬭ⿟if(ProcessAfterDataMove()<0)gotoend_install;//ᅝ㺙⊼ݠif(SetupRegistry()<0)gotoend_install;//ᅝ㺙⿟ᑣ㦰ऩ乍੠Ḡ䴶೒ᷛif(SetupFolders()<0)gotoend_install;end_install:CleanUpInstall();//㢹ϔϾϡৃᘶ໡ⱘ䫭䇃ѻ⫳ৢˈ߭⏙䰸Ꮖᅝ㺙ⱘ䚼ߚݙᆍif(bInstallAborted)thenabort;endif;endprogram//ҹϟᰃ㞾ᅮНߑ᭄ⱘҷⷕ//⬹#include"sddialog.rul"//Sdᇍ䆱Ḛ᠔ᖙ乏ⱘࣙ৿᭛ӊǂǂҢϞ䗄ҷⷕ䖛⿟ৃҹⳟߎˈ೼⿟ᑣḚᶊЁ䖯㸠ᅝ㺙߱ྟ࣪ⱘҷⷕ䇁হЎ˖CheckRequirements();SetupInstall();SetupScreen();ǂǂᅗӀ䛑ᰃ㞾ᅮНߑ᭄ⱘ䇗⫼ˈ݊Ⳍᑨⱘߑ᭄ҷⷕབϟ˖functionCheckRequirements()//Ẕ⌟ᅝ㺙᠔䳔㽕ⱘ⦃๗NUMBERnvDx,nvDy,nvResult;STRINGsvResult;beginbIsShellExplorer=FALSE;bIsWindowsNT4=FALSE;bIsWindowsNT351=FALSE;bIsWindows95=FALSE;bIsWindows98=FALSE;//⌟䞣ሣᐩߚ䕼⥛ˈ᳔ᇣ㽕∖Ў640x480GetExtents(nvDx,nvDy);if(nvDy<480)thenMessageBox(@ERROR_VGARESOLUTION,WARNING);abort;endif;//䆒㕂"ᅝ㺙"᪡԰῵ᓣbIs32BitSetup=TRUE;GetSystemInfo(ISTYPE,nvResult,svResult);//㦋ᕫ᪡԰㋏㒳ⱘ㉏ൟᙃ82 InstallShieldㅔᯢՓ⫼ᬭ⿟if(nvResult=16)thenbIs32BitSetup=FALSE;//㸠16ԡᅝ㺙⿟ᑣreturn0;endif;//Ẕ⌟Ⳃᷛ᪡԰㋏㒳GetSystemInfo(OS,nvResult,svResult);if(nvResult=IS_WINDOWSNT)then//߸ᅮ᪡԰㋏㒳ᰃWindowsNT4.0䖬ᰃWindowsNT3.51,if(GetSystemInfo(WINMAJOR,nvResult,svResult)=0)thenif(nvResult>=4)thenbIsShellExplorer=TRUE;bIsWindowsNT4=TRUE;elsebIsWindowsNT351=TRUE;endif;endif;elseif(nvResult=IS_WINDOWS9X)thenbIsShellExplorer=TRUE;//߸ᅮ᪡԰㋏㒳ᰃWindows95䖬ᰃWindows98GetSystemInfo(WINMINOR,nvResult,svResult);if(nvResult<10)thenbIsWindows95=TRUE;elsebIsWindows98=TRUE;endif;endif;end;functionSetupInstall()//䆒㕂ᅝ㺙ᯊ᠔䳔㽕ⱘখ᭄beginEnable(CORECOMPONENTHANDLING);//ৃҹ໘⧚Ḍᖗ㒘ӊbInstallAborted=FALSE;if(bIs32BitSetup)then//㢹ᰃ32ԡᅝ㺙ˈᇚՓ⫼䭓䏃ᕘৡsvDir=PROGRAMFILES^@COMPANY_NAME^@PRODUCT_NAME;elsesvDir=PROGRAMFILES^@COMPANY_NAME16^@PRODUCT_NAME16;endif;TARGETDIR=svDir;//䆒㕂Ⳃᷛ᭛ӊ䏃ᕘSdProductName(@PRODUCT_NAME);//䆒㕂Sdᇍ䆱ḚЁѻકⱘৡ⿄Enable(DIALOGCACHE);//ᇚᇍ䆱ḚՓ⫼催䗳㓧ކᴎࠊˈ䙓ܡ䮾⚕return0;end;functionSetupScreen()//䆒㕂ᅝ㺙Џ⬠䴶ⱘ໪㾖beginEnable(FULLWINDOWMODE);//ᅝ㺙Џ⬠䴶ܼሣᰒ⼎83 InstallShieldㅔᯢՓ⫼ᬭ⿟SetTitle(@TITLE_MAIN,24,WHITE);//Џᷛ乬ⱘ买㡆Ўⱑ㡆ǃᄫԧ໻ᇣЎ24SetTitle(@TITLE_CAPTIONBAR,0,BACKGROUNDCAPTION);//䆒㕂ᷛ乬ᷣⱘᷛ乬Enable(BACKGROUND);//ৃҹՓ⫼㚠᱃买㡆Delay(1);//ᓊᯊ1⾦end;ǂǂҷⷕЁˈ޵ᰃ೼ᷛ䆚ヺ᳝ࠡ"@"ヺোⱘ㸼⼎পᅝ㺙乍ⳂЁᄫヺІ䌘⑤ЁⱘⳌ݇ݙᆍDŽ՟བ@TITLE_MAIN㸼⼎পᄫヺІ䌘⑤ЁⱘTITLE_MAINᄫ↉ݙᆍDŽ83.2.2ᰒ⼎ᅝ㺙䖛⿟ᇍ䆱Ḛǂǂᰒ⼎ᅝ㺙䖛⿟ᇍ䆱Ḛⱘߑ᭄ᰃ㞾ᅮНߑ᭄ShowDialogsˈ݊ҷⷕབϟ˖functionShowDialogs()NUMBERnResult;beginDlg_Start://ᓔྟⱘ䇁হᷛোDlg_SdWelcome:nResult=DialogShowSdWelcome();//ᰒ⼎⃶䖢ᇍ䆱Ḛif(nResult=BACK)gotoDlg_Start;//ᣝ[Back]ᣝ䪂ˈ䕀ࠄϔᓔྟDlg_SdLicense:nResult=DialogShowSdLicense();//ᰒ⼎䆌ৃण䆂ᇍ䆱Ḛif(nResult=BACK)gotoDlg_SdWelcome;//ᣝ[Back]ᣝ䪂ˈ䕀ࠄᷛোDlg_SdWelcomeDlg_SdRegisterUserEx:nResult=DialogShowSdRegisterUserEx();//ᰒ⼎⫼᠋⊼ݠᙃᇍ䆱Ḛif(nResult=BACK)gotoDlg_SdLicense;Dlg_SdAskDestPath:nResult=DialogShowSdAskDestPath();//ᰒ⼎䗝ᢽⳂⱘԡ㕂ᇍ䆱Ḛif(nResult=BACK)gotoDlg_SdRegisterUserEx;Dlg_SdSetupType:nResult=DialogShowSdSetupType();//ᰒ⼎ᅝ㺙㉏ൟᇍ䆱Ḛif(nResult=BACK)gotoDlg_SdAskDestPath;Dlg_SdComponentDialog2:if((nResult=BACK)&&(svSetupType!="Custom")&&(svSetupType!=""))thengotoDlg_SdSetupType;endif;nResult=DialogShowSdComponentDialog2();//ᰒ⼎䗝ᢽ㒘ӊᇍ䆱Ḛif(nResult=BACK)gotoDlg_SdSetupType;Dlg_SdSelectFolder:nResult=DialogShowSdSelectFolder();//ᰒ⼎䗝ᢽ⿟ᑣ㦰ऩ乍ᇍ䆱Ḛif(nResult=BACK)gotoDlg_SdComponentDialog2;84 InstallShieldㅔᯢՓ⫼ᬭ⿟return0;end;ǂǂᔧ✊ˈϞ䗄ⱘDialogShowSdSelectFolderㄝᰒ⼎ᇍ䆱Ḛⱘߑ᭄г䛑ᰃ㞾ᅮНߑ᭄ˈ⫼᠋ৃ㞾㸠ᶹⳟ݊ҷⷕDŽ3.2.3ᅝ㺙᭛ӊ᭄᥂ǂǂᅝ㺙᭛ӊ᭄᥂ᰃᅝ㺙⿟ᑣ᠔ᅠ៤ⱘ᳔Џ㽕ⱘӏࡵˈᅗϡҙᇚᑨ⫼⿟ᑣ᠔䳔㽕ⱘܼ䚼᭛ӊℷ⹂ഄᅝ㺙ࠄ⫼᠋ᣛᅮⱘⳂⱘ᭛ӊ།Ёˈ㗠Ϩ䖬㽕Ўҹৢডᅝ㺙ᯊ⊼ݠϔѯݙᆍDŽSetup.rul⿟ᑣЁⱘ㞾ᅮНߑ᭄ProcessBeforeDataMoveǃMoveFileData੠ProcessAfterDataMoveህᰃᅲ⦄Ϟ䗄䖛⿟ˈ݊ҷⷕབϟ˖functionProcessBeforeDataMove()//೼ⳳℷ᭄᥂ᅝ㺙ࠡ᠔خⱘᖙ乏ޚ໛STRINGsvLogFile;NUMBERnResult;beginInstallationInfo(@COMPANY_NAME,@PRODUCT_NAME,@PRODUCT_VERSION,@PRODUCT_KEY);//⊼ݠᅝ㺙ᙃsvLogFile=UNINST_LOGFILE_NAME;//ডᅝ㺙⊼ݠ᭛ӊnResult=DeinstallStart(svDir,svLogFile,@UNINST_KEY,0);//ᓔྟ⊼ݠডᅝ㺙ᙃif(nResult<0)thenMessageBox(@ERROR_UNINSTSETUP,WARNING);endif;szAppPath=TARGETDIR;//⫼᠋ᣛᅮⱘᅝ㺙䏃ᕘᄬ೼TARGETDIRব䞣Ёif((bIs32BitSetup)&&(bIsShellExplorer))then//32ԡᅝ㺙ᯊ//ҹϟᰃডᅝ㺙ᙃⱘ⊼ݠRegDBSetItem(REGDB_APPPATH,szAppPath);RegDBSetItem(REGDB_APPPATH_DEFAULT,szAppPath^@PRODUCT_KEY);RegDBSetItem(REGDB_UNINSTALL_NAME,@UNINST_DISPLAY_NAME);endif;return0;end;functionMoveFileData()//ᅝ㺙᭄᥂NUMBERnResult,nDisk;beginnDisk=1;SetStatusWindow(0,"");//䆒㕂ᅝ㺙ᯊⱘ⢊ᗕにষখ᭄85 InstallShieldㅔᯢՓ⫼ᬭ⿟Disable(DIALOGCACHE);Enable(STATUS);//ᰒ⼎䖯ሩᣛ⼎఼StatusUpdate(ON,100);//䎳䏾ᰒ⼎ᅝ㺙ⱘ䖯⿟nResult=ComponentMoveData(MEDIA,nDisk,0);//ᅝ㺙᭄᥂HandleMoveDataError(nResult);//໘⧚ᅝ㺙ᯊѻ⫳ⱘ䫭䇃Disable(STATUS);//݇䯁䖯ሩᣛ⼎఼returnnResult;end;functionProcessAfterDataMove()STRINGszReferenceFile,szMsg;begin//೼ডᅝ㺙ПࠡˈDeinstallSetReference⫼ᴹẔ⌟Ⳍᑨⱘ᭛ӊˈ//㢹䆹᭛ӊℷ೼Փ⫼ˈডᅝ㺙ᇚϡӮ䖯㸠DŽszReferenceFile=svDir^@PRODUCT_KEY;DeinstallSetReference(szReferenceFile);return0;end;3.2.4߯ᓎ⿟ᑣ㦰ऩ乍੠Ḡ䴶೒ᷛSetup.rulҷⷕЁⱘ㞾ᅮНߑ᭄SetupFolders䋳䋷߯ᓎ⿟ᑣ㦰ऩ乍੠Ḡ䴶೒ᷛˈ݊ҷⷕЎ˖functionSetupFolders()NUMBERnResult;beginnResult=CreateShellObjects("");//߯ᓎShellᇍ䈵returnnResult;end;ǂǂ⬅Ѣᅝ㺙乍ⳂResources义䴶ⱘ"ShellObjects"Ⳃᔩ乍Ё䖬≵᳝⿟ᑣ㦰ऩ乍੠೒ᷛⳌ݇ⱘݙᆍˈ಴㗠Ϟ䗄ҷⷕᅲ䰙Ϟᑊ≵᳝ⳳⱘ䍋԰⫼DŽᛇ㽕߯ᓎ⿟ᑣ㦰ऩ乍੠೒ᷛˈ䰸њ೼ShellObjectsⳂᔩ乍Ё⏏ࡴⳌ݇ݙᆍ໪ˈ䖬ৃՓ⫼CreateProgramFolder੠AddFolderIconㄝߑ᭄DŽབϟ䴶ⱘҷⷕ䖛⿟˖functionSetupFolders()NUMBERnResult;STRINGsvPath;beginsvPath=TARGETDIR^"MySDI.exe";//ᑨ⫼⿟ᑣⱘ䏃ᕘܼৡLongPathToQuote(svPath,TRUE);//Փ⫼䭓䏃ᕘৡ//߯ᓎ⿟ᑣ㦰ऩ86 InstallShieldㅔᯢՓ⫼ᬭ⿟AddFolderIcon("","៥ⱘऩ᭛ḷᑨ⫼⿟ᑣ",svPath,"","",0,"",REPLACE);//߯ᓎḠ䴶೒ᷛAddFolderIcon(FOLDER_DESKTOP,"៥ⱘऩ᭛ḷᑨ⫼⿟ᑣ",svPath,"","",0,"",REPLACE);file://nResult=CreateShellObjects("");//߯ᓎShellᇍ䈵return0;file://nResult;end;ǂǂৠḋˈ㢹া೼"ᓔྟ"->"⿟ᑣ"Ё߯ᓎϔϾ⿟ᑣ᭛ӊ།ˈݙ᳝"៥ⱘऩ᭛ḷᑨ⫼⿟ᑣ"੠"ReadMe"⿟ᑣ乍ˈ᳝߭ϟ߫ҷⷕ˖functionSetupFolders()NUMBERnResult;STRINGsvPath;begin//߯ᓎ⿟ᑣ᭛ӊ།CreateProgramFolder(SHELL_OBJECT_FOLDER);svPath=TARGETDIR^"MySDI.exe";//ᑨ⫼⿟ᑣⱘ䏃ᕘܼৡLongPathToQuote(svPath,TRUE);//Փ⫼䭓䏃ᕘৡ//೼⿟ᑣ᭛ӊ།ϟ߯ᓎ⿟ᑣ㦰ऩ乍AddFolderIcon(SHELL_OBJECT_FOLDER,"៥ⱘऩ᭛ḷᑨ⫼⿟ᑣ",svPath,"","",0,"",REPLACE);svPath="C:\Windows\NotePad.exe"+TARGETDIR^"ReadMe.txt";LongPathToQuote(svPath,TRUE);//ᇚ䏃ᕘৡϸ䖍ᦦܹᓩোAddFolderIcon(SHELL_OBJECT_FOLDER,"ReadMe",svPath,"","",0,"",REPLACE);file://nResult=CreateShellObjects("");return0;file://nResult;end;87 InstallShieldㅔᯢՓ⫼ᬭ⿟3.3⏏ࡴ੠ᬍ-------------------------------------------------------------------------------ǂǂϞ䗄⿟ᑣḚᶊ೼㓪䆥䖤㸠ৢˈϡӮ᳝ӏԩ᭛ӊ᭄᥂㹿໡ࠊˈ಴Ў䆹ᅝ㺙乍Ⳃ䖬াᰃϔϾぎⱘḚᶊDŽ᠔ҹˈᅗ䖬䳔㽕⫼᠋䗮䖛InstallShieldⱘᓔথ⦃๗ᇍⳌ݇᭛ӊǃ᭛ӊ㒘ǃ㒘ӊǃ⿟ᑣ㦰ऩ乍੠೒ᷛ䖯㸠⏏ࡴ៪ᬍㄝ᪡԰ˈᑊϨ䖬䳔೼⧚㾷⿟ᑣḚᶊⱘ෎⸔Ϟˈ⏏ࡴϔᅮⱘҷⷕᴹᅠ୘ᅝ㺙⿟ᑣⱘࡳ㛑ˈབՓᑣ߫ো᳝ᬜㄝDŽЎভ䗄ᮍ䍋㾕ˈ䖭䞠ҹࠡ䴶⫼ProjectWizard߯ᓎⱘ"YourApplicationName"ᅝ㺙乍ⳂЎ՟DŽ3.3.1᭛ӊǃ᭛ӊ㒘੠㒘ӊⱘᬍǂǂ೼InstallShieldЁˈϔϾ㒘ӊࣙ৿㢹ᑆϾ᭛ӊ㒘ˈϔϾ᭛ӊ㒘ࣙ৿㢹ᑆϾ᭛ӊDŽᑊϨˈ⫼᠋ৃҹ䗮䖛InstallShieldⱘᓔথ⦃๗ЁⱘⳌ݇ሲᗻՓᅗӀѦⳌ݇㘨䍋ᴹˈབ೒3.12᠔⼎DŽǂǂḍ᥂೒3.12᠔⼎ⱘ݇㘨ሲᗻˈ៥Ӏৃҹ԰ϟ߫ϔѯᬍDŽ1.ߴ䰸ϡ㽕ⱘ㒘ӊǂǂᠧᓔ"YourApplicationName"ᅝ㺙乍Ⳃˈᇚ乍ⳂᎹ԰ऎにষߛᤶࠄComponents义䴶ˈ䗝ᅮ㒘88 InstallShieldㅔᯢՓ⫼ᬭ⿟ӊ乍"ExampleFiles"ˈেߏ哴ᷛˈҢᔍߎⳌᑨⱘᖿ᥋㦰ऩЁ䗝ᢽ"Delete"㦰ऩҸˈߴ䰸䆹㒘ӊDŽᣝ㉏Ԑⱘ᪡԰ˈߴ䰸"HelpFiles"㒘ӊDŽ䖭ḋˈᅝ㺙乍ⳂЁা࠽ϟ"ProgramFiles"੠"SharedDLLs"㒘ӊDŽ2.ߴ䰸ϡ㽕ⱘ᭛ӊ㒘ǂǂᇚ乍ⳂᎹ԰ऎにষߛᤶࠄFileGroups义䴶ˈ䗝ᅮ᭛ӊ㒘乍"ExampleFiles"ˈেߏ哴ᷛˈҢᔍߎⳌᑨⱘᖿ᥋㦰ऩЁ䗝ᢽ"Delete"㦰ऩҸˈߴ䰸䆹᭛ӊ㒘DŽᣝ㉏Ԑⱘ᪡԰ˈߴ䰸"HelpFiles"੠"ProgramDLLs"᭛ӊ㒘DŽ䖭ḋˈᅝ㺙乍ⳂЁা࠽ϟ"ProgramExecutableFiles"੠"SharedDLLs"᭛ӊ㒘DŽ3.৥᭛ӊ㒘Ё⏏ࡴ᭛ӊᇚ乍ⳂᎹ԰ऎにষߛᤶࠄFileGroups义䴶ˈሩᓔ᠔᳝ⱘ᭛ӊ㒘乍DŽ䗝ᅮ"ProgramExecutableFiles"ⱘ"Links"乍ˈেߏ哴ᷛˈҢᔍߎⳌᑨⱘᖿ᥋㦰ऩЁ䗝ᢽ"InsertFiles"㦰ऩҸDŽ䖭䞠ҹVisualC++߯ᓎⱘऩ᭛ḷᑨ⫼⿟ᑣⱘMySDI.exeЎ՟ˈᇚMySDI.exe(Release⠜ᴀ)᭛ӊ䇗ܹDŽ䖬᳝ˈ䳔㽕೼"SharedDLLs"᭛ӊ㒘ЁᇚWindowsSystem᭛ӊ།ϟⱘmfc42.dll੠msvcrt.dll䇗ܹDŽ4.৥㒘ӊЁ⏏ࡴ᭛ӊ㒘ǂǂᇚ乍ⳂᎹ԰ऎにষߛᤶࠄComponents义䴶ˈ䗝ᅮ㒘ӊ乍"ProgramFiles"ˈঠߏে䖍にষЁⱘ"IncludeFileGroups"ᄫ↉ˈᔍߎབ೒3.13᠔⼎ⱘሲᗻᇍ䆱ḚDŽ89 InstallShieldㅔᯢՓ⫼ᬭ⿟ǂǂ೼䆹ᇍ䆱ḚЁऩߏ[Add]ᣝ䪂ˈজᔍߎϔϾᇍ䆱ḚˈҢ䆹ᇍ䆱Ḛⱘ᭛ӊ㒘߫㸼Ё䗝ᅮ"ProgramExecutableFiles"ˈऩߏ[OK]ᣝ䪂DŽ✊ৢݡऩߏሲᗻᇍ䆱Ḛⱘ[⹂ᅮ]ᣝ䪂ˈ᭛ӊ㒘"ProgramExecutableFiles"ህ੠㒘ӊ"ProgramFiles"݇㘨䍋ᴹDŽ㉏Ԑⱘˈᇚ"SharedDLLs"᭛ӊ㒘Ϣ"SharedDLLs"㒘ӊⳌ݇㘨DŽǂǂ䳔㽕䇈ᯢⱘᰃˈ㒘ӊЁⱘᄫ↉"Overwrite"ሲᗻ䍋ⴔ䴲ᐌ݇䬂ⱘ԰⫼ˈ಴Ўᅗއᅮњ೼᭛ӊ໡ࠊᯊⱘ㽚Ⲫ⡍ᕕDŽ㔎ⳕᯊᰃ"ALWAYSOVERWRITE"ˈᅗⱘᛣᗱᰃ˖ᘏᰃᇚ⑤᭛ӊ㽚Ⲫᴎ఼ЁᏆ᳝ⱘ᭛ӊDŽ䖭ḋህ᳝ৃ㛑ᇚϔѯḍᴀϡ㛑Ꮉ԰ⱘ㗕⠜ᴀ᭛ӊ㽚Ⲫᴎ఼ЁᏆ᳝ᮄ⠜ᴀ᭛ӊDŽЎℸˈ៥Ӏ䳔㽕ᇚ㒘ӊⱘ"Overwrite"ؐ䖯㸠᳈ᬍˈᇸ݊ᰃ"SharedDLLs"㒘ӊDŽǂǂঠߏ"SharedDLLs"㒘ӊⱘ"Overwrite"ᄫ↉ˈᔍߎབ೒3.14ⱘሲᗻᇍ䆱ḚDŽ೼䆹ᇍ䆱Ḛⱘ㒘ড়ḚЁ䗝ᢽ㽕㽚Ⲫⱘ⡍ᗻ㉏ൟˈ䗮ᐌ៥Ӏ䗝ᢽབ೒3.14᠔⼎ⱘ㉏ൟˈᑊ䖯㸠བ೒3.14᠔⼎ⱘ䆒㕂DŽ䖭ḋˈা᳝⑤᭛ӊ↨⫼᠋ᴎ఼ЁⱘⳌৠ᭛ӊ݋᳝ᮄⱘᯊ䯈੠催ⱘ⠜ᴀᯊᠡ㽚Ⲫॳ᭛ӊDŽ90 InstallShieldㅔᯢՓ⫼ᬭ⿟3.3.2⏏ࡴShellᇍ䈵ǂǂЎњ㛑䗮䖛㞾ᅮНߑ᭄SetupFoldersЁⱘCreateShellObjectsߑ᭄߯ᓎ⿟ᑣ㦰ऩ乍៪Ḡ䴶೒ᷛˈ៥Ӏ䳔㽕೼Ꮉ԰ऎにষResources义䴶ⱘShellObjectsⳂᔩ乍Ё⏏ࡴⳌ݇ݙᆍDŽǂǂ䳔㽕䇈ᯢⱘᰃ˖೼Windows㋏㒳ЁˈShell䗮ᐌᣛ䌘⑤ㅵ⧚఼੠⿟ᑣㅵ⧚఼ⱘ໪໇DŽሩᓔShellobjectsϟⱘ᠔᳝Ⳃᔩ乍ˈᔧ⫼᠋েߏᶤϾⳂᔩ乍ᯊˈ䖬ᇚᔍߎⳌᑨⱘᖿ᥋㦰ऩDŽ䗮䖛ᅗӀ⫼᠋ৃҹ೼䌘⑤ㅵ⧚఼໪໇(⫼ѢWindows95/98੠WindowsNT4.0ঞ݊ҹৢ᪡԰㋏㒳Ё)ϟ߯ᓎ⿟ᑣ᭛ӊ།(FolderҸ)៪ᖿ᥋ᮍᓣ(ShortcutҸ)ˈ೼⿟ᑣㅵ⧚఼໪໇(⫼ѢWindows3.1੠WindowsNT3.51᪡԰㋏㒳Ё)ϟ߯ᓎ⿟ᑣ㒘(GroupҸ)៪೒ᷛ(IconҸ)1.া೼"⿟ᑣ"㦰ऩЁ⏏ࡴ"៥ⱘऩ᭛ḷᑨ⫼⿟ᑣ"㦰ऩ乍݊ℹ偸བϟ˖(1)೼InstallShield䲚៤ᓔথ⦃๗ЁˈᇚᎹ԰ऎにষߛᤶࠄResources义䴶ˈᑊሩᓔShellObjects91 InstallShieldㅔᯢՓ⫼ᬭ⿟Ⳃᔩ乍Ё᠔᳝ⱘᄤ乍ˈབ೒3.15᠔⼎DŽ(2)䗝ᅮ"StartMenu"ϟⱘ"Programs"ᄤ乍ˈেߏ哴ᷛˈҢᔍߎⱘᖿ᥋㦰ऩЁ䗝ᢽ"New"->"Shortcut"(ᖿ᥋ᮍᓣ)㦰ऩҸˈℸᯊӮ೼"Programs"Ⳃᔩ乍ϟ⏏ࡴϔϾৡЎ"NewShortcut-1"(3)䗝ᅮ߮ᠡⱘ"NewShortcut-1"ˈেߏ哴ᷛˈҢᔍߎⱘᖿ᥋㦰ऩЁ䗝ᢽ"Rename"ˈᇚ"NewShortcut-1"ᬍЎ"App"DŽऩߏ"App"ˈᇚ೼ে䖍にষЁᰒ⼎݊ሲᗻݙᆍˈབ೒3.16᠔⼎DŽ(4)ঠߏে䖍にষЁⱘᄫ↉ৡˈབ"ShortcutText"ˈ߭ᔍߎབ೒3.17᠔⼎ⱘሲᗻᇍ䆱ḚDŽऩߏ[>>]ᣝ䪂ᇚҢᄫヺІ䌘⑤Ё䗝ᢽϔϾᄫヺІ԰Ўᖿ᥋ᮍᓣⱘৡ⿄DŽ(5)೼䖭Ͼᇍ䆱ḚЁˈ⫼᠋ৃҹ᳈ᬍ᠔᳝"Shortcut"ሲᗻˈ݊৿Н੠㒧ᵰབ㸼3.1᠔⼎DŽ92 InstallShieldㅔᯢՓ⫼ᬭ⿟2.೼Ḡ䴶Ϟ⏏ࡴ"MySDI"ᖿ᥋೒ᷛǂǂ݊ℹ偸བϟ˖(1)೼InstallShield䲚៤ᓔথ⦃๗ЁˈᇚᎹ԰ऎにষߛᤶࠄResources义䴶ˈᑊሩᓔShellObjectsⳂᔩ乍Ё᠔᳝ⱘᄤ乍DŽ(2)䗝ᅮ"Desktop"Ⳃᔩ乍ˈেߏ哴ᷛˈҢᔍߎⱘᖿ᥋㦰ऩЁ䗝ᢽ"New"->"Shortcut"(ᖿ᥋ᮍᓣ)㦰ऩҸˈℸᯊӮ"Desktop"Ⳃᔩ乍ϟ⏏ࡴϔϾৡЎ"NewShortcut-1"(3)䗝ᅮ߮ᠡⱘ"NewShortcut-1"ˈেߏ哴ᷛˈҢᔍߎⱘᖿ᥋㦰ऩЁ䗝ᢽ"Rename"ˈᇚ"NewShortcut-1"ᬍЎ"App"DŽऩߏ"App"ˈᇚ೼ে䖍にষЁᰒ⼎݊ሲᗻݙᆍDŽ(4)䗮䖛ሲᗻᇍ䆱ḚᇍⳌ݇ݙᆍ䖯㸠ᬍˈ㒧ᵰབ೒3.18᠔⼎DŽ93 InstallShieldㅔᯢՓ⫼ᬭ⿟3.߯ᓎ⿟ᑣ᭛ӊ།ǂǂ԰Ў⼎՟ˈ䖭䞠߯ᓎϔϾৡЎ"YourApplicationName"⿟ᑣ᭛ӊ།ˈ᭛ӊ།Ёࣙ৿"៥ⱘऩ᭛ḷᑨ⫼⿟ᑣ"ঞ"ReadMe"ϸϾᖿ᥋ᮍᓣDŽ݊ℹ偸བϟ˖(1)೼InstallShield䲚៤ᓔথ⦃๗ЁˈᇚᎹ԰ऎにষߛᤶࠄResources义䴶ˈᑊሩᓔShellObjectsⳂᔩ乍Ё᠔᳝ⱘᄤ乍DŽ(2)䗝ᅮ"StartMenu"ϟⱘ"Programs"ᄤ乍ˈেߏ哴ᷛˈҢᔍߎⱘᖿ᥋㦰ऩЁ䗝ᢽ"New"->"Folder"(᭛ӊ།)㦰ऩҸˈℸᯊӮ"Programs"Ⳃᔩ乍ϟ⏏ࡴϔϾৡЎ"NewFolder-1"(3)䗝ᅮ߮ᠡⱘ"NewFolder-1"ˈেߏ哴ᷛˈҢᔍߎⱘᖿ᥋㦰ऩЁ䗝ᢽ"Rename"ˈᇚ"NewFolder-1"ᬍЎ"AppFolder"DŽऩߏ"AppFolder"ˈᇚ೼ে䖍にষЁᰒ⼎݊ሲᗻݙᆍDŽ(4)ঠߏে䖍にষЁⱘᄫ↉ৡˈབ"DisplayedFolderName"ˈ߭ᔍߎབ೒3.19᠔⼎ⱘሲᗻᇍ䆱ḚDŽ(5)ऩߏ[>>]ᣝ䪂ᇚҢᄫヺІ䌘⑤Ё䗝ᢽ"PRODUCT_NAME"԰Ў⿟ᑣ᭛ӊ།ⱘৡ⿄DŽऩߏ[⹂ᅮ]ᣝ䪂݇䯁䆹ᇍ䆱ḚDŽ⬅Ѣ⫼᠋೼ᅝ㺙ᇍ䆱ḚЁᣛᅮⱘ⿟ᑣ᭛ӊ།ৡᄬѢSHELL_OBJECT_FOLDER㋏㒳ব䞣Ёˈ಴㗠᳔དᇚ"DisplayedFolderName"ሲᗻ䆒ЎDŽ94 InstallShieldㅔᯢՓ⫼ᬭ⿟(6)ݡ⃵䗝ᅮ"AppFolder"乍ˈেߏ哴ᷛˈҢᔍߎⱘᖿ᥋㦰ऩЁ䗝ᢽ"New"->"Shortcut"㦰ऩҸˈЎ䆹Ⳃᔩ乍ϟ߯ᓎϸϾᖿ᥋ᮍᓣ"៥ⱘऩ᭛ḷᑨ⫼⿟ᑣ"੠"ReadMe"ˈ݊Ё"ReadMe"㒧ᵰབ೒3.20᠔⼎DŽ3.3.3Փ⫼ᄫヺІ䌘⑤ǂǂҢϞ䗄ⱘ䖛⿟ৃҹᕫⶹˈ೼㛮ᴀ⿟ᑣ੠ᓔথ⦃๗ⱘⳌ݇ሲᗻЁՓ⫼ᄫヺІ䌘⑤៪ᄫヺІ㋏㒳ব䞣ⱘ㾘߭ᰃϡৠⱘDŽЎњভ䗄ᮍˈ៥Ӏܜᴹ߯ᓎϔϾᮄⱘᄫヺІ䌘⑤DŽ1.߯ᓎᮄⱘᄫヺІ䌘⑤ǂǂ݊ℹ偸བϟ˖(1)ᇚᎹ԰ऎにষߛᤶࠄ"Resources"义䴶ˈሩᓔ"StringTable"Ⳃᔩ乍ϟⱘ᠔᳝ᄤ乍ˈऩߏ"English"ˈᇚ೼ে䖍にষЁߎ⦄䆹䇁㋏ϟⱘᄫヺІ㸼DŽ(2)೼ে䖍にষЁেߏ哴ᷛˈҢᔍߎⱘᖿ᥋㦰ऩЁ䗝ᢽ"New"Ҹˈߎ⦄བ೒3.21᠔⼎ⱘᇍ䆱ḚDŽ95 InstallShieldㅔᯢՓ⫼ᬭ⿟(3)೼"StringIdentifier"㓪䕥ḚЁ䬂ܹ㽕⏏ࡴⱘᄫヺІᷛ䆚MY_APP_NAMEˈ೼"Value"㓪䕥ḚЁ䕧ܹ䆹ᄫヺІⱘؐ"MySingleDocumentApplication"ˈऩߏ[OK]ᣝ䪂DŽ(4)䖭ḋˈህ೼English䇁㋏ϟⱘᄫヺІ㸼Ё⏏ࡴњϔϾᄫヺІMY_APP_NAME2.೼㛮ᴀ⿟ᑣЁՓ⫼ǂǂЎњ㛑೼㛮ᴀ⿟ᑣЁՓ⫼߮ᠡ߯ᓎⱘMY_APP_NAMEᄫヺІؐˈ⫼᠋ᖙ乏೼䆹ᄫヺІৡࠡࡴϞ@ヺোˈ՟བϟ䴶ⱘҷⷕ˖MessageBox(@MY_APP_NAME,INFORMATION);㒧ᵰᰒ⼎ᔍߎϔϾ⍜ᙃᇍ䆱Ḛˈᰒ⼎ߎ"MySingleDocumentApplication"ⱘݙᆍDŽ䳔㽕䇈ᯢⱘᰃˈ㢹೼㛮ᴀ⿟ᑣЁՓ⫼㋏㒳ⱘᄫヺІব䞣(བTARGETDIR)ˈ߭Ⳉ᥹䖯㸠ᓩ⫼DŽ3.೼ᓔথ⦃๗ⱘⳌ݇ሲᗻЁՓ⫼ǂǂ೼ᓔথ⦃๗ⱘⳌ݇ሲᗻЁՓ⫼ࠡ䴶߯ᓎⱘMY_APP_NAMEᄫヺІؐˈ⫼᠋া䳔Ⳉ᥹ᓩ⫼ेৃˈ䆌໮ሲᗻᇍ䆱Ḛ䖬ᦤկ[>>]ᣝ䪂⫼ᴹ䖯㸠ᓩ⫼ᄫヺІ䌘⑤ⱘ᪡԰DŽԚ䳔㽕䇈ᯢⱘᰃˈ㢹೼ᓔথ⦃๗ⱘⳌ݇ሲᗻЁՓ⫼㋏㒳ⱘᄫヺІব䞣(བTARGETDIR)ˈ߭䳔㽕⫼"<>"ヺোᇚ݊ᣀ䍋ᴹˈབDŽ3.3.4Փᑣ߫ো᳝ᬜǂǂ೼㛮ᴀ᭛ӊSetup.rulЁˈ㞾ᅮНߑ᭄DialogShowSdRegisterUserExᰃ⫼ᴹᰒ⼎⫼᠋⊼ݠᙃ96 InstallShieldㅔᯢՓ⫼ᬭ⿟ᇍ䆱Ḛˈᅗ㽕∖⫼᠋䕧ܹ⫼᠋ྦྷৡǃ݀ৌৡ⿄ҹঞᑣ߫োㄝݙᆍˈབ೒3.22᠔⼎DŽǂǂ೼䆹ᇍ䆱ḚЁˈা᳝ᔧ⫼᠋ܼ䚼䕧ܹ᠔᳝ݙᆍৢˈᇍ䆱Ḛⱘ[Next]ᠡ㛑㹿Փ⫼DŽԚ䖭䞠ⱘᑣ߫োᰃϡ䍋԰⫼ⱘˈгህᰃ䇈ˈϡㅵ⫼᠋䬂ܹҔМḋⱘᑣ߫োˈᅝ㺙䖛⿟䛑Ӯℷᐌ䖯㸠DŽЎℸˈ៥Ӏ೼DialogShowSdRegisterUserExߑ᭄ҷⷕЁ⏏ࡴϟ߫ҷⷕˈՓᑣ߫ো᳝ᬜˈे䬂ܹⱘᑣ߫ো㢹ㄝѢᶤϾؐ(䖭䞠ЎDYH425-1234567)ˈᠡ㛑䖯㸠ϟϔℹⱘᅝ㺙DŽfunctionDialogShowSdRegisterUserEx()NUMBERnResult;STRINGszTitle,szMsg;beginsvName="";svCompany="";szTitle="";szMsg="";Dlg_Register:nResult=SdRegisterUserEx(szTitle,szMsg,svName,svCompany,svSerial);if(nResult=NEXT)thenif(StrCompare(svSerial,"DYH425-1234567")!=0)thenMessageBox("䕧ܹⱘᑣ߫ো"+svSerial+"ϡℷ⹂ʽ",WARNING);gotoDlg_Register;endif;endif;returnnResult;end;97 InstallShieldㅔᯢՓ⫼ᬭ⿟ǂǂ䳔㽕䇈ᯢⱘᰃˈϔᮺᅝ㺙乍Ⳃⱘᶤѯݙᆍ(䰸㛮ᴀ⑤⿟ᑣ໪)㹿ᬍࡼˈህᖙ乏೼㓪䆥੠䖤㸠ᅝ㺙⿟ᑣࠡˈ䖯㸠ၦҟⱘ߯ᓎ᪡԰ˈ䖭ḋᠡ㛑䆕ᬍ᳝ᬜDŽ3.3.5ߑ᭄৥ᇐǂǂ೼䬂ܹϞ䗄ҷⷕ䖛⿟Ёˈ⫼᠋ৃҹ䗮䖛ߑ᭄৥ᇐᖿ䗳᳝ᬜഄ೼㛮ᴀ᭛ӊЁ⏏ࡴ䇗⫼InstallShieldݙ䚼ߑ᭄ⱘ䇁হDŽՓ⫼ߑ᭄৥ᇐᯊˈܜ㽕ᇚ乍ⳂᎹ԰ऎにষߛᤶࠄ"Scripts"义䴶ˈᑊᇚ᭛ᴀܝᷛ⿏㟇㽕⏏ࡴⱘ䇁হ᠔೼ⱘԡ㕂໘ˈ✊ৢ⫼ϟ߫ϸ⾡ᮍ⊩ᠧᓔߑ᭄৥ᇐ˖(1)েߏ哴ᷛˈҢᔍߎⱘᖿ᥋㦰ऩЁ䗝ᢽ"FunctionWizard..."ҸDŽ(2)Ⳉ᥹ऩߏInstallShieldᓔথ⦃๗Ꮉ݋ᷣϞⱘ"FunctionWizard"Ꮉ݋ᣝ䪂DŽǂǂϔᮺᠧᓔߑ᭄৥ᇐˈᇚᠻ㸠ϟ߫䖛⿟˖ǂǂ佪ܜˈߎ⦄བ೒3.23᠔⼎ⱘ"Step1"ᇍ䆱ḚDŽ೼䆹ᇍ䆱ḚЁˈ⫼᠋ৃҹ䗮䖛䗝ᢽᎺ䖍߫㸼ḚЁⱘߑ᭄㉏ൟˈ೼ে䖍ⱘ߫㸼ḚЁᡒࠄ᠔㽕⏏ࡴⱘߑ᭄ৡDŽ98 InstallShieldㅔᯢՓ⫼ᬭ⿟ǂǂ✊ৢˈऩߏ[ϟϔℹ]ᣝ䪂ˈߎ⦄བ೒3.24᠔⼎ⱘ"Step2"ᇍ䆱ḚDŽ೼䆹ᇍ䆱ḚЁˈ⫼᠋ৃҹ฿ܹⳌᑨⱘᅲখDŽ޵ᰃ᳝㒘ড়Ḛⱘˈ䛑ৃҹҢЁ䗝ᢽ㋏㒳乘ᅮНⱘؐDŽ᳔ৢˈऩߏ[ᅠ៤]ᣝ䪂ˈህӮ೼ᔧࠡ᭛ᴀܝᷛ᠔೼ⱘԡ㕂໘⏏ࡴⳌᑨⱘߑ᭄䇁হDŽ99 InstallShieldㅔᯢՓ⫼ᬭ⿟3.4䗝ᢽၦҟথᏗǂǂᔧᅝ㺙乍Ⳃⱘ᠔᳝ⱘݙᆍ㹿㓪䆥ৢˈ㢹≵᳝ӏԩ䫭䇃ˈ៥Ӏህৃҹ䗮䖛MediaBuildWizard߯ᓎ䗖ᔧⱘၦҟᴹথᏗᅝ㺙⿟ᑣDŽ3.4.1Փ⫼MediaBuild৥ᇐǂǂϔ㠀ᴹ䇈ˈᇍѢ໻ൟᑨ⫼⿟ᑣᕔᕔ䗝ᢽCD_ROMၦҟᴹথᏗˈ㗠ᇍѢᇣൟᑨ⫼⿟ᑣ߭ᕔᕔ䗝ᢽ3.5㣅ᇌ䕃Ⲭ(1.44MB)ᴹথᏗDŽ߯ᓎၦҟⱘ䖛⿟བϟ˖(1)⫼ϟ䴶ⱘϝ⾡ᮍᓣПϔਃࡼMediaBuildWizardǂǂǂ䗝ᢽ"Build"㦰ऩ"->"MediaBuildWizard"Ҹ;ǂǂǂऩߏInstallShieldᓔথ⦃๗Ꮉ݋ᷣϞⱘ"MediaBuild"Ꮉ݋ᣝ䪂DŽǂǂǂᇚInstallShield乍ⳂᎹ԰ऎにষߛᤶࠄ"Media"义䴶ˈऩߏ"MediaBuildWizard"乍ˈ៪েߏ哴ᷛˈҢᖿ᥋㦰ऩЁ䗝ᢽ"MediaBuildWizard..."ҸDŽ(2)MediaBuildWizardਃࡼৢˈߎ⦄"MediaName"ᇍ䆱ḚDŽ⫼᠋೼"MediaName"㓪䕥ḚЁৃᣛᅮϔϾᮄⱘၦҟৡ⿄DŽ(3)⬭㔎ⳕؐˈऩߏ[ϟϔℹ]ᣝ䪂ˈߎ⦄"DiskType"ᇍ䆱ḚDŽ೼⺕Ⲭ㉏ൟ߫㸼Ёˈ⫼᠋ৃҹ䗝ᢽϡৠⱘၦҟ㉏ൟDŽ݊Ёˈ"singlediskimage"⫼Ѣᇚ᭛ӊᠧࣙ೼ৠϔᓴ⺕ⲬЁˈৃ䖯㸠Ѡ⃵य़㓽DŽ(4)⬭㔎ⳕؐˈऩߏ[ϟϔℹ]ᣝ䪂ˈߎ⦄"BuildType"ᇍ䆱ḚDŽ䗝Ё"FullBuild"乍ᇚܼ䚼߯ᓎ᠔䳔㽕ⱘ᭛ӊ᭄᥂ˈ݊Ёࣙᣀय़㓽ᑨ⫼⿟ᑣⱘ᠔᳝᭛ӊˈ߯ᓎCAB᭛ӊঞSetup.exe᭛ӊㄝDŽ䗝Ё"QuickBuild"乍ˈᇚ⌟䆩੠Ẕᶹᅝ㺙⿟ᑣᰃ৺ᣝ乘ᳳⱘᮍᓣ䖯㸠DŽऩߏ[Advanced...]ᣝ䪂ˈ߭ᔍߎⳌᑨⱘ催㑻ሲᗻᇍ䆱Ḛˈܕ䆌⫼᠋䆒㕂ষҸǃ᭛ӊⱘᯊ䯈/᮹ᳳǃၦҟ߯ᓎⱘⳂᷛԡ㕂ㄝሲᗻDŽ(5)⬭㔎ⳕؐˈऩߏ[ϟϔℹ]ᣝ䪂ˈߎ⦄"TagFile"ᇍ䆱ḚDŽᅗ⫼ᴹ䕧ܹ݀ৌৡ⿄ঞ݊ҪϢᑨ⫼⿟ᑣⳌ݇ⱘᙃˈ䖭ѯᙃᇚᄬ೼Data.tag᭛ӊЁDŽ(6)⬭㔎ⳕؐˈऩߏ[ϟϔℹ]ᣝ䪂ˈߎ⦄"Platforms"(᪡԰ᑇৄ)ᇍ䆱ḚDŽ(7)⬭㔎ⳕؐˈऩߏ[ϟϔℹ]ᣝ䪂ˈߎ⦄"Summary"(ᨬ㽕)ᇍ䆱ḚDŽ䖭䞠߫ߎࠡ䴶⫼᠋ᣛᅮⱘ䗝乍ˈ㢹⫼᠋ϡ⒵ᛣ䖬ৃऩߏ[Ϟϔℹ]ᣝ䪂䞡ᮄ䖯㸠䗝ᢽDŽ(8)ऩߏ[ᅠ៤]ᣝ䪂ˈInstallShieldᇚḍ᥂⫼᠋ⱘ䗝ᢽ߯ᓎⳌᑨⱘၦҟDŽ䖭ᯊ⫼᠋䖬ৃⳟࠄϔϾ100 InstallShieldㅔᯢՓ⫼ᬭ⿟"BuildingMedia"ᇍ䆱ḚDŽϔᮺၦҟ߯ᓎᅠ↩ˈ⫼᠋ৃᣝ[Finish]ᣝ䪂㒧ᴳMediaBuildWizard3.4.2থ䗕ࠄᅲ䰙ⱘၦҟЁǂǂᔧϔϾၦҟ߯ᓎᅠ៤ˈᑊϨᅝ㺙乍Ⳃ㹿ℷ⹂㓪䆥ৢˈህৃᇚ݊থ䗕ࠄᅲ䰙ⱘၦҟЁDŽ䖭䞠ҹ߮ᠡ߯ᓎⱘ"NewMedia"Ў՟ˈ䇈ᯢথ䗕ⱘ䖛⿟DŽ(1)ᇚInstallShield乍ⳂᎹ԰ऎにষߛᤶࠄ"Media"义䴶ˈᇚӮⳟࠄ߮ᠡⱘ"NewMedia"ˈ䗝ᅮℸ乍ᑊেߏ哴ᷛˈҢᔍߎⱘᖿ᥋㦰ऩЁ䗝ᢽ"SendMediaTo..."ҸDŽ(2)ᔍߎ"SelectType"ᇍ䆱ḚDŽᅗ⫼ᴹᣛᅮᇚၦҟ᭛ӊ໡ࠊࠄ⹀Ⲭ䖬ᰃ䕃ⲬЁDŽ(3)䗝Ё"Copyeach’disk’inthemediatoaremovabledisk"(໡ࠊࠄ䕃Ⲭ)乍ˈऩߏ[ϟϔℹ]ᣝ䪂ˈᔍߎ"SelectRemovableDrive"ᇍ䆱ḚDŽ㢹᳝ϔϾҹϞⱘ䕃偅ˈ⫼᠋ৃҢ㒘ড়Ḛ䖯㸠䗝ᢽDŽ(4)ऩߏ[ϟϔℹ]ᣝ䪂ˈᔍߎ"Status"(⢊ᗕᙃ)ᇍ䆱ḚDŽऩߏ[Start]ᣝ䪂ˈ㋏㒳ᇚḍ᥂䳔㽕ᦤ⼎⫼᠋ᦦܹϔᓴḐᓣ࣪䖛ⱘぎⱑ䕃Ⲭˈᑊᓔྟ໡ࠊⳌ݇᭛ӊ᭄᥂DŽ(5)ϔᮺ᭛ӊ᭄᥂໡ࠊᅠ៤ৢˈߎ⦄"Status"ᇍ䆱ḚDŽऩߏ[Close]ᣝ䪂݇䯁ᇍ䆱Ḛˈᅠ៤ၦҟথ䗕䖛⿟DŽǂǂ㢹⫼᠋㾝ᕫϞ䗄䖛⿟↨䕗咏⚺ˈৃⳈ᥹ᇚC:MyInstallationsYourApplicationNameMediaNewMediaDiskImagesdisk1᭛ӊ།Ёⱘݙᆍ໡ࠊࠄ䕃ⲬЁDŽ䳔㽕⊼ᛣⱘᰃˈ㢹߯ᓎⱘၦҟ᭄᥂ϡℶϔᓴ䕃Ⲭᯊˈ㋏㒳Ӯᇚ᭄᥂ձ⃵ᄬܹdisk1ǃdisk2ǃdisk3...ㄝ᭛ӊ།ЁDŽǂǂᴀゴҢᑨ⫼㾦ᑺᇍ෎ᴀᅝ㺙⿟ᑣⱘᓎゟ䖛⿟԰⏅ܹ㒚㟈ⱘ䅼䆎ˈՓ⫼᠋ϡ䳔㽕໾໮ⱘ㛮ᴀ⿟ᑣ㓪ݭህৃᇍϔ㠀ᑨ⫼⿟ᑣ䖯㸠ࣙ㺙থᏗDŽԚᰃˈ㢹ҙҙᥠᦵϞ䗄ᡔᎻ߭䖰䖰ϡ໳ˈ಴ЎϔϾߎ㡆ⱘᅝ㺙䕃ӊ䖬ᑨ᳝݊⣀ࠄП໘ˈབᵰ≵᳝߯ᛣˈ䙷া㛑ᰃϔ⾡䞡໡ࢇࡼDŽ಴ℸˈҢϟϔゴᓔྟ䍋ˈ៥Ӏᇚህᅝ㺙⬠䴶ⱘᅮࠊ䆱乬԰䖯ϔℹ᥶䅼DŽ101 InstallShieldㅔᯢՓ⫼ᬭ⿟㄀㄀㄀4ゴゴゴᅝ㺙⬠䴶ⱘ䆒䅵ǂǂࠡ䴶䅼䆎ⱘᇍ䆱Ḛ೼ᅝ㺙⿟ᑣЁ䍋ⴔ䴲ᐌ䞡㽕ⱘ԰⫼ˈᅗӀϡҙৃҹ㦋ᕫ⫼᠋䗝ᅮⱘᅝ㺙䏃ᕘǃ䳔㽕ᅝ㺙ⱘ㒘ӊঞ⿟ᑣ㦰ऩ乍ˈ㗠Ϩ䖬ৃҹ⫼Ѣᆚⷕ੠ᑣ߫োⱘẔ⌟ㄝDŽԚ䖭ѯᇍ䆱ḚᰃЎ᳔ৢⱘ᭛ӊ᭄᥂ᅝ㺙԰ޚ໛ⱘˈ಴ℸҢ঺ϔϾ㾦ᑺᴹ䇈ˈ⫼᠋ⱘ᳔㒜䆘Ӌ䰸њপއѢᇍ䆱Ḛⱘ⬠䴶ᬜᵰ໪ˈ೼ᕜ໻⿟ᑺϞ䖬পއѢ᳔ৢⱘᅝ㺙Џ⬠䴶ⱘདണDŽᔧ✊ˈЎњՓᅝ㺙⬠䴶݋᳝ϔᅮⱘ"Ͼᗻ"ˈ⫼᠋䖬䳔㽕೼InstallScript䇁㿔ⱘ෎⸔Ϟˈᣪᥬ݊䖤⫼㛑࡯ˈ᳔໻ഄথ᣹InstallShieldⱘ┰㛑DŽ4.1ὖὖὖ䗄䗄䗄ǂǂϢϔ㠀Windowsᑨ⫼⿟ᑣ⬠䴶Ⳍ↨ˈᅝ㺙⿟ᑣⱘ⬠䴶(ᇸ݊ᰃᅝ㺙Џ⬠䴶)㽕ㅔ⋕ᕫ໮DŽℷᰃ಴Ў䖭Ͼॳ಴ˈ៥Ӏ೼䆒䅵ᅝ㺙⬠䴶ᯊˈᇸ݊㽕㗗㰥㕢ᄺᮍ䴶ⱘ㽕∖DŽ4.1.1Џ⬠䴶ܗ㋴InstallShield5.5ᦤկⱘ೒ᔶ⬠䴶ܗ㋴ࣙᣀ˖ᔍߎにষǃ⍜ᙃ᭛ᴀǃᇍ䆱Ḛǃ೒ᷛǃԡ೒ǃໄ䷇ҹঞᕅڣㄝDŽৠḋˈ㒘៤ᅝ㺙Џ⬠䴶ⱘܗ㋴ϔ㠀гϡӮ䍙ߎ䖭ѯ㉏ൟDŽ೒4.1ᰃϔϾᐌ㾕ⱘᅝ㺙Џ⬠䴶˖102 InstallShieldㅔᯢՓ⫼ᬭ⿟ᅗ৿᳝䖭ḋⱘϔѯܗ㋴˖(1)Џᷛ乬ǂǂ೼ᅝ㺙Џ⬠䴶ЁˈЏᷛ乬ᕔᕔᰃᅝ㺙ⱘᑨ⫼⿟ᑣ៪䕃ӊⱘৡ⿄DŽϔ㠀ᚙމϟˈЏᷛ乬ⱘᄫԧᰃ᳔໻ⱘDŽ(2)㚠᱃ǂǂᅝ㺙Џ⬠䴶ⱘ㚠᱃ᕔᕔއᅮњ⬠䴶㾚㾝ᬜᵰⱘ෎䇗ˈᅗৃҹᰃ⫼᠋ᣛᅮⱘ⏤ব买㡆៪ᰃ㒃㡆DŽᔧ✊гৃҹ⫼ϔᓴ೒⠛԰Ў݊㚠᱃DŽ(3)ᑓਞ⠠InstallShieldܕ䆌⫼᠋೼᭛ӊ໡ࠊ䖛⿟ЁথᏗᑓਞ⠠DŽ᠔䇧ᑓਞ⠠ˈᰃᣛ䖭ḋⱘϔѯԡ೒៪ܗ᭛ӊ೒ڣˈᅗӀᰃ⫼ᴹᰒ⼎ϔߛ⫼Ѣ≳䗮ǃᑓਞǃ෍䆁ǃ▔থ݈䍷ҹঞᓩ䍋⊼ᛣⱘ᭛ᄫ៪೒⠛DŽ(4)䖯ሩᣛ⼎఼103 InstallShieldㅔᯢՓ⫼ᬭ⿟ǂǂ䖯ሩᣛ⼎఼ˈ乒ৡᗱНˈᅗᰃ⫼ᴹᰒ⼎᭛ӊᅝ㺙ⱘ䖯ᑺDŽᅗ᳝ϝ⾡㉏ൟˈϔ⾡ᰃ≵᳝[প⍜]ᣝ䪂ⱘᮻᓣᣛ⼎఼˗঺ϔ⾡ᰃা᳝[প⍜]ᣝ䪂ˈԚ≵᳝䖍Ḛ੠ᷛ乬ᷣⱘᣛ⼎఼˗䖬᳝ϔ⾡ᰃᏺ᳝[প⍜]ᣝ䪂ⱘ䖯ሩᇍ䆱ḚDŽ೒4.1ⱘ䖯ሩᣛ⼎఼ᰃ᳔ৢϔ⾡ⱘ䖯ሩᇍ䆱ḚDŽ(5)ᙃᣛ⼎఼ǂǂᙃᣛ⼎఼⫼ᴹড᯴ᅝ㺙䖛⿟ЁϝϾᮍ䴶ⱘᙃˈϔᰃ᭛ӊᏆ໡ࠊࠄⳂⱘԡ㕂ⱘⱒߚ↨ˈ঺ϔᰃ↣ᓴᅝ㺙Ⲭⱘ䖯ሩᚙމˈ᳔ৢᰃⳂⱘ偅ࡼ఼Ё᠔৿᳝ⱘৃ⫼ぎ䯈໻ᇣDŽབ೒4.2᠔⼎ˈᔧⳂⱘ偅ࡼ఼Ёৃ⫼ⱘぎ䯈໻ᇣԢѢᘏᆍ䞣ⱘ5%ˈ᳔েϟ㾦ⱘ"Low"ᇚব៤㑶㡆DŽ4.1.2Џ⬠䴶᪡԰ߑ᭄InstallShieldЎ⫼᠋ᦤկњϔѯߑ᭄⫼ᴹ䆒㕂ᅝ㺙Џ⬠䴶ⱘ⡍ᗻҹঞᇚ⬠䴶ܗ㋴೼Џ⬠䴶にষЁⱘᬒ㕂ԡ㕂DŽ㸼4.1߫ߎ䖭ѯߑ᭄ⱘᔶᓣঞ݊ࡳ㛑䇈:104 InstallShieldㅔᯢՓ⫼ᬭ⿟ǂǂ݊ЁEnableߑ᭄ᰃ᳔㒣ᐌՓ⫼ⱘˈᅗᰃ⫼ᴹ▔⌏ᑊᰒ⼎ᶤϾ⬠䴶ܗ㋴DŽ݊ॳൟབϟ˖Enable(nConstant);ǂǂ݊ЁˈnConstant㸼⼎㽕▔⌏ⱘ⬠䴶ܗ㋴ˈᅗৃҹᰃϟ߫ؐПϔ˖BACKBUTTON㸼⼎[Ϟϔℹ](Back)ᣝ䪂ˈ㔎ⳕᯊ䆹ᣝ䪂ᰃ㹿▔⌏DŽBACKGROUNDᔧᅝ㺙໘೼にষ῵ᓣϟᯊˈᰒ⼎ᅝ㺙⬠䴶ⱘ㚠᱃にষDŽBITMAP256COLORS▔⌏ԡ೒ⱘ256㡆䇗㡆ᵓDEFWINDOWMODE䆒㕂ᅝ㺙⬠䴶ⱘ㚠᱃にষᰃϔϾᐌ㾘ⱘǃৃ䇗ᭈ໻ᇣঞᏺᷛ乬ᷣⱘにষDŽᔧǂǂǂǂBACKGROUND㹿Enableৢˈ䆒㕂ⱘにষゟे᳝ᬜDŽFEEDBACK_FULL㸼⼎ᙃᣛ⼎఼DŽFULLWINDOWMODEᇚᅝ㺙⬠䴶ⱘ㚠᱃にষ᳔໻࣪DŽHOURGLASSᇚ哴ᷛᣛ䩜ব៤"≭ⓣൟ"ⱘㄝᕙܝᷛDŽINDVFILESTATUS೼䖯ሩᣛ⼎఼Ёᰒ⼎㹿Ӵ䗕ⱘ᭛ӊܼৡDŽNEXTBUTTON㸼⼎[ϟϔℹ](Next)ᣝ䪂ˈ㔎ⳕᯊ䆹ᣝ䪂ᰃ㹿▔⌏DŽSTATUS▔⌏ᷛޚ䖯ሩᣛ⼎఼ˈᙃᣛ⼎఼(㢹≵᳝㹿⽕⫼)гӮ㹿▔⌏DŽSTATUSDLG▔⌏ᇍ䆱Ḛᔶᓣⱘ䖯ሩᣛ⼎఼ˈᙃᣛ⼎఼(㢹≵᳝㹿⽕⫼)гӮ㹿▔⌏DŽSTATUSOLD▔⌏ᮻᓣⱘǃϡᏺ[প⍜]ᣝ䪂ⱘ䖯ሩᣛ⼎఼ˈᙃᣛ⼎఼(㢹≵᳝㹿⽕⫼)гӮ㹿▔⌏DŽǂǂ՟བ˖㢹㽕ᣛᅮᅝ㺙Џ⬠䴶ⱘ㚠᱃ᰃϔϾ᳔໻࣪ⱘにষˈ᳝߭ϟ߫ҷⷕ˖Enable(BACKGROUND);Enable(DEFWINDOWMODE);ǂǂ䳔㽕䇈ᯢⱘᰃˈ೼ϢEnableⳌᇍⱘDisableߑ᭄ЁˈᔶখnConstantⱘপؐ੠Enableߑ᭄105 InstallShieldㅔᯢՓ⫼ᬭ⿟ЁⱘnConstantᰃ෎ᴀⳌৠⱘDŽ4.1.3⬠䴶䆒䅵ⱘᐌ⫼ॳ߭ǂǂ⬠䴶䆒䅵Ёᐌ䙉ᕾⱘॳ᳝߭˖ᇍ↨ॳ߭ǃण䇗ॳ߭ǃᑇ㸵ॳ߭ǃФ䍷ॳ߭ㄝDŽ䖤⫼䖭ѯॳ߭ৃҹࡴᔎ⬠䴶ⱘ⇨⇯ǃ๲ࡴ਌ᓩ࡯ǃさߎ䞡ᖗǃᦤ催㕢ᛳDŽ݊ЁˈФ䍷ॳ߭ⱘ䞡㽕ᗻ䴲ৠᇣৃDŽ᠔䇧"Ф䍷"ॳ߭ᰃᣛᇍ⫼᠋ⱘᛝᙺᖗᚙⱘ㗗㰥ˈ䗮ᴹ䇈ህᰃᦤկҹ⫼᠋ЎЁᖗˈᦤ催݊㟦䗖ᛳDŽЎњ䙉ᕾ䖭Ͼॳ߭ˈ⫼᠋䳔㽕೼↨՟ǃᔎ䇗ǃޱ㘮ǃᠽᬷҹঞᔶᗕㄝ໮Ͼᮍ䴶ࡴҹ㗗㰥DŽ1.↨՟ǂǂ咘䞥ߚࡆ⚍(0.618)ˈг⿄咘䞥↨՟ˈᰃ⬠䴶䆒䅵Ё䴲ᐌ᳝ᬜⱘϔ⾡ᮍ⊩DŽ೼䆒䅵⠽ԧⱘ䭓ᑺǃᆑᑺǃ催ᑺঞ݊ൟᓣ੠ԡ㕂ᯊˈབᵰ㛑খ✻咘䞥↨՟ᴹ໘⧚ˈህ㛑ѻ⫳⡍᳝ⱘ〇ᅮ੠㕢ᛳDŽ2.ᔎ䇗ǂǂ೼ऩϔ亢Ḑⱘ⬠䴶Ёˈࡴܹ䗖ᔧⱘব࣪ˈህӮѻ⫳ᔎ䇗ⱘᬜᵰDŽᔎ䇗ৃᠧ⸈⬠䴶ⱘऩ䇗ᛳˈՓ⬠䴶বᕫ᳝ᳱ⇨ˈ՟བˈ⬠䴶ⱚЎ᭛ᄫ㓪ᥦˈⳟ䍋ᴹ㋶✊᮴ੇˈབᵰࡴϞᦦ೒៪✻⠛ˈህབϔ乫⷇ᄤ϶䖯ᑇ䴭ⱘ∈䴶ˈѻ⫳ϔ⊶ϔ⊶ⱘ⍳⓾DŽ3.ޱ㘮ϢᠽᬷǂǂҎӀⱘ⊼ᛣ࡯ᘏӮ⡍߿䲚Ёࠄџ⠽ⱘЁᖗ䚼ߚˈ䖭ህᵘ៤њ㾚㾝ⱘޱ㘮DŽϔ㠀㗠㿔ˈޱ㘮ൟⳟԐ⏽ᶨˈгᰃ䆌໮Ҏ᠔୰⃶䞛⫼ⱘᮍᓣˈԚᆍᯧ⌕Ѣᑇ޵DŽ⾏ᖗൟⱘᏗሔˈৃҹ⿄Ўᠽᬷൟᰃ݋᳝⦄ҷᛳⱘ㓪ᥦൟᓣDŽ4.ᔶᗕⱘᛣ䈵ǂǂ⬅Ѣ䅵ㅫᴎሣᐩⱘ䰤ࠊˈϔ㠀ⱘ㓪ᥦᔶᓣᘏᰃҹಯ䖍ᔶЎᷛޚᔶˈ݊Ҫ৘⾡ᔶᓣ䛑ሲѢᅗⱘবᔶDŽಯ㾦ⱚ៤Ⳉ㾦ˈ㒭Ҏҹᕜ㾘ᕟǃ㸼ᚙᇥⱘᛳ㾝ˈ݊Ҫⱘবᔶ߭ਜ⦄ߎᔶᔶ㡆㡆ⱘᛳ㾝ˈ䅀བ៤Ў䫤㾦ⱘϝ㾦ᔶ᳝䫤߽ǃ剰ᯢᛳˈ䖥Ѣ೚ⱘᔶ⢊᳝⏽੠ᶨᔅПᛳDŽⳌৠⱘ᳆㒓г᳝ϡৠⱘ㸼ᚙˈ՟བ⫼Ҿ఼⬏ߎᴹⱘ೚ˈ᳝⹀䋼ᛳˈ㗠ᕦ᠟⬏ߎᴹⱘ೚ህ᳝ᶨ੠ⱘ೚ᔶ᳆㒓П㕢DŽ5.ব࣪⥛ǂǂ೼⬠䴶䆒䅵Ёˈᖙ乏ḍ᥂ݙᆍᴹއᅮᷛ乬ⱘ໻ᇣDŽᷛ乬੠ℷ᭛໻ᇣⱘ↨⥛ህ⿄Ўব࣪⥛DŽব࣪⥛䍞໻ˈ⬠䴶䍞⌏⋐ˈব࣪⥛䍞ᇣˈ⬠䴶Ḑ䇗䍞催DŽձ✻䖭⾡ሎᑺᴹ㸵䞣ˈህᕜᆍᯧ߸ᮁ⬠䴶ⱘᬜᵰDŽ106 InstallShieldㅔᯢՓ⫼ᬭ⿟6.㾘ᕟᛳǂǂ݋᳝݅ৠॄ䈵ⱘᔶ⢊ড໡ᥦ߫ᯊˈህӮѻ⫳㾘ᕟᛳDŽϡϔᅮ㽕⫼ৠϔᔶ⢊ⱘϰ㽓ˈা㽕݋᳝ᔎ⚜ॄ䈵ህৃҹњDŽϝಯ⃵ⱘߎ⦄ህ㛑ѻ⫳䕏ⱘ㾘ᕟᛳDŽ᳝ᯊ׭াড໡Փ⫼ϸ⃵⡍ᅮⱘᔶ⢊ˈгӮѻ⫳㾘ᕟᛳDŽ㾘ᕟᛳ೼䆒䅵ϔϾ䕃ӊᯊˈৃҹՓ⫼᠋ᕜᖿഄ❳ᙝ㋏㒳ˈᥠᦵ᪡԰ᮍ⊩DŽ䖭ϔ⚍ˈⳌ⫼᠋Ңᖂ䕃ⱘWindows䕃ӊЁৃҹᕫࠄਃথDŽ7.ᇐ৥ǂǂձⴐ⴯᠔㾚៪⠽ԧ᠔ᣛⱘᮍ৥ˈՓ⬠䴶ѻ⫳ϔ⾡ᓩᇐ䏃㒓ˈ⿄Ўᇐ৥DŽ䆒䅵㗙೼䆒䅵⬠䴶ᯊˈᐌ߽⫼ᇐ৥Փᭈԧ⬏䴶᳈ᓩҎ⊼ⳂDŽϔ㠀ᴹ䇈ˈ⫼᠋ⱘⴐܝӮϡⶹϡ㾝ഄ䫕ᅮ೼⿏ࡼⱘ⠽ԧϞˈेՓ⠽ԧᰃ೼ሣᐩⱘ㾦㨑ˈ⬏䴶ⱘ⿏ࡼ䛑Ӯ䅽Ⳃܝ䎳ᅗ⿏ࡼⱘᮍ৥DŽњ㾷њ䖭ϔ⚍ˈ䆒䅵㗙ህৃҹ᳝ᛣ䆚ഄᇚ⫼᠋ⱘⳂܝᇐ৥ࠄᏠᳯ⫼᠋⊼ᛣⱘᙃᇍ䈵ϞDŽ8.ぎⱑऎǂǂ䗳ᑺᕜᖿⱘ䇈䆱ᮍᓣ䗖ড়ԧ㚆ᮄ䯏ⱘ᪁᡹ˈԚϡ䗖ড়خ݌⼐ⱘ㡖ⳂЏᣕҎˈॳ಴ᰃ↣ϔহ䆱ᔧЁⱘぎⱑ䞣໾ᇥDŽ⬠䴶䆒䅵ⱘぎⱑ䞣䯂乬гᕜ䞡㽕ˈ᮴䆎ᥦ⠜ⱘᑇ㸵ᛳ᳝໮དˈ䇏㗙ϔⳟ⬠䴶ⱘぎⱑ䞣ህᏆ㒭ᅗᠧདߚ᭄њDŽ᠔ҹˈगϛϡ㽕೼ϔϾ⬠䴶Ϟᬒ㕂໾໮ⱘᙃᇍ䈵ˈҹ㟇⬠䴶ᢹ᣸ϡ෾DŽ≵᳝ぎⱑऎˈህ≵᳝⬠䴶ⱘ㕢DŽぎⱑⱘ໮ᆵᇍ⬠䴶ⱘॄ䈵᳝އᅮᗻⱘᕅડDŽぎⱑ䚼ߚࡴ໮ˈӮՓḐ䇗ᦤ催ᑊϨ〇ᅮ⬠䴶˗ぎⱑ䕗ᇥˈӮՓҎѻ⫳⌏⋐ⱘᛳ㾝DŽ䆒䅵ᙃ䞣ᕜЄᆠⱘᴖഫ⬠䴶ᯊˈ⫼䕗໮ⱘぎⱑᰒ✊ህϡ䗖ড়DŽ107 InstallShieldㅔᯢՓ⫼ᬭ⿟4.2ᑨ⫼໮ၦԧЎњϡՓᅝ㺙Џ⬠䴶䖛Ѣऩ䇗ˈ䆌໮Ӭ⾔䕃ӊ(བWindows98ǃVisualStudio98ㄝ)ⱘᅝ㺙⬠䴶Ё䖬⫼ᑓਞ⠠ⱘᔶᓣᴹথᏗⳌ݇ᙃˈ䅽⫼᠋᳈໮ഄњ㾷㞾Ꮕⱘѻક˗⫮㟇䖬᪁ᬒ㚠᱃䷇Ф៪ᕅڣᴹ⍜䰸⫼᠋೼ᅝ㺙䖛⿟Ё䭓ᯊ䯈ㄝᕙⱘϡ⒵ᚙ㒾DŽ䖭⾡ҹ໮ၦԧⱘᔶᓣᴹЄᆠᅝ㺙Џ⬠䴶ⱘ⡍㡆ˈᰃInstallShield5.5Ёⱘᰒ㨫⡍⚍DŽ4.2.1ᄫԧǂǂᄫԧᰃ᭛ᄫᰒ⼎ⱘ໪㾖ᔶᓣˈᅗࣙᣀњ᭛ᄫⱘᄫḋǃ亢Ḑ੠ሎᇌㄝ໮ᮍ䴶ⱘሲᗻDŽ䗖ᔧഄ䗝⫼ϡৠⱘᄫԧˈৃҹ໻໻ഄЄᆠ᭛ᄫⱘ໪೼㸼⦄࡯DŽ՟བˈᡞ᭛ᄫЁᶤѯ䞡㽕ⱘᄫহ⫼䕗㉫ⱘᄫԧᰒ⼎ˈ㛑໳ԧ⦄ߎさߎǃᔎ䇗ⱘᛣ೒DŽᄫԧⱘᄫḋᰃᄫヺкݭ੠ᰒ⼎ᯊ㸼⦄ߎⱘ⡍ᅮ῵ᓣˈ՟བˈᇍѢ∝ᄫˈ䗮ᐌ᳝ᅟԧǃὋԧǃӓᅟǃ咥ԧǃ䲊кҹঞᑐ೚ㄝ໮⾡ᄫḋDŽᄫԧ亢ḐЏ㽕㸼⦄Ўᄫԧⱘ㉫㒚੠ᰃ৺ؒ᭰ㄝ⡍ᗻDŽᄫԧⱘሎᇌᰃ⫼ᴹᣛᅮᄫヺ᠔ऴऎඳⱘ໻ᇣˈ䗮ᐌ⫼ᄫヺ催ᑺᴹᦣ䗄DŽᄫԧሎᇌৃҹপ↿㉇៪㣅ᇌ԰ЎऩԡˈԚЎњⳈ㾖䍋㾕ˈгᐌᐌ䞛⫼ϔ⾡⿄Ў"⚍"ⱘऩԡˈϔ⚍㑺ᡬড়Ў1/72㣅ᇌDŽᇍѢ∝ᄫˈ䖬ᐌ⫼"ো"᭄ᴹ㸼⼎ᄫԧሎᇌˈ߱োᄫ᳔໻ˈҹϟձ⃵Ўᇣ߱ǃϔোǃᇣϔǃѠোǃᇣѠ??ˈབℸ㉏᥼ˈᄫো䍞໻ˈᄫԧሎᇌ䍞ᇣDŽ೼InstallShieldЁˈᄫԧⱘᑨ⫼㣗ೈ䴲ᐌ᳝䰤ˈ⫼᠋া㛑䗮䖛SetFont੠SetTitle䆒ᅮᅝ㺙Џ⬠䴶ЁЏᷛ乬ⱘᄫԧ㉏ൟ੠໻ᇣDŽ՟བ˖SetFont(FONT_TITLE,STYLE_BOLD|STYLE_ITALIC|STYLE_SHADOW,"ढ᭛ᮄ儣");SetTitle("InstallShield∝࣪㸹ϕ",28,WHITE);//䆒ᅮЏᷛ乬ⱘݙᆍЎ"InstallShield∝࣪㸹ϕ"ǃ໻ᇣЎ28⚍ǃ买㡆Ўⱑ㡆ǂǂ݊ЁSetFontᰃ⫼ᴹ䆒㕂㽕ᰒ⼎ᄫヺІⱘ᭛ᴀᄫԧˈᅗⱘॳൟབϟ˖SetFont(nItemID,nFontStyle,szFontName);ǂǂখ᭄nItemID⫼ᴹᣛᅮ㽕䆒㕂ᄫԧⱘ乍ⳂˈⳂࠡা㛑ЎFONT_TITLEˈᅗ㸼⼎Џᷛ乬DŽnFontStyle⫼ᴹᣛᅮᄫԧⱘ亢Ḑˈᅗৃҹᰃϟ߫ⱘؐПϔ˖STYLE_NORMALℷᐌᄫԧ亢Ḑˈᅗϡ㛑Ϣ݊Ҫؐ䖯㸠"|"㒘ড়STYLE_BOLD㉫ԧSTYLE_ITALIC᭰ԧ108 InstallShieldㅔᯢՓ⫼ᬭ⿟STYLE_SHADOW᭛ᄫᏺ䰈ᕅSTYLE_UNDERLINE᭛ᄫᏺϟߦ㒓szFontName⫼ᴹᣛᅮᄫԧⱘᄫḋৡDŽ㢹ᣛᅮⱘᄫḋৡ≵᳝ᡒࠄˈ߭Փ⫼㔎ⳕⱘ"Arial"ᄫḋDŽᔧߑ᭄䖨ಲ0ᯊ㸼⼎ᄫԧ䆒㕂៤ࡳˈ৺߭ᄫԧ䆒㕂༅䋹DŽ䳔㽕䇈ᯢⱘᰃˈ೼ᅝ㺙Word2000ৢˈWindowsৃՓ⫼ⱘᄫԧ㉏ൟ๲ࡴњᕜ໮ˈᇸ݊ᰃЁ᭛ᄫԧDŽԚᰃˈ⫼᠋᳔ད㛑Փ⫼෎ᴀⱘЁ᭛ᄫԧˈབᅟԧǃὋԧǃ咥ԧҹঞӓᅟԧˈҹ䗖ᑨϡৠⱘᅝ㺙⦃๗DŽ4.2.2买㡆Windowsᦤկњϔ⾡"䆒໛᮴݇"ⱘ买㡆᥹ষˈՓᕫᑨ⫼⿟ᑣা䳔ᦤկ"㒱ᇍⱘ"买㡆ؐˈ㋏㒳ህӮᇚ䆹ҷⷕҹড়䗖ⱘ买㡆៪买㡆㒘ড়᯴ᇘࠄ䅵ㅫᴎⱘᰒ⼎఼ϞDŽৠḋˈгৃҹ೼InstallShieldᅝ㺙㛮ᴀ⿟ᑣЁՓ⫼RGBߑ᭄ᴹᣛᅮᶤϔϾ买㡆ؐ˖NUMBERnColor;...nColor=RGB(128,0,255);݊ЁˈRGBߑ᭄⫼ᴹ߯ᓎϔϾ⫼ѢSetColor੠SetTitleߑ᭄Ёⱘ买㡆ؐDŽᅗⱘॳൟབϟ˖RGB(constRed,constGreen,constBlue);ǂǂখ᭄constRedǃconstGreen੠constBlue⫼ᴹᣛᅮRGBЁ㑶㡆ǃ㓓㡆੠㪱㡆ߚ䞣ؐˈপؐ㣗ೈ䛑ᰃЎ0-255ˈߑ᭄៤ࡳ䇗⫼ৢ䖨ಲⳌᑨⱘ买㡆ؐDŽǂǂԚᰃˈ䖭ϔ买㡆ؐ೼㋏㒳ϡৠⱘ买㡆῵ᓣϟˈ݊ᅲ䰙ⱘ买㡆Ӯ᳝᠔ϡৠDŽ՟བˈ೼256㡆买㡆῵ᓣϟˈ⬅Ѣᅲ䰙ᰒ⼎ⱘ买㡆ϡӮ䍙䖛256㡆ˈ಴ℸ㋏㒳Ӯ⫼᳔᥹䖥ⱘ买㡆੠⫼᠋ᣛᅮⱘ买㡆Ⳍऍ䜡ˈҢ㗠䗴៤њ买㡆ⱘ༅ⳳ⦄䈵DŽЎњ᳝ᬜഄ㾷އ䖭ϔ䯂乬ˈϟ䴶ⱘᓎ䆂ؐᕫখ㗗˖(1)ሑ䞣Փ⫼Windowsⱘᷛޚ㡆DŽ՟བᇍѢ256㡆῵ᓣˈ᳝ϟ߫20⾡ᷛޚ㡆˖RGB(0,0,0)咥㡆RGB(0,0,255)㪱㡆RGB(0,255,0)㓓㡆RGB(0,255,255)䴦㡆RGB(255,0,0)㑶㡆RGB(255,0,255)ક㑶㡆RGB(255,255,0)咘㡆109 InstallShieldㅔᯢՓ⫼ᬭ⿟RGB(255,255,255)ⱑ㡆RGB(0,0,128)ᱫ㪱㡆RGB(0,128,0)ᱫ㓓㡆RGB(0,128,128)ᱫ䴦㡆RGB(128,0,0)ᱫ㑶㡆RGB(128,0,128)ᱫ㋿㡆RGB(128,128,0)‘὘㡆RGB(128,128,128)ᱫ♄㡆RGB(192,192,192)҂♄㡆RGB(192,220,192)⎵㓓㡆RGB(166,202,240)໽㪱㡆RGB(255,251,240)чⱑ㡆RGB(160,160,164)Ё♄㡆(2)ሑ䞣Փ⫼㒃㡆ˈᇸ݊ᰃ⫼Ѣᅝ㺙Џ⬠䴶ⱘ㚠᱃买㡆DŽ䖭ѯ㒃㡆ᰃInstallShieldЁ乘ܜᅮНⱘϔѯؐˈᑊৃҢSetColorߑ᭄ᕫࠄ䖭ѯ㒃㡆ⱘᑨ⫼˖SetColor(nObject,nColor);ǂǂ䆹ߑ᭄⫼ᴹЎᣛᅮⱘᇍ䈵䆒ᅮ买㡆DŽ݊ЁnObject⫼ᴹᣛᅮ㽕䆒ᅮ买㡆ⱘᇍ䈵ˈᅗা㛑ᰃϟ߫ؐПϔ˖BACKGROUND㸼⼎ᅝ㺙Џ⬠䴶ⱘ㚠᱃STATUSBAR㸼⼎䖯ሩᣛ⼎఼Ёⱘ䖯ሩᴵǂǂখ᭄nColor⫼ᴹᣛᅮ㽕䆒ᅮⱘ买㡆DŽᅗ䰸њৃҹᰃ⫼RGBᅮНⱘ买㡆໪ˈ䖬ৃՓ⫼ϟ䴶ⱘ买㡆˖BK_BLUE⏤বⱘ㪱㚠᱃㡆BK_GREEN⏤বⱘ㓓㚠᱃㡆BK_MAGENTA⏤বⱘ㋿㚠᱃㡆BK_RED⏤বⱘ㑶㚠᱃㡆BK_YELLOW⏤বⱘ咘㚠᱃㡆BK_SOLIDBLUE⫼Ѣ㚠᱃ⱘ㒃㪱BK_SOLIDGREEN⫼Ѣ㚠᱃ⱘ㒃㓓BK_SOLIDMAGENTA⫼Ѣ㚠᱃ⱘ㒃㋿BK_SOLIDRED⫼Ѣ㚠᱃ⱘ㒃㑶BK_SOLIDYELLOW⫼Ѣ㚠᱃ⱘ㒃咘BK_SMOOTHϢRGBᅮНⱘ买㡆䖯㸠"|"㒘ড়ˈ⫼Ѣѻ⫳⏤বⱘ㚠᱃㡆DŽGREENѻ⫳㓓㡆ⱘ䖯ሩᴵREDѻ⫳㑶㡆ⱘ䖯ሩᴵBLUEѻ⫳㪱㡆ⱘ䖯ሩᴵMAGENTAѻ⫳㋿㡆ⱘ䖯ሩᴵYELLOWѻ⫳咘㡆ⱘ䖯ሩᴵ110 InstallShieldㅔᯢՓ⫼ᬭ⿟(3)བᵰᅝ㺙⬠䴶ϔᅮ㽕Փ⫼256㡆ҹϞⱘ买㡆῵ᓣˈ䙷Мৃ䗮䖛GetSystemInfo(COLORS,0,"")㦋ᕫᔧࠡ㋏㒳Փ⫼ⱘ买㡆᭄ᴹ⹂ᅮᰃ৺㒻㓁ᅝ㺙DŽ4.2.3ԡ೒InstallShield5.5ᬃᣕⱘ೒ڣ⼎ᰒ੠ѯϔᰃᅗˈPMBᰃ⾡ϔDŽൟ㉏⾡ϸ᳝ӊ᭛ᓣḐڣ㋴Ⳍᇍᑨⱘԡ䰉߫˗঺ϔ⾡ᰃWMFˈᅗᰃϔ⾡ᷛޚൟⱘ೒ܗ᭛ӊˈгᰃϔ⾡䆒໛᮴݇ⱘ೒ڣ᭛ӊˈᅗᇚ೒ټᄬᴹᓣᔶⱘ㋴ڣ⫼ᰃϡ㗠)ᔶ䖍໮ǃᓻ೚ǃ㒓(䈵ᇍᔶ೒ҹڣⱘDŽǂǂ೼InstallShield5.5Ёˈԡ೒ϡҙৃҹ԰Ўᑓਞ⠠ˈ㗠Ϩৃҹ԰Ў㒘ӊ乍ࠡ䴶ⱘ೒ᷛҹঞᇍ䆱ḚᎺ䖍ⱘԡ೒ᷛㅒDŽ1.㒘ӊ乍ࠡ䴶ⱘ೒ᷛǂǂϟ䴶ⱘ䖛⿟ᇚՓϔϾԡ೒៤Ў㒘ӊ乍ࠡ䴶ⱘ೒ᷛ˖(1)⫼೒ڣ㓪䕥䕃ӊ߯ᓎϔϾԡ೒ˈབ೒4.3᠔⼎DŽǂ䆹ԡ೒ᅲ䰙Ϟᰃ⬅໮Ͼ䖲㓁ⱘ16x16ⱘ೒ؐRGB(㡆㋿៤㕂䆒㽕ᅮϔ㡆᱃㚠݊ˈⱘ៤㒘ڣЎ255,0,255)(2)ᇚ䆹ԡ೒ᄬ೼View.bmp᭛ӊЁDŽ(3)ਃࡼInstallShield5.5ˈ⫼ProjectWizard߯ᓎϔϾᅝ㺙乍ⳂDŽ(4)ߛᤶࠄ乍ⳂᎹ԰ऎにষⱘ"SetupFiles"义䴶ˈ䗝ᅮ"LanguageIndependentWindows95/98&NT3.51/4.0"乍DŽ(5)೼ে䖍ⱘሲᗻにষЁˈেߏ哴ᷛˈҢᔍߎⱘᖿ᥋㦰ऩЁ䗝ᢽ"InsertFiles..."ҸDŽ(6)䗮䖛ᔍߎⱘᇍ䆱Ḛᇚ߮ᠡᄬⱘView.bmp᭛ӊ䇗ܹDŽ(7)ᇚ乍ⳂᎹ԰ऎにষߛᤶࠄMedia义䴶DŽऩߏMediaBuildWizard乍ˈ߯ᓎᮄⱘၦҟDŽ(8)㓪䆥ᑊ䖤㸠DŽ೼"SelectType"ᇍ䆱ḚЁ䗝ᢽ"Custom"ᅝ㺙㉏ൟˈᣝ[Next>]ᣝ䪂ᔍߎབ೒4.4᠔⼎ⱘ"SelectComponents"ᇍ䆱Ḛ⬠䴶DŽ111 InstallShieldㅔᯢՓ⫼ᬭ⿟䳔㽕䇈ᯢⱘᰃˈ㒘ӊ೒ᷛৃᑨ⫼ѢComponentDialogǃSdComponentDialogǃSdComponentDialog2ǃSdComponentDialogAdv੠SdComponentMultᇍ䆱ḚЁDŽ2.ϔ㠀ԡ೒ⱘᰒ⼎ǂǂᔧ✊ˈ㢹⫼᠋ᛇ㽕ᇚԡ೒ᰒ⼎೼ሣᐩⱘӏԩԡ㕂ˈ߭ৃՓ⫼PlaceBitmapߑ᭄ˈ݊ॳൟབϟ˖PlaceBitmap(szName,nID_BITMAP,nDx,nDy,nDrawOp);ǂǂ䆹ߑ᭄ᰃᇚϔᓴ೒ڣᦦܹࠄᅝ㺙⬠䴶ЁDŽ䖭Ͼ೒ڣᴹ㞾Ѣ⬅szNameᣛᅮⱘBMP᭛ӊǃWMF᭛ӊ៪DLL᭛ӊDŽ㢹szNameᣛᅮⱘ᭛ӊᰃDLLˈ߭䖬䳔㽕⫼nID_BITMAPᣛᅮⳌᑨⱘԡ೒IDোDŽখ᭄nDx੠nDy⫼ᴹᣛᅮϢᅝ㺙⬠䴶にষ䖍Ḛⱘ∈ᑇ੠ൖⳈأ⿏䞣ˈখ᭄nDrawOp⫼ᴹ㸼⼎ҹϟⱘ᪡԰ᮍᓣ˖BITMAPICON㸼⼎ԡ೒᳝䗣ᯢ䚼ߚDŽ⫼᠋ৃҹᇚℸᮍᓣϢ݊Ҫ᪡԰䖯㸠"|"㒘ড়ˈԚ䰸TILEDǃFULLSCREEN੠FULLSCREENSIZE໪DŽᔧszNameᣛᅮϔϾ೒ܗ᭛ӊ៪ᰃϔϾ24ԡԡ೒ˈ߭BITMAPICONϡ䍋԰⫼DŽTILEDᑇ䫎ԡ೒FULLSCREENSIZEᇚ೒ڣᬒ໻㟇ᭈϾᅝ㺙にষCENTEREDሙЁԡ೒LOWER_LEFTᇚԡ೒ᬒ㕂೼にষⱘᎺϟ㾦LOWER_RIGHTᇚԡ೒ᬒ㕂೼にষⱘেϟ㾦UPPER_LEFTᇚԡ೒ᬒ㕂೼にষⱘᎺϞ㾦112 InstallShieldㅔᯢՓ⫼ᬭ⿟UPPER_RIGHTᇚԡ೒ᬒ㕂೼にষⱘেϞ㾦REMOVE⏙䰸ҹࠡᬒ㕂೼にষЁⱘ೒ڣǂǂ䳔㽕䇈ᯢⱘᰃ˖(1)ᑨᯢ⹂೒ڣ೒ⱘ䴶⬠㺙ᅝ೼⼎ᰒѢ⫼DŽડᕅⱘᕘ䏃ӊ᭛ڣ᭛ӊⱘ䏃ᕘˈ⫼᠋ৃҹ೼Ϟ䗄ߑ᭄ⱘszNameЁᣛᅮˈ՟བDⲬЁᄬ೼MyImage.bmp᭛ӊˈ߭szNameᑨЎ"D:\MyImage.bmp"DŽ㱑✊ℸᯊ䖤㸠ϔ㠀ϡӮ᳝䯂乬ˈԚᇚᅝ㺙⿟ᑣথᏗৢ䯂乬ህᴹњˈ಴Ў⫼᠋ⱘᴎ఼ϞϡӮ᳝MyImage.bmp᭛ӊDŽЎℸ៥Ӏ䳔㽕ᇚ㽕Փ⫼ⱘ᠔᳝᭛ӊ(ࣙᣀ೒ڣ᭛ӊ)⏏ࡴ೼InstallShield䲚៤ᓔথ⦃๗ⱘ"SetupFiles"义䴶ЁˈℸᯊszNameᑨЎ˖szName=SUPPORTDIR^"MyImage.bmp";(2)szNameЁгৃՓ⫼ߚো";"ˈ⫼ᴹ䆒㕂Ⳍᑨⱘ䗣ᯢ㡆DŽ՟བ˖szName=SUPPORTDIR^"TransImage.bmp;255,128,64";݊Ёˈ255,128,64ߚ߿㸼⼎RGB买㡆Ёⱘ㑶ǃ㓓ǃ㪱买㡆ߚ䞣ؐˈ⫼ᴹᣛᅮ䖭⾡买㡆ᰃ䗣ᯢⱘDŽ(3)㢹೒ڣᄬ೼DLL᭛ӊЁᯊˈ⫼᠋ϡԚ⫼szNameᣛᅮDLL᭛ӊܼৡˈ㗠Ϩ䖬㽕೼nID_BITMAPᣛᅮⳌᑨⱘԡ೒IDোˈ䖭䞠ⱘIDোᰃDLLЁᏆᅮНⱘDŽ՟བˈ㢹߯ᓎⱘDLL᭛ӊᰃMyImage.DLLˈ᭛ӊЁࣙ৿ϔϾԡ೒(IDোЎ1000)ˈᔧ䆹᭛ӊ䇗ܹᅝ㺙乍Ⳃৢˈ᳝߭ϟ߫ҷⷕ˖PlaceBitmap(SUPPORTDIR^"MyImage.Dll",1000,0,0,CENTERED);೒ڣᄬ೼DLL᭛ӊⱘᮍ⊩᳝ᕜ໮ˈ՟བ⫼᠋ৃҹ⫼VisualC++6.0ᬍ_IsRes.DLL៪߽⫼InstallShieldϧϮ⠜ᦤկⱘᅮࠊᇍ䆱Ḛⱘ乍Ⳃᴹᵘ䗴㓪䆥DŽԚϡㅵᰃᗢḋⱘᮍ⊩ˈ᳔݊ৢⱘDLL᭛ӊৡϔᅮϡ㛑ᰃ_IsRes.DLL៪_IsUser.DLLˈ৺߭Ⳍᑨⱘ೒ڣϡӮᰒ⼎DŽ(4)ᔧ೼PlaceBitmapߑ᭄ЁՓ⫼REMOVE᪡԰ᮍᓣПࠡˈৃҹ⫼nID_BITMAPᣛᅮϔϾԡ೒IDোˈ䖭ḋህϡ䳔㽕ڣ೒ⱘᑨⳌᅮᣛݡ᭛ӊৡDŽ՟བ˖PlaceBitmap("D:\CIBA2Ks.bmp",10,0,0,CENTERED);elay(1);PlaceBitmap("",10,0,0,REMOVE);(5)ЎњՓᰒ⼎ⱘ೒ڣ᳈݋⡍㡆ˈ⫼᠋ৃҹ೼PlaceBitmapߑ᭄䇗⫼ࠡˈ⫼SetDisplayEffectߑ᭄䆒㕂೒ڣᰒ⼎ᬜᵰˈᅗⱘॳൟབϟ˖SetDisplayEffect(nEffect);ǂǂ݊ЁˈnEffectৃҹϟ߫ؐПϔ(Ԛ䖭ѯᬜᵰᇍPlaceBitmap᪡԰ᮍᓣBITMAPICONǃBITMAPFULLSCREEN੠BITMAPTILEϡ䍋԰⫼)EFF_FADE⎵ܹ⎵ߎᬜᵰEFF_REVEALЁᖗሩᓔᬜᵰEFF_HORZREVEAL∈ᑇሩᓔᬜᵰ113 InstallShieldㅔᯢՓ⫼ᬭ⿟EFF_HORZSTRIPE∈ᑇᴵ㒍ᰒ⼎ᬜᵰEFF_VERTSTRIPEൖⳈᴵ㒍ᰒ⼎ᬜᵰEFF_BOXSTRIPEⲦᓣᴵ㒍ᰒ⼎ᬜᵰEFF_NONEপ⍜ӏԩᬜᵰ3.ᇍ䆱Ḛⱘԡ೒ᷛㅒ᳈ᬍᇍ䆱Ḛⱘԡ೒ᷛㅒ᳝ϸ⾡ᮍ⊩ˈϔᰃՓ⫼VisualC++ᬍ_IsRes.DllЁⱘᇍ䆱Ḛ䌘⑤ˈ঺ϔᰃՓ⫼DialogSetInfoߑ᭄DŽ⬅Ѣ㄀ϔ⾡ᮍ⊩೼ᴀゴⱘ᳔ৢϔ㡖Ё䖬ᇚ݋ԧҟ㒡ˈᬙ䖭䞠ҙ䅼䆎㄀Ѡ⾡ᮍ⊩DŽߑ᭄DialogSetInfoᰃ⫼ᴹ᳈ᬍϔѯSdᇍ䆱ḚЁⱘᣛᅮⱘܗ㋴ˈ՟བᇍ䆱ḚЁⱘԡ೒ᷛㅒǃ໡䗝Ḛⱘ亢Ḑǃ⹀Ⲭぎ䯈໻ᇣⱘऩԡㄝDŽ䆹ߑ᭄ᕔᕔᑨ⫼ѢSdComponentDialogAdvǃSdComponentDialog2੠SdComponentMultᇍ䆱Ḛߑ᭄ЁDŽᅗⱘॳൟབϟ˖DialogSetInfo(nInfoType,szInfoString,nParameter);ǂǂ݊Ёখ᭄nInfoType⫼ᴹᣛᅮ㽕᳈ᬍⱘܗ㋴ˈᅗৃҹᰃϟ߫ؐПϔ˖DLG_INFO_USEDECIMALᰒ⼎ⱘݙᄬ໻ᇣՓ⫼क䖯ࠊDLG_INFO_KUNITSぎ䯈໻ᇣⱘऩԡՓ⫼KBDLG_INFO_ALTIMAGE᳈ᬍᇍ䆱ḚЁⱘԡ೒ᷛㅒDLG_INFO_CHECKSELECTION᳈ᬍ໡䗝Ḛⱘ亢Ḑǂǂখ᭄szInfoString⫼ᴹᔧnInfoTypeЎDLG_INFO_ALTIMAGEᯊᣛᅮⱘԡ೒᭛ӊৡˈ䆹ԡ೒ⱘ໻ᇣ᳔དЎ120x260ڣ㋴ˈ৺߭䍙ߎ䆹㣗ೈⱘԡ೒㹿㺕࠾ˈᇣѢ䆹㣗ೈⱘԡ೒㹿㔎ⳕⱘ㚠᱃㡆(RGB(0,128,028))฿ܙDŽǂǂখ᭄nParameter⫼ᴹᔧnInfoTypeЎDLG_INFO_CHECKSELECTIONᯊˈᣛᅮϟ߫ⱘؐ˖CHECKBOXWindows3.1ⱘ໡䗝ḚCHECKBOX95Windows95ⱘ໡䗝ḚCHECKLINE䗝Ё乍CHECKMARK䗝Ёᷛ䆄ǂǂ㢹ᔧnInfoTypeЎDLG_INFO_ALTIMAGEᯊˈ߭䆹খ᭄ৃҹᰃ˖-1ᇚԡ೒฿ܹ_isres.dllⳌ݇ⱘ䌘⑤ЁTRUEszInfoStringᖙ乏ᣛᅮᰒ⼎ⱘԡ೒ǂǂ㢹ᔧnInfoTypeЎDLG_INFO_KUNITS៪DLG_INFO_USEDECIMALᯊˈ߭䆹খ᭄ৃҹᰃ˖114 InstallShieldㅔᯢՓ⫼ᬭ⿟TRUE㸼⼎nInfoType䆒㕂᳝ᬜFALSE㸼⼎nInfoType䆒㕂᮴ᬜˈՓ⫼㔎ⳕⱘ亢Ḑǂǂ՟བˈϟ䴶ⱘ䖛⿟ᇚՓ᠔᳝ⱘᇍ䆱Ḛⱘԡ೒ᷛㅒᬍЎ㉏Ԑབ೒4.5᠔⼎ⱘ໪㾖˖(1)⫼೒ڣ㓪䕥䕃ӊ߯ᓎϔϾ໻ᇣЎ120x260ⱘԡ೒DŽᇚ䆹ԡ೒ᄬ೼Bmp.bmp᭛ӊ(гৃᰃ݊Ҫ᭛ӊৡ)ЁDŽ(2)ਃࡼInstallShield5.5ˈ⫼ProjectWizard߯ᓎϔϾᅝ㺙乍ⳂDŽ(3)ߛᤶࠄ乍ⳂᎹ԰ऎにষⱘ"SetupFiles"义䴶ˈ䗝ᅮ"LanguageIndependentWindows95/98&NT3.51/4.0"乍DŽ(4)೼ে䖍ⱘሲᗻにষЁˈেߏ哴ᷛˈҢᔍߎⱘᖿ᥋㦰ऩЁ䗝ᢽ"InsertFiles..."ҸDŽ(5)䗮䖛ᔍߎⱘᇍ䆱Ḛᇚ߮ᠡᄬⱘBmp.bmp᭛ӊ䇗ܹDŽ(6)ᠧᓔSetup.rul᭛ӊˈ೼Џ⿟ᑣԧⱘ᳔ࠡ䴶⏏Ϟϟ߫䇁হ˖DialogSetInfo(DLG_INFO_ALTIMAGE,SUPPORTDIR^"Bmp.bmp",TRUE);(7)ᇚ乍ⳂᎹ԰ऎにষߛᤶࠄMedia义䴶DŽऩߏMediaBuildWizard乍ˈ߯ᓎᮄⱘၦҟDŽ(8)㓪䆥ᑊ䖤㸠DŽ4.2.4ໄ䷇੠ᕅڣǂǂЎњЄᆠѻકሩ⼎ⱘ㸼⦄࡯ˈᦤ催ᅝ㺙⬠䴶ⱘϧϮ∈ޚˈInstallShield䖬ᦤկњPlayMMediaߑ᭄ᴹ᪁ᬒMIDIǃWAVEໄ䷇੠AVIᕅڣˈ݊ߑ᭄ॳൟབϟ˖PlayMMedia(nType,szFileName,nOperation,nReserved);115 InstallShieldㅔᯢՓ⫼ᬭ⿟ǂǂ݊ЁˈnType㸼⼎᪁ᬒⱘၦԧ㉏ൟˈᅗৃҹᰃMMEDIA_WAVE(MIDI䷇Ф)ǃMMEDIA_MIDI(WAVE䷇Ф)੠MMEDIA_AVI(AVIᕅڣ)˗szFileNameᣛᅮ㽕᪁ᬒⱘໄ䷇៪ᕅڣ᭛ӊܼৡˈ㢹ၦԧ᭛ӊ䇗ܹᅝ㺙乍Ⳃৢˈ߭ৃՓ⫼㋏㒳ব䞣SUPPORTDIRᴹᣛᯢⳌᑨⱘ䏃ᕘ˗nReservedⳂࠡ⬭ˈা㛑Ў0˗nOperation㸼⼎ၦԧ᪁ᬒⱘᮍᓣˈᅗৃҹᰃϟ߫ؐ˖MMEDIA_PLAYSYNCHৠℹ᪁ᬒDŽᅗᛣੇⴔা᳝ᔧၦԧ᪁ᬒᅠ↩ৢˈᠡᠻ㸠ϟϔℹ᪡԰DŽMMEDIA_PLAYASYNCHᓖℹ᪁ᬒDŽᅗᛣੇⴔၦԧᰃ೼ৢৄ᪁ᬒⱘˈԚЎњ⹂ၦԧ᪁ᬒ㒧ᴳˈ䖬ᖙ乏ᣛᅮMMEDIA_STOP᪡԰DŽMMEDIA_PLAYCONTINUOUSᕾ⦃᪁ᬒDŽᅗা㛑੠MMEDIA_PLAYASYNCH䖯㸠"|"㒘ড়DŽMMEDIA_STOPذℶ᪁ᬒDŽǂǂᰒ✊ˈ㢹㽕೼ᅝ㺙䖯㸠䖛⿟Ё䖯㸠ၦԧⱘৢৄ䖲㓁᪁ᬒˈ߭ৃ᳝ϟ߫ҷⷕ˖PlayMMedia(MMEDIA_WAVE,"C:\Windows\Media\TheMicrosoftSound.wav",MMEDIA_PLAYASYNCH|MMEDIA_PLAYCONTINUOUS,0);...PlayMMedia(MMEDIA_WAVE,"C:\Windows\Media\TheMicrosoftSound.wav",MMEDIA_STOP,0);116 InstallShieldㅔᯢՓ⫼ᬭ⿟4.3⬠䴶ⱘᬜᵰ䆒䅵䗮䖛Ϟ䴶ⱘҟ㒡ˈⳌ⫼᠋ᇍᅝ㺙⬠䴶ⱘ䆒䅵᳝ϔᅮⱘњ㾷ˈ䖭䞠ݡᇍϔѯᐌ⫼ⱘ⬠䴶ᬜᵰⱘ䆒䅵ᮍ⊩੠ᡔᎻ԰䖯ϔℹⱘ䅼䆎DŽ4.3.1䆒㕂Џ⬠䴶ⱘ㚠᱃ᬜᵰǂǂᅝ㺙Џ⬠䴶ⱘ㚠᱃ৃҹ᳝ϝ⾡ᬜᵰ˖ϔ㠀㚠᱃㡆ǃ⏤ব㚠᱃㡆ҹঞԡ೒㚠᱃DŽ1.㚠᱃㡆ǂǂ೼䆒㕂ᅝ㺙Џ⬠䴶ⱘ㚠᱃㡆Пࠡ佪ܜ㽕䇗⫼Enableߑ᭄ᰒ⼎ᅝ㺙⬠䴶ⱘ㚠᱃ˈ✊ৢ䇗⫼SetColorߑ᭄䆒㕂Ⳍᑨⱘ㚠᱃㡆ˈ㢹೼䆹ߑ᭄ЁᣛᅮBK_SMOOTH⡍ᗻᯊˈ߭ѻ⫳ൖⳈⱘ买㡆⏤বᬜᵰˈ݊ЁSetColorᣛᅮⱘ买㡆ᰃ⬠䴶᳔Ϟ䖍ⱘ买㡆ˈ㗠᳔ϟ䴶ⱘ买㡆ᰃ咥㡆RGB(0,0,0)DŽ՟བ˖programEnable(BACKGROUND);Enable(FULLWINDOWMODE);SetColor(BACKGROUND,BK_RED|BK_SMOOTH);Delay(3);endprogramǂǂ݊㒧ᵰབ೒4.6᠔⼎DŽ䳔㽕䇈ᯢⱘᰃˈ㢹ϡᣛᅮӏԩ㚠᱃㡆ˈ߭ᅝ㺙⬠䴶Փ⫼㔎ⳕⱘ⏅䴦㡆RGB(0,128,128)117 InstallShieldㅔᯢՓ⫼ᬭ⿟2.ԡ೒㚠᱃ǂǂབᵰᛇ㽕⫼ԡ೒԰Ўᅝ㺙⬠䴶ⱘ㚠᱃ˈ⫼᠋佪ܜ㽕߯ᓎϔϾBMP៪WMF೒⠛ˈ✊ৢ䇗⫼PlaceBitmapߑ᭄ᇚ೒⠛ᰒ⼎೼ᅝ㺙⬠䴶ϞDŽԚЎњ೒⠛㛑㽚ⲪᭈϾ㚠᱃ˈ⫼᠋䖬ᖙ乏೼䆹ߑ᭄ЁᣛᅮFULLSCREENSIZEǃFULLSCREEN(㢹೒⠛໻ᇣ䍙䖛㚠᱃)៪TILED⡍ᗻDŽ՟བϟ䴶ⱘҷⷕ˖programEnable(BACKGROUND);Enable(FULLWINDOWMODE);PlaceBitmap("C:\Windows\ᅝ㺙⿟ᑣ.bmp",0,0,0,FULLSCREENSIZE);Delay(3);endprogram݊㒧ᵰབ೒4.7᠔⼎DŽǂǂ䳔㽕䇈ᯢⱘᰃ˖118 InstallShieldㅔᯢՓ⫼ᬭ⿟(1)StatusUpdateߑ᭄াᇍ᭛ӊӴ䗕ߑ᭄CopyFileǃXCopyFileҹঞComponentMoveData᳝ᬜDŽ(2)⫼᠋ৃҹ⫼SetStatusWindowߑ᭄ᴹҷ᳓StatusUpdate䖯㸠᭛ӊӴ䗕䖯⿟ⱘҎᎹ䎳䏾ˈ՟བϟ䴶ⱘҷⷕ˖//؛䆒ᅝ㺙乍ⳂЁা᳝ϔϾৡЎ"Component"ⱘ㒘ӊˈ䆹㒘ӊϟࣙ৿ϔϾ᭛ӊ㒘"FileGroup"NUMBERnTotalSize,nFileSize,nPercent;NUMBERnFileResult,nvResult;LISTlistFile;STRINGsvFile,svStatus,svResult;programnPercent=0;Enable(BACKGROUND);Enable(FULLWINDOWMODE);PlaceWindow(BILLBOARD,0,0,CENTERED);Enable(STATUSDLG);Enable(INDVFILESTATUS);PlaceWindow(FEEDBACK,50,50,LOWER_LEFT);PlaceWindow(STATUSDLG,50,50,LOWER_RIGHT);SetStatusWindow(nPercent,"ޚ໛໡ࠊ᭛ӊ...");VarSave(SRCTARGETDIR);TARGETDIR="D:\Temp";//㦋প᠔᳝㒘ӊЁⱘ᭛ӊᄫ㡖ᘏ᭄nTotalSize=ComponentTotalSize(MEDIA,"",TRUE,TRUE);listFile=ListCreate(STRINGLIST);//㦋পϢ"Component"㒘ӊⳌ㘨ⱘ᭛ӊ㒘Ёⱘ᠔᳝᭛ӊComponentFileEnum(MEDIA,"Component","FileGroup\*.*",listFile,INCLUDE_SUBDIR);//㦋প"Component"㒘ӊⱘ⢊ᗕ᭛ᴀᙃComponentGetData(MEDIA,"Component",COMPONENT_FIELD_STATUS,nvResult,svStatus);nFileResult=ListGetFirstString(listFile,svFile);while(nFileResult!=END_OF_LIST)//㦋প↣Ͼ᭛ӊⱘᄫ㡖໻ᇣComponentFileInfo(MEDIA,"Component",svFile,COMPONENT_INFO_ORIGSIZE,nFileSize,svResult);//䅵ㅫᔧࠡⱘⱒߚ↨nPercent=nPercent+100*nFileSize/nTotalSize;//䆒㕂䖯ሩᦤ⼎఼ⱘⳌ݇ᙃSetStatusWindow(nPercent,svStatus);nFileResult=ListGetNextString(listFile,svFile);endwhile;119 InstallShieldㅔᯢՓ⫼ᬭ⿟ListDestroy(listFile);VarRestore(SRCTARGETDIR);SetStatusWindow(100,"᭛ӊ໡ࠊᅠ↩...");Delay(3);endprogramǂǂབᵰ⫼᠋ᠻᛣҎᎹ໘⧚㒘ӊⱘⳌ᭄݇᥂ˈ㱑✊ϡ༅Ўϔ⾡ᮍ⊩ˈԚᘏ≵᳝ߑ᭄ComponentMoveDataᴹᕫㅔऩˈϨ䆹ߑ᭄ᰃଃϔ㛑㞾ࡼ᳈ᮄᙃᡍ⼎఼ⱘߑ᭄DŽ(3)঺໪ˈ⫼᠋䖬ৃՓ⫼SetDialogTitle੠SetColorߑ᭄ᴹᬍব䖯ሩᇍ䆱Ḛⱘᷛ乬੠䖯ሩᴵⱘ买㡆DŽ՟བ˖Enable(STATUSDLG);SetDialogTitle(DLG_STATUS,"໡ࠊ᭛ӊ");SetColor(STATUSBAR,BK_GREEN);ǂǂ䳔㽕䇈ᯢⱘᰃˈ೼䇗⫼Enable(STATUSDLG)ࠡˈՓ⫼Disable(FEEDBACK_FULL)ߑ᭄ৃҹՓᙃᣛ⼎఼䱤㮣DŽ4.3.2Փ⫼䖯ሩᣛ⼎఼ǂǂ೼䇈ᯢ䖯ሩᣛ⼎఼ⱘՓ⫼ᮍ⊩Пࠡˈ៥ӀܜᴹⳟⳟProjectWizardѻ⫳ⱘϔ↉ҷⷕ˖functionMoveFileData()NUMBERnResult,nDisk;beginnDisk=1;SetStatusWindow(0,"");Disable(DIALOGCACHE);Enable(STATUS);StatusUpdate(ON,100);nResult=ComponentMoveData(MEDIA,nDisk,0);HandleMoveDataError(nResult);Disable(STATUS);returnnResult;end;ǂǂᰒ✊ˈϞ䗄ҷⷕЁⱘSetStatusWindowǃEnableҹঞStatusUpdateߑ᭄Ϣ䖯ሩᣛ⼎఼ᆚߛⳌ݇DŽ݊ЁˈEnable⫼Ѣ▔⌏੠ᰒ⼎ϡৠ㉏ൟⱘ䖯ሩᣛ⼎఼ˈⳌ݇ⱘখ᭄ؐৃҹᰃSTATUSDLG(ᷛޚ㉏ൟⱘ䖯ሩᇍ䆱Ḛ)ǃSTATUS(া᳝[প⍜]ᣝ䪂ⱘ䖯ሩᴵ)ǃSTATUSOLD(≵120 InstallShieldㅔᯢՓ⫼ᬭ⿟᳝[প⍜]ᣝ䪂ⱘ䖯ሩᴵ)ҹঞINDIVFILESTATUS(೼䖯ሩᣛ⼎఼Ёᰒ⼎㹿Ӵ䗕ⱘ᭛ӊܼৡ)˗㗠SetStatusWindow੠StatusUpdateߚ߿⫼Ѣ䆒㕂䖯ሩᣛ⼎఼ⱘⳌ݇ᙃঞ⹂ᅮᰃ৺䎳䏾᭛ӊ໡ࠊ䖯⿟ˈᅗӀⱘॳൟབϟ˖SetStatusWindow(nPercent,szString);ǂǂ䆹ߑ᭄ᰃЎ䖯ሩᣛ⼎఼ᣛᅮᓔྟ៪ᔧࠡⱘⱒߚ↨ҹঞ೼䖯ሩᴵϞᮍᰒ⼎ⱘᔧࠡ᭛ᴀᙃDŽখ᭄nPercentᣛᅮ䖯ሩᣛ⼎఼ⱘⱒߚ↨໻ᇣ(Ң0ࠄ100)DŽ㢹ϡᬍবᔧࠡⱘⱒߚ↨ˈ߭ᇚℸখ᭄䆒ᅮЎ-1DŽখ᭄szStringᣛᅮ೼䖯ሩᴵϞᮍᰒ⼎ⱘᔧࠡ᭛ᴀᙃDŽ㢹ᣛᅮ㒘ӊⱘ"StatusText"ሲᗻৢˈ߭ᔧ䇗⫼ComponentMoveDataߑ᭄ᯊˈ䖭Ͼᙃݙᆍ䖬Ӯ㞾ࡼ㹿᳈ᬍˈStatusUpdate(bLink,nFinalPercent);ǂǂ䆹ߑ᭄Փ⫼៪⽕ℶ䎳䏾᭛ӊӴ䗕䖯⿟DŽϔᮺbLink䆒ЎONˈᔧ᭛ӊӴ䗕ᯊˈ䖯ሩᴵ㞾ࡼᰒ⼎ߎⳌᑨⱘⱒߚ↨ˈⳈࠄnFinalPercent䆒ᅮⱘ᳔ৢⱒߚ↨ؐЎℶDŽখ᭄bLink⫼ᴹᣛᅮᰃՓ⫼(ON)៪⽕ℶ(OFF)䎳䏾᭛ӊ໡ࠊ䖯⿟DŽnFinalPercent⫼ᴹᣛᅮ䎳䏾᭛ӊ໡ࠊ䖯⿟ৢ㽕䖒ࠄⱘ᳔㒜ⱒߚ↨DŽ㢹䆒ᅮⱘ᳔㒜ⱒߚ↨↨ᔧࠡⱘؐ㽕ᇣˈ߭䖯ሩᴵϡӮ㹿᳈ᮄDŽǂǂ䳔㽕䇈ᯢⱘᰃ˖(1)StatusUpdateߑ᭄াᇍ᭛ӊӴ䗕ߑ᭄CopyFileǃXCopyFileҹঞComponentMoveData᳝ᬜDŽ(2)⫼᠋ৃҹ⫼SetStatusWindowߑ᭄ᴹҷ᳓StatusUpdate䖯㸠᭛ӊӴ䗕䖯⿟ⱘҎᎹ䎳䏾ˈ՟བϟ䴶ⱘҷⷕ˖//؛䆒ᅝ㺙乍ⳂЁা᳝ϔϾৡЎ"Component"ⱘ㒘ӊˈ䆹㒘ӊϟࣙ৿ϔϾ᭛ӊ㒘"FileGroup"NUMBERnTotalSize,nFileSize,nPercent;NUMBERnFileResult,nvResult;LISTlistFile;STRINGsvFile,svStatus,svResult;programnPercent=0;Enable(BACKGROUND);Enable(FULLWINDOWMODE);PlaceWindow(BILLBOARD,0,0,CENTERED);Enable(STATUSDLG);Enable(INDVFILESTATUS);PlaceWindow(FEEDBACK,50,50,LOWER_LEFT);PlaceWindow(STATUSDLG,50,50,LOWER_RIGHT);SetStatusWindow(nPercent,"ޚ໛໡ࠊ᭛ӊ...");VarSave(SRCTARGETDIR);121 InstallShieldㅔᯢՓ⫼ᬭ⿟TARGETDIR="D:\Temp";//㦋প᠔᳝㒘ӊЁⱘ᭛ӊᄫ㡖ᘏ᭄nTotalSize=ComponentTotalSize(MEDIA,"",TRUE,TRUE);listFile=ListCreate(STRINGLIST);//㦋পϢ"Component"㒘ӊⳌ㘨ⱘ᭛ӊ㒘Ёⱘ᠔᳝᭛ӊComponentFileEnum(MEDIA,"Component","FileGroup\*.*",listFile,INCLUDE_SUBDIR);//㦋প"Component"㒘ӊⱘ⢊ᗕ᭛ᴀᙃComponentGetData(MEDIA,"Component",COMPONENT_FIELD_STATUS,nvResult,svStatus);nFileResult=ListGetFirstString(listFile,svFile);while(nFileResult!=END_OF_LIST)//㦋প↣Ͼ᭛ӊⱘᄫ㡖໻ᇣComponentFileInfo(MEDIA,"Component",svFile,COMPONENT_INFO_ORIGSIZE,nFileSize,svResult);//䅵ㅫᔧࠡⱘⱒߚ↨nPercent=nPercent+100*nFileSize/nTotalSize;//䆒㕂䖯ሩᦤ⼎఼ⱘⳌ݇ᙃSetStatusWindow(nPercent,svStatus);nFileResult=ListGetNextString(listFile,svFile);endwhile;ListDestroy(listFile);VarRestore(SRCTARGETDIR);SetStatusWindow(100,"᭛ӊ໡ࠊᅠ↩...");Delay(3);endprogramǂǂབᵰ⫼᠋ᠻᛣҎᎹ໘⧚㒘ӊⱘⳌ᭄݇᥂ˈ㱑✊ϡ༅Ўϔ⾡ᮍ⊩ˈԚᘏ≵᳝ߑ᭄ComponentMoveDataᴹᕫㅔऩˈϨ䆹ߑ᭄ᰃଃϔ㛑㞾ࡼ᳈ᮄᙃᡍ⼎఼ⱘߑ᭄DŽ(3)঺໪ˈ⫼᠋䖬ৃՓ⫼SetDialogTitle੠SetColorߑ᭄ᴹᬍব䖯ሩᇍ䆱Ḛⱘᷛ乬੠䖯ሩᴵⱘ买㡆DŽ՟བ˖Enable(STATUSDLG);SetDialogTitle(DLG_STATUS,"໡ࠊ᭛ӊ");SetColor(STATUSBAR,BK_GREEN);ǂǂ䳔㽕䇈ᯢⱘᰃˈ೼䇗⫼Enable(STATUSDLG)ࠡˈՓ⫼Disable(FEEDBACK_FULL)ߑ᭄ৃҹՓᙃᣛ⼎఼䱤㮣DŽ122 InstallShieldㅔᯢՓ⫼ᬭ⿟4.3.3ሩ⼎ᑓਞ⠠ǂǂᑓਞ⠠ᰃ೼᭛ӊӴ䗕䖛⿟Ёᰒ⼎ⱘϔ㋏߫೒⠛(೒⠛ⱘḐᓣৃҹᰃԡ೒BMP៪೒ܗWMF)ˈᅗ㛑䍋ࠄ≳䗮ǃᑓਞǃ䆁㒗ǃ䖯ǃ▔থǃစФҹঞ݊Ҫᓩܹ⊼Ⳃⱘ԰⫼DŽǂǂ೼InstallShield5.5Ёˈᑓਞ⠠ᰃ೼䇗⫼ComponentMoveDataߑ᭄䖯㸠᭛ӊӴ䗕ᯊ㞾ࡼሩ⼎ⱘˈ⫼᠋᮶ϡ䳔㽕೼᭛ӊӴ䗕䖛⿟Ё▔⌏ᑓਞ⠠ˈгϡ䳔㽕ᣛᅮᑓਞ⠠ᰒ⼎ᯊ䯈ⱘ䭓ⷁҹঞᑓਞ⠠Ϣᑓਞ⠠ⱘᯊ䯈䯈䱨DŽ⫼᠋䳔㽕خⱘҙҙᰃᵘ䗴⫼Ѣᑓਞ⠠ⱘϔ㋏߫೒⠛ˈ✊ৢᇚ䖭ϔ㋏߫೒⠛ℷ⹂ৡˈ᳔ৢᇚ݊ᬒܹ乍ⳂᎹ԰ऎにষⱘ"SetupFiles"义䴶ϟⱘⳌᑨⱘ䇁㋏੠᪡԰ᑇৄЁDŽǂǂᰒ✊ˈℷ⹂ৡ⫼Ѣᑓਞ⠠ⱘ೒⠛᭛ӊৡᰃ䆕InstallShield㞾ࡼሩ⼎ᑓਞ⠠ⱘ݇䬂DŽInstallShieldᇍBMP੠WMFḐᓣⱘ೒⠛㒭ߎњϡሑⳌৠⱘҸ㾘߭DŽǂǂᇍѢBMPḐᓣⱘᑓਞ⠠㗠㿔ˈInstallShieldܕ䆌⫼᠋Փ⫼ϸ༫೒⠛ˈ݊Ёϔ༫⫼ѢԢሣᐩߚ䕼⥛(640x480)ˈℸᯊⱘ೒⠛ᖙ乏ҹBbrdln.bmpৡˈ݊Ёnᰃ1ࠄ99ⱘ䖲㓁᭄ᄫˈ঺ϔ༫䗖⫼Ѣӏԩሣᐩߚ䕼⥛ˈ䖭ᯊⱘ೒⠛ᖙ乏ҹBbrdn.bmpৡˈ݊Ёnᰃ1ࠄ99ⱘ䖲㓁᭄ᄫDŽ⫼᠋ৃҹাᣛᅮBbrdn.bmp㋏㒳ⱘᑓਞ⠠ˈԚᔧ䖭ϸ༫೒⠛ৠᯊᬒܹ"SetupFiles"义䴶Ёᯊˈᅝ㺙⿟ᑣӮ㞾ࡼḍ᥂⫼᠋ᴎ఼ⱘሣᐩߚ䕼⥛㞾ࡼᢷ䗝DŽǂǂᇍѢWMFḐᓣⱘᑓਞ⠠㗠㿔ˈInstallShieldϡᬃᣕԢߚ䕼⥛ⱘᑓਞ⠠ˈгህᰃ䇈ˈ⫼᠋া㛑Փ⫼ϔ༫䗖⫼Ѣ᠔᳝ߚ䕼⥛ⱘᑓਞ⠠ˈ䖭ᯊⱘ೒⠛ᖙ乏ҹBbrdn.wmfৡˈ݊Ёnᰃ1ࠄ99ⱘ䖲㓁᭄ᄫDŽሑㅵབℸˈ⫼᠋䖬ৃ೼᭛ӊӴ䗕ࠡՓ⫼SizeWindowߑ᭄䇗ᭈWMF೒⠛ᰒ⼎ⱘ໻ᇣˈҹ⒵䎇Ԣߚ䕼⥛ሣᐩⱘ䳔∖DŽǂǂՓ⫼ᑓਞ⠠ᯊˈ䳔㽕⊼ᛣ˖(1)೼ৠϔϾᅝ㺙乍ⳂЁˈϡ㛑ৠᯊᄬ೼BMP੠WMFḐᓣⱘᑓਞ⠠DŽ(2)ሑㅵৃҹᣛᅮ໮䖒99ᓴᑓਞ⠠೒⠛ˈԚᰃ⫼᠋гᑨ䆹ܙߚ㗗㰥ࠄ᭛ӊӴ䗕᠔䳔㽕ⱘᯊ䯈ˈ಴Ў᭛ӊӴ䗕ᅠৢᑓਞ⠠ϡݡ㞾ࡼᰒ⼎DŽгህᰃ䇈ˈ⫼᠋ޚ໛њ25ᓴ೒⠛ˈԚᔧ᭛ӊӴ䗕䖛⿟াᣕ㓁њ20⾦ᯊˈ߭ৃ㛑া᳝ࠡ䴶ⱘ10ᓴ೒⠛㹿ᰒ⼎DŽ(3)೼᭛ӊӴ䗕䖛⿟Ёˈ⬅ѢInstallShieldϡӮ㞾ࡼ݇䯁MWFᑓਞ⠠ⱘᰒ⼎ˈ䖭ᯊⱘᑓਞ⠠ⱘ䱤㮣ᖙ乏䗮䖛ৢϔᓴⱘ㽚Ⲫᠡ㛑䖒ࠄˈ಴ℸ೼ࠊ԰MWFᑓਞ⠠ᯊˈᑨᇚ᠔᳝೒⠛䆒㕂៤ϔḋⱘ໻ᇣDŽ4.3.4ᬍবにষ⢊ᗕǂǂ៥Ӏ᳝ᯊ䳔㽕ᇍᶤϾにষⱘ໻ᇣ੠ԡ㕂䖯㸠ᬍবˈ՟བᙃᣛ⼎఼੠䖯ሩᦤ⼎఼ⱘ㔎ⳕ123 InstallShieldㅔᯢՓ⫼ᬭ⿟ԡ㕂ϡ㛑ҸҎ⒵ᛣˈᇸ݊ᰃ೼ሣᐩߚ䕼⥛Ў800x600ҹϞⱘᚙމϟDŽ䖭ᯊˈህ㽕Փ⫼PlaceWindow੠SizeWindowߑ᭄ˈᅗӀⱘॳൟབϟ˖PlaceWindow(nObject,nDx,nDy,nCorner);ǂǂ䆹ߑ᭄⫼ᴹᬍবࣙᣀᑓਞ⠠೼ݙⱘにষⱘԡ㕂DŽ݊Ёখ᭄nObject⫼ᴹᣛᅮ㽕ᬍবԡ㕂ⱘにষᇍ䈵ˈᅗৃҹᰃϟ߫ؐПϔ˖ASKOPTIONSAskOptionsᇍ䆱ḚASKPATHAskPathᇍ䆱ḚASKTEXTAskTextᇍ䆱ḚBACKGROUND㚠᱃にষBILLBOARDᑓਞ⠠ENTERDISKEnterDiskᇍ䆱ḚFEEDBACKᙃᣛ⼎఼MMEDIA_AVI᪁ᬒϟϔϾAVI᭛ӊⱘにষSTATUS䖯ሩᣛ⼎఼TATUSDLGᇍ䆱Ḛ亢Ḑⱘ䖯ሩᣛ⼎఼ǂǂখ᭄nDx㸼⼎ϢnCornerᣛᅮ䖍Ḛⱘ∈ᑇ䎱⾏(ҹڣ㋴Ўऩԡ)DŽ՟བˈ㢹nObject㹿ᣛᅮЎFEEDBACKˈ߭ৃՓ⫼CENTERED㸼⼎∈ᑇሙЁDŽ᠔᳝にষᇍ䈵ⱘ㔎ⳕ∈ᑇԡ㕂䛑ЎሙЁDŽnDy㸼⼎ϢnCornerᣛᅮ䖍ḚⱘൖⳈ䎱⾏(ҹڣ㋴Ўऩԡ)DŽ՟བˈ㢹nObject㹿ᣛᅮЎFEEDBACKˈ߭ৃՓ⫼CENTERED㸼⼎∈ᑇሙЁDŽ᠔᳝にষᇍ䈵ⱘ㔎ⳕൖⳈԡ㕂䛑ЎሙЁDŽnCorner⫼ᴹᣛᅮ㹿nDx੠nDyখ㗗ⱘ䖍㾦ˈᅗৃҹᰃϟ߫ؐПϔ˖LOWER_LEFT㸼⼎Ꮊϟ㾦LOWER_RIGHT㸼⼎েϟ㾦UPPER_LEFT㸼⼎ᎺϞ㾦UPPER_RIGHT㸼⼎েϞ㾦CENTEREDሙЁSizeWindow(nObject,nDx,nDy);ǂǂ䆹ߑ᭄⫼ᴹᬍবᣛᅮにষⱘ໻ᇣDŽখ᭄nObject⫼ᴹᣛᅮ㽕ᬍব໻ᇣⱘにষᇍ䈵ˈᅗৃҹᰃϟ߫ؐПϔ˖BACKGROUND㚠᱃にষMETAFILEWMFḐᓣⱘᑓਞ⠠MMEDIA_AVI᪁ᬒϟϔϾAVI᭛ӊⱘにষǂǂখ᭄nDx੠nDy⫼ᴹᣛᅮにষⱘ∈ᑇ੠ൖⳈڣ㋴໻ᇣDŽǂǂ䳔㽕䇈ᯢⱘᰃ˖(1)⬅ѢϞ䗄ϸϾߑ᭄䛑䎳ሣᐩⱘߚ䕼⥛᳝݇ˈ಴ℸ೼Փ⫼䖭ϸϾߑ᳔᭄ࠡད䇗⫼GetExtentsߑ᭄⌟䆩ϔϟሣᐩⱘߚ䕼⥛DŽ݊ߑ᭄ॳൟབϟ˖124 InstallShieldㅔᯢՓ⫼ᬭ⿟GetExtents(nvDx,nvDy);(2)೼ᬍবにষԡ㕂ᯊˈሙЁৃҹՓሣᐩߚ䕼⥛ⱘᕅડޣᇣࠄ᳔Ԣ⿟ᑺˈԚ೼䆒㕂ᯊˈ㽕⊼ᛣPlaceWindowߑ᭄ⱘ᳔ৢϝϾখ᭄䛑㽕Փ⫼CENTEREDˈ՟བ˖PlaceWindow(FEEDBACK,CENTERED,CENTERED,CENTERED);PlaceWindow(STATUSDLG,CENTERED,CENTERED,CENTERED);(3)PlaceWindowߑ᭄ЁⱘnDxǃnDyϸϾখ᭄੠nCorner㋻ᆚⳌ݇ˈϨnCorner㸼⼎㚠᱃にষⱘ䖍㾦DŽ՟བˈ㢹ᇚᙃᣛ⼎఼㕂Ѣ㚠᱃にষⱘᎺϟ㾦ˈϨ䎱Ꮊϟ㾦ⱘ∈ᑇ䎱⾏Ў50ڣ㋴ˈൖⳈ䎱⾏Ў20ڣ㋴ˈ᳝߭ϟ߫ҷⷕ˖PlaceWindow(FEEDBACK,50,20,LOWER_LEFT);(4)ᇍѢ᳝ѯにষˈ䳔㽕⫼Enableߑ᭄ᴹ▔⌏DŽ՟བˈ㱑✊Enable੠PlaceWindowߑ᭄ߎ⦄ⱘܜৢ⃵ᑣᇍ㒧ᵰ≵᳝ᕅડˈԚ᳔དᇚEnableߑ᭄ᬒ೼ࠡ䴶DŽ4.3.5ਃࡼ⬏䴶ǂǂ䆌໮໻ൟᑨ⫼⿟ᑣⱘᅝ㺙⿟ᑣ䛑᳝ਃࡼ⬏䴶ˈབVC++ㄝ䕃ӊDŽ䗮䖛ਃࡼ⬏䴶ˈ䰸њৃҹᰒ⼎ᅝ㺙ⱘᑨ⫼⿟ᑣৡ⿄੠⠜ᴗㄝᦤ⼎ᙃ໪ˈ䖬Єᆠᑨ⫼⿟ᑣᅝ㺙⬏䴶ˈ㒭ᅝ㺙⿟ᑣ๲⏏њ䆌໮ࡼᗕ⡍ᗻ੠ϧϮ㾘㣗DŽǂǂ೼InstallShieldЁˈᅝ㺙⿟ᑣⱘਃࡼ⬏䴶ᰃ㞾ࡼᰒ⼎ⱘDŽ⫼᠋া䳔ᇚৡЎSetup.bmpԡ೒᭛ӊᬒ㕂ࠄᅝ㺙乍Ⳃ"SetupFiles"义䴶Ёⱘ"SplashScreenLanguageIndependent"Ⳃᔩϟˈ✊ৢ߯ᓎᮄⱘၦҟेৃDŽℸᯊᅝ㺙⿟ᑣ䖤㸠ৢˈ⫼᠋ᣛᅮⱘਃࡼ⬏䴶ᇚ㞾ࡼሙЁᰒ⼎DŽԚᔧ⫼᠋Փ⫼ProjectWizard߯ᓎϔϾᅝ㺙乍ⳂᯊˈInstallShieldᇚՓ⫼㔎ⳕⱘਃࡼ⬏䴶ˈབ೒4.8᠔⼎DŽ125 InstallShieldㅔᯢՓ⫼ᬭ⿟ǂǂ䳔㽕䇈ᯢⱘᰃ:(1)InstallShieldܕ䆌⫼᠋ᵘ䗴ⱘਃࡼ⬏䴶ⱘ买㡆᳔᭄໮Ў256㡆ˈԚৠᯊгᏺᴹ঺໪ϔϾ䯂乬DŽ㢹ᅝ㺙ᯊ㋏㒳ⱘ买㡆᭄Ў16㡆ˈ߭256㡆ⱘਃࡼ⬏䴶ᇚ᮴⊩ᰒ⼎DŽЎњ㛑᳝ᬜ㾷އ䖭ϔ䯂乬ˈInstallShieldܕ䆌䖬ܕ䆌⫼᠋ᵘ䗴঺ϔϾ16㡆ⱘᅝ㺙ਃࡼ⬏䴶ˈᑊҹSetup16.bmpৡˈInstallShield೼ᅝ㺙ᯊᇚ㞾ࡼḍ᥂㋏㒳ⱘ买㡆᭄䖯㸠ᢷ䗝DŽᔧ✊ˈ㢹⫼᠋ϡᛇ䖭Мخˈ䙷Мা㽕ᵘ䗴ϔϾৡЎSetup.bmpˈ买㡆ϡ䍙䖛16ⱘᅝ㺙ਃࡼ⬏䴶ህৃҹњDŽ(2)೼InstallShieldϧϮ⠜Ёˈ㢹೼থᏗ㒭⫼᠋ⱘᅝ㺙߱ྟ࣪᭛ӊSetup.iniЁⱘ[Startup]ϟᣛᅮAppName=MyApplicationؐˈ߭೼ᓔྟⱘᅝ㺙䖯⿟⍜ᙃᇍ䆱ḚЁᰒ⼎ߎ⫼᠋ⱘѻકৡ"MyApplication"126 InstallShieldㅔᯢՓ⫼ᬭ⿟4.4ᇍ䆱Ḛ⬠䴶ⱘᅮࠊǂǂ⬅Ѣᇍ䆱Ḛᰃᅝ㺙⬠䴶Ё᳔䞡㽕ⱘ㒘៤䚼ߚˈ಴㗠InstallShieldᦤկ䴲ᐌ໮ⱘᇍ䆱Ḛߑ᭄ᴹ⒵䎇њ⫼᠋ࠊ԰ᅝ㺙⿟ᑣⱘ䳔㽕DŽԚ䖭ѯᇍ䆱Ḛ↨䕗䗮⫼ˈ≵᳝ϾᗻˈϨᇍ䆱ḚЁⱘᄫԧǃ᭛ᴀ䇁㿔ᇍ᱂䗮⫼᠋ᴹ䇈ˈᑊϡሑҎᛣˈ಴Ў៥ӀᘏᏠᳯᇍ䆱ḚϞⱘ᭛ᄫᰃ"ㅔԧЁ᭛ˈᅟԧˈ9ো"DŽད೼InstallShieldⱘϧϮ⠜ЁᦤկњⳌᑨⱘᅮࠊ᥹ষˈ䖭Փᕫ៥Ӏ߯ᓎ݋᳝Ͼᗻ࣪⬠䴶ⱘᇍ䆱Ḛ៤Ўৃ㛑DŽ4.4.1Փ⫼ᇍ䆱Ḛᅮࠊ῵ᵓInstallShield5.5ℷ⹂ᅝ㺙ৢˈӮ೼"ExamplesCustomDialogVC++4Project"᭛ӊ།Ё໡ࠊϔѯ⫼Ѣᇍ䆱Ḛᅮࠊⱘ᭛ӊˈᅗӀЏ㽕᳝resource.h(䌘⑤༈᭛ӊ)ǃSdrc.h(Sdᇍ䆱Ḛ䌘⑤༈᭛ӊ)ǃ_Isuser.RC(䌘⑤᭛ӊ)੠_Isuser.mdp(乍Ⳃ᭛ӊ)ˈ䖭ѯ᭛ӊᵘ៤њ⫼VisualC++ᅮࠊᇍ䆱Ḛⱘ῵ᵓDŽᔧ⫼VisualC++ᇍᇍ䆱Ḛ䌘⑤᳈ᬍৢˈ៥Ӏህৃҹ೼VisualC++䖯㸠㓪䆥ˈѻ⫳_Isuser.dll˗ݡᇚ_Isuser.dll䇗ܹInstallShield䲚៤ᓔথ⦃๗SetupFiles义䴶Ёⱘᣛᅮⱘlanguage(s)੠operatingsystem(s)乍ⳂЁˈህৃҹ⫼㛮ᴀ䇁㿔䖯㸠㓪⿟њDŽǂǂ݋ԧℹ偸བϟ˖(1)ᮄᓎϔϾ᭛ӊ།(བMyDialog)ˈᇚ"CustomDialogVC++4Project"ݙᆍ໡ࠊࠄ䆹᭛ӊ།ЁDŽ(2)ᠧᓔVisualC++6.0ˈᇚMyDialogЁⱘ乍Ⳃ᭛ӊ_Isuser.mdp䇗ܹDŽ⊼ᛣˈ_Isuser.mdpᰃԢ⠜ᴀⱘ乍Ⳃ᭛ӊˈVisualC++6.0Ӯᇚ݊㞾ࡼ䕀ᤶDŽ(3)ᇚ乍ⳂᎹ԰ऎにষߛᤶࠄResource义䴶ˈሩᓔDialog䌘⑤ˈঠߏDialog乍ⳂϟⱘDLG_TEMPLATEˈ㒧ᵰབ೒4.9᠔⼎DŽ127 InstallShieldㅔᯢՓ⫼ᬭ⿟(4)߽⫼VisualC++ⱘᇍ䆱Ḛ㓪䕥఼԰བϟᬍˈ㒧ᵰབ೒4.10᠔⼎˖128 InstallShieldㅔᯢՓ⫼ᬭ⿟ǂǂᇚᇍ䆱Ḛⱘᷛ乬ᬍЎ"ᇍ䆱Ḛᅮࠊ"ˈᄫԧ䆒㕂Ў"ᅟԧˈ9ো"ˈIDোؐЎ13029˗ᑊ԰བϟᬍ˖ᇚᣝ䪂[Back]ⱘᷛ乬ᬍЎ"<Ϟϔℹ(&B)"ˈᇚᣝ䪂[Next]ⱘᷛ乬ᬍЎ"ϟϔℹ(&X)>"ˈᇚᣝ䪂[Cancel]ⱘᷛ乬ᬍЎ"প⍜"˗ǂǂ৥ᇍ䆱Ḛ⏏ࡴ"䴭ᗕ᭛ᴀ"᥻ӊˈᷛ乬Ў"ᢼোᮍᓣ˖"˗ǂǂ৥ᇍ䆱Ḛ⏏ࡴϸϾऩ䗝ᣝ䪂ˈᷛ乬ߚ߿Ў"䷇乥"੠"㛝ކ"ˈIDোؐߚ߿Ў110ˈ100˗ǂǂ৥ᇍ䆱Ḛ⏏ࡴ"䴭ᗕ᭛ᴀ"᥻ӊˈᷛ乬Ў"䗮І㸠ষ˖"˗ǂǂ৥ᇍ䆱Ḛ⏏ࡴϔϾ߫㸼ḚˈIDোؐ䆒Ў330ǂǂ䳔㽕䇈ᯢⱘᰃˈ⫼VisualC++৥ᇍ䆱Ḛ⏏ࡴ᥻ӊᯊˈᅗӮ㞾ࡼ㒭᥻ӊᅮНϔϾIDᷛ䆚ヺDŽ㢹೼݊ሲᗻᇍ䆱ḚЁᇚℸIDᷛ䆚ヺৢ䴶⏏Ϟ"=XXX"ˈህ㛑ᇚ䆹ᷛ䆚ヺ䌟ќⳌᑨⱘ᭄ؐˈ՟བ೒4.11ᰃᇚϞ䗄⏏ࡴⱘ߫㸼ḚⱘIDোؐ䆒Ў330ǂǂ㗠ϨˈЎњ㛑೼ᇍ䆱ḚЁᰒ⼎InstallShieldݙ䚼ᅮНⱘԡ೒ˈ⫼᠋ᖙ乏೼ᇍ䆱ḚЁ⏏ࡴϔϾ䴭ᗕ᭛ᴀ᥻ӊˈᑊՓ݊ᷛ乬ݙᆍЎ"@10550,10551;1;1;0,128,128;0,128,128"DŽ঺໪ˈᇍ䆱ḚⱘIDؐϔ㠀ᑨ໻Ѣ13000(㟇ᇥᑨ໻Ѣ12033)ˈ䖭ᰃ಴ЎInstallShieldᅮНⱘᇍ䆱ḚID᳔ؐ໻Ў12033DŽ㗠᥻ӊⱘIDؐ㱑≵᳝ҔМ䰤ࠊˈϡ䖛㢹ᶹⳟϔϟSdrc.h᭛ӊˈг䆌Ӯ㒭ᙼᏺᴹϔ⚍ਃথ੠ᐂࡽDŽ(6)㓪䆥ˈ㒧ᵰ೼MyDialogRelease᭛ӊ།Ёѻ⫳_Isuser.dll(7)݇䯁VisualC++ˈᠧᓔInstallShield5.5(8)߯ᓎϔϾBlankSetup㉏ൟⱘᅝ㺙乍Ⳃ(䆒݊㔎ⳕⱘ乍ⳂৡЎBlankSetup-1)(9)ᇚ乍ⳂᎹ԰ऎにষߛᤶࠄSetupFiles义䴶ˈᇚ߮ᠡ㓪䆥ѻ⫳ⱘ_Isuser.dll䇗ܹࠄLanguageIndependent乍ϟⱘOperatingSystemIndependentЁDŽ(10)㟇ℸˈᇍ䆱Ḛⱘ῵ᵓ߯ᓎᑊ䇗ܹᅠ↩DŽ129 InstallShieldㅔᯢՓ⫼ᬭ⿟4.4.2ᅮࠊᇍ䆱Ḛⱘ㛮ᴀ⿟ᑣ䖛⿟ǂǂϔᮺᇍ䆱Ḛ῵ᵓ߯ᓎᅠ↩ˈ⫼᠋ህৃҹ೼㛮ᴀᅝ㺙⿟ᑣЁ䖯㸠⌟䆩DŽ៥Ӏᣝϟ߫ℹ偸䖯㸠˖(1)ᇚInstallShield乍ⳂᎹ԰ऎにষߛᤶࠄScripts义䴶DŽ䗝ᅮ᳔Ϟϔሖⱘ"’BlankSetup-1’ScriptFiles"乍ˈেߏ哴ᷛˈҢᔍߎⱘᖿ᥋㦰ऩЁ䗝ᢽ"InsertFiles..."ҸˈᇚMyDialog᭛ӊ།Ёⱘresource.h䇗ܹDŽ(2)ऩߏ"resource.h"ˈ೼InstallShieldে䖍ⱘ᭛ḷにষЁߎ⦄䆹᭛ӊݙᆍDŽᇚresource.h᭛ӊⱘݙᆍᬍݭ˖#defineDLG_TEMPLATE13029//ᅮНⱘᇍ䆱ḚIDˈϢ߯ᓎⱘᇍ䆱Ḛ῵ᵓIDⳌৠ#defineID_PULSE100//ᅮНⱘ᥻ӊIDˈϢ"㛝ކ"ऩ䗝ᣝ䪂IDⳌৠ#defineID_TONE110//ᅮНⱘ᥻ӊIDˈϢ"䷇乥"ऩ䗝ᣝ䪂IDⳌৠ#defineID_COMPORT330//ᅮНⱘ᥻ӊIDˈϢ߫㸼ḚIDⳌৠ#ifdefAPSTUDIO_INVOKED#ifndefAPSTUDIO_READONLY_SYMBOLS#define_APS_NO_MFC1#define_APS_NEXT_RESOURCE_VALUE101#define_APS_NEXT_COMMAND_VALUE40001#define_APS_NEXT_CONTROL_VALUE1000#define_APS_NEXT_SYMED_VALUE101#endif#endif(3)ऩߏ"Setup.rul"乍ˈᠧᓔSetup.rul᭛ӊˈ⏏ࡴϟ߫ݙᆍ˖#include"Resource.h"//ᅮН[Back]ǃ[Next]੠[Cancel]ᣝ䪂ⱘᷛ䆚ؐˈ䖭ѯؐᑨϢᇍ䆱Ḛ῵ᵓЁⳌᑨⱘᷛ䆚ؐⳌৠ#defineSD_PBUT_BACK12#defineSD_PBUT_CONTINUE1#defineSD_PBUT_EXITSETUP9BOOLbDone;STRINGsvComPort;NUMBERnCmdValue,nPulseState,nToneState,nDial9State;LISTlistID;program//߯ᓎᰒ⼎೼߫㸼ḚЁⱘ䫒㸼listID=ListCreate(STRINGLIST);ListAddString(listID,"COMM1:",AFTER);ListAddString(listID,"COMM2:",AFTER);130 InstallShieldㅔᯢՓ⫼ᬭ⿟ListAddString(listID,"COMM3:",AFTER);ListAddString(listID,"COMM4:",AFTER);//⊼ݠᇍ䆱ḚEzDefineDialog("MYCOMDIALOG","","",DLG_TEMPLATE);//ᰒ⼎ᇍ䆱ḚbDone=FALSE;while(bDone=FALSE)nCmdValue=WaitOnDialog("MYCOMDIALOG");switch(nCmdValue)caseDLG_INIT:CtrlSetState("MYCOMDIALOG",ID_TONE,BUTTON_CHECKED);CtrlSetList("MYCOMDIALOG",ID_COMPORT,listID);//໘⧚⫼᠋ऩߏ[Next]ᣝ䪂ⱘ⍜ᙃcaseSD_PBUT_CONTINUE:CtrlGetCurSel("MYCOMDIALOG",ID_COMPORT,svComPort);nPulseState=CtrlGetState("MYCOMDIALOG",ID_PULSE);nToneState=CtrlGetState("MYCOMDIALOG",ID_TONE);bDone=TRUE;//໘⧚⫼᠋ऩߏ[Cancel]ᣝ䪂ⱘ⍜ᙃcaseSD_PBUT_EXITSETUP:bDone=TRUE;//໘⧚⫼᠋݇䯁ᇍ䆱Ḛⱘ⍜ᙃcaseDLG_CLOSE:bDone=TRUE;//໘⧚⫼᠋䗝Ёऩ䗝ᣝ䪂ⱘ⍜ᙃcaseID_PULSE:nPulseState=CtrlGetState("MYCOMDIALOG",ID_PULSE);if(nPulseState=BUTTON_CHECKED)thenCtrlSetState("MYCOMDIALOG",ID_TONE,BUTTON_UNCHECKED);CtrlSetState("MYCOMDIALOG",ID_PULSE,BUTTON_CHECKED);elseCtrlSetState("MYCOMDIALOG",ID_TONE,BUTTON_CHECKED);CtrlSetState("MYCOMDIALOG",ID_PULSE,BUTTON_UNCHECKED);endif;caseID_TONE:nToneState=CtrlGetState("MYCOMDIALOG",ID_TONE);if(nToneState=BUTTON_CHECKED)thenCtrlSetState("MYCOMDIALOG",ID_PULSE,BUTTON_UNCHECKED);trlSetState("MYCOMDIALOG",ID_TONE,BUTTON_CHECKED);elseCtrlSetState("MYCOMDIALOG",ID_TONE,BUTTON_UNCHECKED);CtrlSetState("MYCOMDIALOG",ID_PULSE,BUTTON_CHECKED);endif;131 InstallShieldㅔᯢՓ⫼ᬭ⿟//໘⧚ᇍ䆱Ḛ䫭䇃⍜ᙃcaseDLG_ERR:MessageBox("ݙ䚼ⱘᇍ䆱Ḛ䫭䇃ʽ",SEVERE);bDone=TRUE;ndswitch;endwhile;//㒧ᴳᇍ䆱ḚEndDialog("MYCOMDIALOG");//ᇚᇍ䆱Ḛ੠䫒㸼ҢݙᄬЁ䞞ᬒߎᴹReleaseDialog("MYCOMDIALOG");ListDestroy(listID);endprogram(4)ᇚ乍ⳂᎹ԰ऎにষߛᤶࠄMedia义䴶DŽऩߏMediaBuildWizard乍ˈ߯ᓎᮄⱘၦҟDŽ(5)㓪䆥ᑊ䖤㸠ˈ㒧ᵰབ೒4.12᠔⼎DŽǂǂҢҹϞⱘ㛮ᴀ⿟ᑣˈ៥Ӏৃҹᘏ㒧ߎ݊ϔ㠀ⱘҷⷕ䖛⿟˖(1)ᅮНᇍ䆱Ḛ੠᥻ӊⱘIDোˈ݊ؐᑨϢ߯ᓎⱘᇍ䆱Ḛ῵ᵓЁⳌᑨⱘIDϔ㟈˗(2)Փ⫼EzDefineDialogߑ᭄ᴹ⊼ݠᇍ䆱ḚˈҹInstallShield㛑䆚߿ᅗDŽᔧ✊ˈ៥ӀгৃҹՓ⫼DefineDialogߑ᭄ˈԚEzDefineDialog᳔ㅔऩˈ݊ॳൟབϟ˖EzDefineDialog(szDialogName,szDLL,szID,nID);132 InstallShieldㅔᯢՓ⫼ᬭ⿟ǂǂ݊Ёˈখ᭄szDialogName⫼ᴹᣛᅮϔϾଃϔⱘᇍ䆱Ḛৡ⿄˗szDLL⫼ᴹᣛᅮ৿᳝⊼ݠᇍ䆱ḚⱘDLL᭛ӊৡDŽ㢹ℸখ᭄ЎNULLˈInstallShieldᇚ೼_isuser.dll੠_isres.dllᇏᡒⳌᑨⱘᇍ䆱ḚDŽszID⫼ᴹᣛᅮᇍ䆱Ḛⱘᷛ䆚ヺৡ⿄ˈ㢹ᇍ䆱Ḛⱘᷛ䆚ᰃϔϾ᭄ؐˈ߭ℸখ᭄ЎNULLnID⫼ᴹᣛᅮᇍ䆱Ḛⱘᷛ䆚ヺ᭄ؐˈ㢹ᇍ䆱Ḛⱘᷛ䆚ᰃϔϾᄫヺІˈ߭ℸখ᭄Ў0DŽߑ᭄䖨ಲ0ᯊ㸼⼎⊼ݠ៤ࡳˈ䖨ಲDLG_ERR_ALREADY_EXISTS㸼⼎⫼᠋೼㛮ᴀ⿟ᑣ䆩೒⊼ݠϔϾᏆ㒣ᄬ೼ⱘᇍ䆱Ḛˈ䖨ಲDLG_ERR㸼⼎ϔϾϡ⹂ᅮⱘ䫭䇃ѻ⫳њDŽ(3)⫼ᕾ⦃䇁হϡᮁᰒ⼎ᇍ䆱Ḛˈᑊ໘⧚ᇍ䆱Ḛ੠᥻ӊⱘ⍜ᙃˈ݊ЁWaitOnDialog⫼Ѣᅮࠊᇍ䆱Ḛⱘᰒ⼎ˈ݊ॳൟབϟ˖WaitOnDialog(szDlgName);ǂǂ݊Ёˈখ᭄szDialogName⫼ᴹᣛᅮ㽕ᰒ⼎ⱘᇍ䆱Ḛৡ⿄DŽᔧᇍ䆱Ḛ䖨ಲ˖dialogcontrolID㸼⼎᥹ᬊࠄWM_COMMAND⍜ᙃⱘ᥻ӊIDোDLG_CLOSE㸼⼎ᇍ䆱Ḛेᇚ݇䯁DLG_ERR㸼⼎ѻ⫳䫭䇃DLG_INIT㸼⼎ᇍ䆱Ḛ߱ྟ࣪⍜ᙃ(4)⫼EndDialogߑ᭄㒧ᴳᇍ䆱Ḛⱘᰒ⼎DŽ(5)⫼ReleaseDialogߑ᭄䞞ᬒᇍ䆱Ḛ(ҹঞ䫒㸼)᠔ऴ⫼ⱘݙᄬぎ䯈4.4.3໘⧚ᇍ䆱Ḛ੠᥻ӊⱘ⍜ᙃǂǂϢVisualC++ⱘ⍜ᙃ᯴ᇘᴎࠊϡϔḋˈInstallShield೼㛮ᴀ⿟ᑣЁ໘⧚ᇍ䆱Ḛ੠᥻ӊⱘ⍜ᙃˈᰃ䗮䖛ϔϾ໻ⱘᓔ݇䇁হ䖯㸠ⱘDŽ՟བϟ䴶ⱘҷⷕ˖switch(nCmdValue)//໘⧚ᇍ䆱Ḛⱘ߱ྟ࣪⍜ᙃcaseDLG_INIT:CtrlSetState("MYCOMDIALOG",ID_TONE,BUTTON_CHECKED);CtrlSetList("MYCOMDIALOG",ID_COMPORT,listID);//໘⧚⫼᠋݇䯁ᇍ䆱Ḛⱘ⍜ᙃcaseDLG_CLOSE:bDone=TRUE;//໘⧚ᇍ䆱Ḛ䫭䇃⍜ᙃcaseDLG_ERR:essageBox("ݙ䚼ⱘᇍ䆱Ḛ䫭䇃ʽ",SEVERE);bDone=TRUE;//໘⧚⫼᠋ऩߏ[Next]ᣝ䪂ⱘ⍜ᙃ133 InstallShieldㅔᯢՓ⫼ᬭ⿟caseSD_PBUT_CONTINUE:...bDone=TRUE;//໘⧚⫼᠋ऩߏ[Cancel]ᣝ䪂ⱘ⍜ᙃcaseSD_PBUT_EXITSETUP:bDone=TRUE;//໘⧚ᇍ䆱Ḛ᥻ӊⱘҸ⍜ᙃcaseID_PULSE:...caseID_TONE:...endswitch;ǂǂ݊Ёˈ᥻ӊⱘ⍜ᙃ䗮ᐌᣛⱘᰃ᥻ӊⱘҸ⍜ᙃˈ಴ℸ໘⧚⍜ᙃᯊᰃẔ⌟WaitOnDialog䖨ಲⱘ᥻ӊIDؐˈ䖭ѯؐᖙ乏೼㛮ᴀ⿟ᑣЁ䞡ᮄᣛᅮDŽ㗠ᇍ䆱Ḛⱘ⍜ᙃϔ㠀ᰃ㋏㒳ݙ䚼ᅮНⱘˈᅗ䗮ᐌ᳝˖DLG_INITᅗᰃᇍᇍ䆱ḚWM_INITDIALOG⍜ᙃⱘ᯴ᇘDŽ೼ᇍ䆱Ḛᓔྟ߯ᓎˈᇍ䆱Ḛǂǂᰒ⼎ПࠡˈWaitOnDialog䖨ಲⱘ㄀ϔᴵ⍜ᙃDŽ⫼᠋ৃҹ೼ℸ⍜ᙃⱘᓔ݇䇁হЁ⏏ࡴϔѯ߱ྟ࣪ҷⷕDŽDLG_CLOSEᅗᰃᇍᇍ䆱ḚWM_CLOSE⍜ᙃⱘ᯴ᇘDŽᔧ䗝ᢽ㋏㒳㦰ऩЁⱘ"݇䯁"Ҹ៪ऩߏᇍ䆱ḚেϞ㾦ⱘ[݇䯁]ᣝ䪂ᯊˈWaitOnDialog䖨ಲ䆹⍜ᙃDŽDLG_ERRᇍ䆱ḚЁߎ⦄ӏԩ䫭䇃ˈWaitOnDialog䛑ᇚ䖨ಲℸ⍜ᙃDŽ4.4.4෎ᴀ᥻ӊⱘ᪡԰ǂǂЎњ㛑໘⧚ᅮࠊᇍ䆱ḚЁⱘ෎ᴀ᥻ӊˈInstallShieldᦤկњ䆌໮Ⳍ݇ⱘߑ᭄կ⫼᠋䇗⫼ˈབ㸼4.2᠔⼎DŽ134 InstallShieldㅔᯢՓ⫼ᬭ⿟ϟ䴶В՟ᴹ䇈ᯢϞ䗄ߑ᭄ⱘ⫼⊩DŽǂǂ⼎՟Ёˈ៥Ӏ߯ᓎϔϾབ೒4.13᠔⼎ⱘᇍ䆱ḚˈᔧҢ"偅ࡼ఼"ⱘ㒘ড়ḚЁ䗝ᢽᶤ偅ࡼ఼ᯊˈ"Ⳃᔩ"߫㸼Ḛᰒ⼎ߎ䆹偅ࡼ఼ϟⱘ᠔᳝᭛ӊ།(ϡࣙ৿ᄤ᭛ӊ།)ˈৠᯊ"䏃ᕘ"㓪䕥Ḛᰒ⼎ߎⳌᑨⱘ䏃ᕘDŽᔧ⫼᠋ঠߏ"Ⳃᔩ"߫㸼ḚЁⱘ߫㸼乍ᯊˈ㋏㒳䖬Ӯ㞾ࡼᇚ䆹᭛ӊ།ϟⱘᄤ᭛ӊ།ᰒ⼎೼߫㸼ḚЁDŽ135 InstallShieldㅔᯢՓ⫼ᬭ⿟ǂǂ䳔㽕䇈ᯢⱘᰃˈ೼ᴀ՟Ё䖬Փ⫼ϟ߫ϔѯᡔᎻ˖(1)⬅ѢCtrlDirߑ᭄৥߫㸼Ḛ฿ܹⱘ᭛ӊ།ݙᆍϡᬃᣕWindows95/98ⱘ䭓᭛ӊৡˈ಴ℸ៥Ӏ䳔㽕Փ⫼FindAllDirsᴹ᧰㋶⺕ⲬЁⱘ᭛ӊ།DŽ㗠ϨCtrlDir৥㒘ড়Ḛ฿ܹⱘ偅ࡼ఼োⱘḐᓣЎ[-X-]ˈϡ߽Ѣ⿟ᑣ᥻ࠊˈ಴ℸ៥ӀՓ⫼ExistsDiskᴹẔ⌟ᴎ఼Ё᠔ᄬ೼ⱘ偅ࡼ఼˗✊ৢᇚ㒧ᵰᬒܹ䫒㸼Ёˈᑊ⫼CtrlSetListߑ᭄ᇚݙᆍ฿ܹⳌᑨⱘ߫㸼Ḛ៪㒘ড়ḚЁDŽ(2)Ўњ㛑᳈ࡴ݋ԧഄ໘⧚᥻ӊⱘ⍜ᙃˈ៥ӀՓ⫼њCtrlGetSubCommandߑ᭄ˈ䆹ߑ᭄䖨ಲབϟ᠔⼎ⱘ݋ԧҸ⍜ᙃ˖LISTBOX_ENTER⫼᠋ঠߏ߫㸼ḚЁⱘ乍ⳂLISTBOX_SELECT⫼᠋ऩߏ߫㸼ḚЁⱘ乍ⳂEDITBOX_CHANGE㓪䕥Ḛݙᆍথ⫳ᬍব(3)߫㸼Ḛⱘݙᆍᰃ⫼ᄫヺІ䫒㸼᭄᥂฿ܹⱘDŽ↣⃵฿ܹࠡˈ䳔㽕⫼CtrlClearߑ᭄ᴹ⏙ぎ߫㸼ḚˈৠᯊЎњϡՓ䫒㸼ॳᴹ᭄᥂ݡ⃵฿ܹ߫㸼Ḛˈ៥Ӏ䖬䳔㽕⏙ぎ䫒㸼Ёⱘ᭄᥂DŽ㱑✊䫒㸼⏙ぎⱘᮍ⊩᳝ᕜ໮ˈԚ᳔Ⳉ᥹ǃ᳔ㅔऩⱘᮍ⊩ᰃܜߴ䰸䫒㸼ˈݡ߯ᓎ䫒㸼ˈབϟ᠔⼎˖ListDestroy(listDirID);listDirID=ListCreate(STRINGLIST);(4)ᇚᅮНᇍ䆱Ḛⱘ⿟ᑣҷⷕخ៤㞾ᅮНߑ᭄ⱘᔶᓣˈᮍ⫼᠋ⱘ䇗⫼DŽǂǂ݋ԧⱘ䖛⿟བϟ˖(1)ᠧᓔVisualC++6.0ˈᇚMyDialogЁⱘࠡ䴶ⱘ乍Ⳃ᭛ӊ_Isuser.mdp䇗ܹDŽ(2)ᇚ乍ⳂᎹ԰ऎにষߛᤶࠄResource义䴶ˈሩᓔDialog䌘⑤ˈᣝ"Ctrl+R"ᖿ᥋䬂⏏ࡴᮄⱘᇍ䆱Ḛ䌘⑤ˈখⳟ೒4.14136 InstallShieldㅔᯢՓ⫼ᬭ⿟(3)߽⫼VisualC++ⱘᇍ䆱Ḛ㓪䕥఼԰བϟᬍ˖ǂǂᇚᇍ䆱Ḛⱘᷛ乬ᬍЎ"䗝ᢽ᭛ӊ།"ˈᄫԧ䆒㕂Ў"ᅟԧˈ9ো"ˈIDোؐЎ13030˗ǂǂᇚᣝ䪂[OK]ⱘᷛ乬ᬍЎ"⹂ᅮ"ˈᇚᣝ䪂[Cancel]ⱘᷛ乬ᬍЎ"প⍜"˗ǂǂ৥ᇍ䆱Ḛ⏏ࡴಯϾ"䴭ᗕ᭛ᴀ"᥻ӊˈᷛ乬ߚ߿Ў"䇋䗝ᢽᅝ㺙ⱘ᭛ӊ།DŽ"ǃ"䏃ᕘ˖"ǃ"Ⳃᔩ˖"੠"偅ࡼ఼˖"˗ǂǂ৥ᇍ䆱Ḛ⏏ࡴϔϾ㓪䕥ḚˈIDোؐЎ200˗ǂǂ৥ᇍ䆱Ḛ⏏ࡴϔϾ߫㸼ḚˈIDোЎIDC_LIST2ˈؐЎ300˗ǂǂ৥ᇍ䆱Ḛ⏏ࡴϔϾ㒘ড়ḚˈIDোؐ䆒Ў400(4)㓪䆥DŽ㒧ᵰ೼MyDialogRelease᭛ӊ།Ёѻ⫳_Isuser.dll(5)݇䯁VisualC++ˈᠧᓔInstallShield5.5(6)ᇚϞϔ⃵߯ᓎⱘBlankSetup㉏ൟⱘᅝ㺙乍ⳂBlankSetup-1䇗ܹDŽ(7)ᇚ乍ⳂᎹ԰ऎにষߛᤶࠄSetupFiles义䴶ˈᇚ߮ᠡ㓪䆥ѻ⫳ⱘ_Isuser.dll䇗ܹࠄLanguageIndependent乍ϟⱘOperatingSystemIndependentЁDŽ(8)ᇚInstallShield乍ⳂᎹ԰ऎにষߛᤶࠄScripts义䴶DŽऩߏ"resource.h"ˈ೼InstallShieldে䖍ⱘ᭛ḷにষЁߎ⦄䆹᭛ӊݙᆍDŽ೼resource.h᭛ӊЁ⏏ࡴϟ߫ݙᆍ˖#defineDLG_TEMPLATE13029#defineDLG_CHOOSE13030#defineID_PULSE100#defineID_TONE110#defineID_COMPORT330#defineID_PATHEDIT200#defineID_DIRLIST300#defineID_DRIVECOMBO400//VisualC++Ёᇚ㔎ⳕⱘᣝ䪂IDOKǃIDCANCELⱘؐᅮНЎ1੠2#defineID_OK1137 InstallShieldㅔᯢՓ⫼ᬭ⿟#defineID_CANCEL2...(9)ऩߏ"Setup.rul"乍ˈᠧᓔSetup.rul᭛ӊˈ⏏ࡴϟ߫ݙᆍ˖#include"Resource.h"prototypeChooseFolder(BYREFSTRING);STRINGsvPath;programChooseFolder(svPath);MessageBox(svPath,INFORMATION);endprogramfunctionChooseFolder(svPath)BOOLbDone,bOK;UMBERnCmdValue;STRINGszDir,szDisk;LISTlistDriveID,listDirID;CHARch;beginlistDirID=ListCreate(STRINGLIST);listDriveID=ListCreate(STRINGLIST);//⌟䆩ᴎ఼Ёᄬ೼ⱘ偅ࡼ఼ch=’A‘;while(ch<’Z‘)Sprintf(szDisk,"%c:",ch);if(ExistsDisk(szDisk)=EXISTS)thenistAddString(listDriveID,szDisk,AFTER);endif;ch=ch+1;endwhile;if(StrLength(svPath)<1)thenszDir="C:\ProgramFiles";endif;EzDefineDialog("MYCHOOSEDIALOG",ISUSER,"",DLG_CHOOSE);Done=FALSE;bOK=FALSE;while(bDone=FALSE)nCmdValue=WaitOnDialog("MYCHOOSEDIALOG");switch(nCmdValue)caseDLG_INIT:CtrlSetText("MYCHOOSEDIALOG",ID_PATHEDIT,szDir);CtrlSetList("MYCHOOSEDIALOG",ID_DRIVECOMBO,listDriveID);GetDisk(szDir,szDisk);138 InstallShieldㅔᯢՓ⫼ᬭ⿟CtrlSetCurSel("MYCHOOSEDIALOG",ID_DRIVECOMBO,szDisk);szDisk=szDisk+"\";FindAllDirs(szDisk,EXCLUDE_SUBDIR,listDirID);CtrlSetList("MYCHOOSEDIALOG",ID_DIRLIST,listDirID);CtrlSetCurSel("MYCHOOSEDIALOG",ID_DIRLIST,szDir);//໘⧚⫼᠋᪡԰"偅ࡼ఼"㒘ড়Ḛⱘ⍜ᙃcaseID_DRIVECOMBO:CtrlGetCurSel("MYCHOOSEDIALOG",ID_DRIVECOMBO,szDir);szDir=szDir+"\";ListDestroy(listDirID);listDirID=ListCreate(STRINGLIST);FindAllDirs(szDir,EXCLUDE_SUBDIR,listDirID);CtrlClear("MYCHOOSEDIALOG",ID_DIRLIST);CtrlSetList("MYCHOOSEDIALOG",ID_DIRLIST,listDirID);CtrlSetCurSel("MYCHOOSEDIALOG",ID_DIRLIST,szDir);CtrlGetCurSel("MYCHOOSEDIALOG",ID_DIRLIST,szDir);CtrlSetText("MYCHOOSEDIALOG",ID_PATHEDIT,szDir);//໘⧚⫼᠋᪡԰"Ⳃᔩ"߫㸼Ḛⱘ⍜ᙃcaseID_DIRLIST:CtrlGetCurSel("MYCHOOSEDIALOG",ID_DIRLIST,szDir);CtrlSetText("MYCHOOSEDIALOG",ID_PATHEDIT,szDir);if(CtrlGetSubCommand("MYCHOOSEDIALOG")=LISTBOX_ENTER)thenListDestroy(listDirID);listDirID=ListCreate(STRINGLIST);FindAllDirs(szDir,EXCLUDE_SUBDIR,listDirID);CtrlClear("MYCHOOSEDIALOG",ID_DIRLIST);CtrlSetList("MYCHOOSEDIALOG",ID_DIRLIST,listDirID);endif;//໘⧚⫼᠋ऩߏ[⹂ᅮ]ᣝ䪂ⱘ⍜ᙃcaseID_OK:bOK=TRUE;bDone=TRUE;//໘⧚⫼᠋ऩߏ[প⍜]ᣝ䪂ⱘ⍜ᙃcaseID_CANCEL:bDone=TRUE;caseDLG_CLOSE:bDone=TRUE;caseDLG_ERR:139 InstallShieldㅔᯢՓ⫼ᬭ⿟MessageBox("ݙ䚼ⱘᇍ䆱Ḛ䫭䇃ʽ",SEVERE);bDone=TRUE;endswitch;endwhile;EndDialog("MYCHOOSEDIALOG");ReleaseDialog("MYCHOOSEDIALOG");ListDestroy(listDriveID);ListDestroy(listDirID);if(bOK=TRUE)thensvPath=szDir;endif;end;(10)ᇚ乍ⳂᎹ԰ऎにষߛᤶࠄMedia义䴶DŽऩߏMediaBuildWizard乍ˈ߯ᓎᮄⱘၦҟDŽ(11)㓪䆥ᑊ䖤㸠ˈ㒧ᵰখ㾕೒4.13DŽᔧ⫼᠋ऩߏ[⹂ᅮ]ᣝ䪂ˈ᠔䗝ᢽⱘ᭛ӊ།ݙᆍᇚsvPathখ᭄䖨ಲDŽ140 InstallShieldㅔᯢՓ⫼ᬭ⿟4.5⬠䴶ⱘ∝࣪ࠡ䴶ⱘᇍ䆱Ḛᅮࠊᮍ⊩䅽៥Ӏⳳℷ乚⬹њInstallShieldⱘৃᠽሩⱘ㛑࡯ˈԚ䖭⾡ᮍ⊩া㛑⫼ѢInstallShieldⱘϧϮ⠜ˈ㗠ᇍѢ݊InstallShieldⱘVisualC++6⠜ᴀ(㢹݊Ҫ⠜ᴀ)ⱘ⫼᠋ᴹ䇈ˈ߭াདᖡ⮯ࡆ⠅њDŽ✊㗠ᇍॳ᳝ⱘᇍ䆱Ḛ⬠䴶䖯㸠ᅮࠊैᰃᐌᐌ䳔㽕ⱘˈ㱑✊ˈ៥Ӏϡϔᅮ䴲㽕ᬍᕫ䴶Ⳃܼ䴲ˈԚ㟇ᇥ䳔㽕ᇚᇍ䆱ḚЁⱘ㣅᭛ব៤Ё᭛DŽ䖭ህᰃ៥Ӏᐌ䇈ⱘ"∝࣪"䕃ӊ∝࣪ⱘᮍ⊩੠Ꮉ݋᳝ᕜ໮ˈԚ䖭ϡᰃᴀ㡖᠔㽕䅼䆎ⱘݙᆍDŽᴀ㡖᠔㽕䯤䗄ⱘᰃབԩ⫼VisualC++ՓInstallShield᠔߯ᓎⱘᅝ㺙⿟ᑣⱘ᠔᳝⬠䴶ব៤Ё᭛ˈᑊህ∝࣪ৢⱘⳌ݇᭛ӊབԩࠊ԰៤㸹ϕᅝ㺙⿟ᑣ԰ϔѯ᥶䅼DŽ4.5.1ὖ䗄ǂǂ䕃ӊЁ᭛࣪ᰃϔ乍⬅ᴹᏆЙⱘӴ㒳ˈ⬅Ѣ㞾䑿ⱘ䇁㿔᭛࣪⦃๗ⱘᕅડˈՓᕫ㒱໻᭄⫼᠋䛑ؒ৥ѢՓ⫼Ё᭛䕃ӊ˗ᇍѢ㣅᭛䕃ӊᴹ䇈ˈेᰃ䴲ᐌӬ⾔ˈ⫼᠋ҡ✊ᛳ㾝ϡᛝᖿˈॳ಴ᰃϡдᛃDŽЎњՓӬ⾔ⱘ㣅᭛䕃ӊЁ᭛࣪ˈ䆌໮⿟ᑣਬঞ⠅ད㗙ᛇߎ䆌໮ᖿ䗳᳝ᬜⱘǃҸҎ⿄༛ⱘ∝࣪ᮍ⊩DŽԚ៥Ӏϡᦤ׵೼᮴ᥜᴗण䆂ⱘᚙމϟⳈ᥹ᇍ䕃ӊᴀ䑿䖯㸠∝࣪ˈ䖭ᰃ಴Ў∝࣪ⱘᴀ䑿ᰃᇍ䕃ӊ䖯㸠ᬍˈ᳝ᯊϡ㒣ᛣഄህӮ䖱ডњljⶹ䆚ѻᴗᡸᴵ՟NJǃlj⠜ᴗǃ㨫԰ᴗ⊩NJҹঞljϧ߽⊩NJㄝ⊩㾘DŽ4.5.2⫼⫼⫼VisualC++∝࣪ǂǂҢᅮࠊᇍ䆱Ḛⱘ䖛⿟ᕫࠄਃথˈ៥Ӏৃҹ⫼VisualC++ᠧᓔInstallShield5.5ⱘᇍ䆱Ḛ䌘⑤䖯㸠ᬍˈ䖭ϔ⚍ˈ⫼᠋ৃҹҢInstallShield5.5ⱘᐂࡽ䇈ᯢЁᕫࠄ䆕ᅲDŽInstallShieldⱘᇍ䆱Ḛ੠Sdᇍ䆱Ḛ䌘⑤䛑ᰃᄬᬒ೼_IsRes.Dll᭛ӊЁ(ԡѢ"RedistributableCompressedFiles009-EnglishIntel32"᭛ӊ།)ˈা㽕߽⫼VisualC++ᇍ䆱Ḛ㓪䕥఼ᇍ䌘⑤Ёⱘ᭛ᴀݙᆍ䖯㸠ᬍेৃ䍋ࠄ∝࣪ⱘⳂⱘDŽԚᰃˈ⫼VisualC++∝࣪ৢⱘDLL(ঞEXE)᭛ӊা㛑೼WindowsNTЁᠡ㛑ᄬⲬˈ㗠೼Windows95/98Ёैϡ㛑ᄬDŽ಴ℸˈϟ䴶ⱘℹ偸ᰃ೼WindowsNTЁ䖯㸠ⱘ˖(1)佪ܜᇚॳᴹⱘ_IsRes.Dll໡ࠊࠄ঺໪ϔϾ᭛ӊ།Ёˈ䖭䞠؛ᅮЎD:MyDLL(2)೼WindowsNTЁˈਃࡼVisualC++6.0ˈ䗝ᢽ"File"㦰ऩ->"Open"Ҹˈᔍߎ䗮⫼"ᠧᓔ"ᇍ䆱ḚˈᠧᓔD:MyDLLЁⱘ_IsRes.Dll᭛ӊˈ⊼ᛣϔᅮ㽕ᇚ"Openas"ሲᗻ䆒Ў"Resource"ˈ141 InstallShieldㅔᯢՓ⫼ᬭ⿟བ೒4.15᠔⼎DŽ(3)䖭ᯊˈ_IsRes.Dllⱘ䌘⑤ህ㹿ᠧᓔњˈབ೒4.16᠔⼎DŽ݊Ёⱘᇍ䆱Ḛ䌘⑤Dialogᰃ៥Ӏ᳔݇ᖗⱘDŽ(4)ሩᓔ"Dialog"乍ˈৃҹⳟࠄInstallShieldᅮНⱘ᠔᳝ᇍ䆱ḚDŽ142 InstallShieldㅔᯢՓ⫼ᬭ⿟ǂǂ䗝ᅮ᠔᳝ⱘᇍ䆱Ḛˈབ೒4.17᠔⼎ˈᑊেߏ哴ᷛˈҢᔍߎⱘᖿ᥋㦰ऩЁ䗝ᢽ"Properties..."Ҹˈ೼ᔍߎⱘሲᗻᇍ䆱ḚЁᇚ᠔᳝ⱘᇍ䆱Ḛ䇁㋏⬅"English[U.S.]"ᬍЎ"Chinese[P.R.C]"DŽབ೒4.18᠔⼎DŽ(5)ঠߏᶤϾᇍ䆱Ḛˈ߭ᰒ⼎݊ᇍ䆱Ḛ῵ᵓDŽߚ߿ᇚᇍ䆱ḚᄫԧᬍЎ"ᅟԧˈ9ো"ˈᇍ䆱Ḛ੠᠔᳝᥻ӊⱘᷛ乬ᬍ៤∝ᄫDŽ(6)ৠḋˈ⫼᠋ৃҹᇚ᠔᳝ⱘᇍ䆱Ḛ῵ᵓ԰Ϟ䗄ᬍDŽ(7)݊Ҫⱘ䌘⑤བBitmapǃStringTableǃVersionㄝгৃ԰㉏Ԑⱘᬍˈ䖭䞠ϡݡ䯤䗄DŽ(8)ᄬᬍˈ䗔ߎVisualC++DŽ㟇ℸˈ_IsRes.Dll∝࣪ᅠ↩DŽ143 InstallShieldㅔᯢՓ⫼ᬭ⿟4.5.3∝࣪㸹ϕᅝ㺙⿟ᑣࠊ԰ǂǂ㉏Ԑⱘˈ⫼᠋䖬ৃҹ⫼Ϟ䗄ᮍ⊩ݡᇍԡѢ"RedistributableCompressedFiles009-EnglishIntel32"᭛ӊ།ЁⱘIsUninst.Exeҹঞ"RedistributableUncompressedFiles009-EnglishOSIndependent"᭛ӊ།Ёⱘ_setup.dll䖭ϸϾ᭛ӊ䖯㸠∝࣪DŽ䖭ḋˈህ䆕њInstallShieldࠊ԰ⱘᅝ㺙⿟ᑣ⬠䴶ᰃЁ᭛ⱘDŽǂǂЎњ䅽ᙼⱘ᳟টӀߚѿᙼⱘ៤ᵰˈ⫼᠋ৃҹᇚ䖭ϝϾ᭛ӊ(_IsRes.DllǃIsUninst.Exeঞ_setup.dll)خ៤㸹ϕᅝ㺙⿟ᑣⱘᔶᓣথᏗ㒭ᙼⱘ᳟টӀDŽᔧ✊ˈ೼ࠊ԰ℸ㉏ᅝ㺙⿟ᑣᯊ䖬ᑨᥠᦵϔѯᡔᎻDŽ1ˊẔ⌟InstallShieldⱘᄬ೼ᗻǂǂẔ⌟⹀ⲬЁᰃ৺ᄬ೼InstallShieldˈা䳔߸ᮁᰃ৺ᄬ೼InstallShieldⱘ䖤㸠᭛ӊIde.exeेৃDŽᔧ✊ˈ៥Ӏ䖬ᑨ䆹㗗㰥ϟ߫ϔѯᚙމ˖(1)ᶹᡒࠄⱘIde.exeⱘ⠜ᴀৃ㛑ϡᰃInstallShield5.5⠜DŽ䖭⾡ᚙމᖙ乏䇗⫼VerGetFileVersionᴹẔ⌟݊⠜ᴀোᰃ৺Ў"5.50.136.0"(2)೼⹀ⲬЁৃ㛑ᅝ㺙໮Ͼϡৠ⠜ᴀⱘInstallShieldˈेIde.exeϡℶϔϾDŽ䖭⾡ᚙމ䳔㽕ᇚ᠔᳝ᶹᡒࠄⱘIde.exe᭛ӊ⫼䫒㸼ⱘᔶᓣᄬϟᴹˈ✊ৢϔϾϔϾഄ䖯㸠⠜ᴀⱘẔ⌟DŽǂǂ݋ԧҷⷕབϟ˖//ᶹᡒࠄⱘInstallShieldᅝ㺙䏃ᕘ⬅svPathখ᭄䖨ಲfunctionExistsInstallShield(svPath)ISTlistDrive,listIDE;UMBERnResult,nFind,nStrLen;STRINGsvString,svSubStr,szFileName,svResult,svVersionNumber;BOOLbFind;beginbFind=FALSE;szFileName="Ide.exe";listDrive=ListCreate(STRINGLIST);//߯ᓎᄬᬒ⹀Ⲭ偅ࡼ఼োⱘ䫒㸼listIDE=ListCreate(STRINGLIST);//߯ᓎᄬᬒIde.exeϡৠ⠜ᴀⱘ䏃ᕘ䫒㸼GetValidDrivesList(listDrive,FIXED_DRIVE,10000000);nResult=ListGetFirstString(listDrive,svString);//ᶹᡒ⹀ⲬЁᄬ೼ⱘ᠔᳝Ide.exewhile(nResult!=END_OF_LIST)svString=svString+":";nFind=FindAllFiles(svString,szFileName,svResult,RESET);while(nFind=0)144 InstallShieldㅔᯢՓ⫼ᬭ⿟ListAddString(listIDE,svResult,AFTER);nFind=FindAllFiles(svString,szFileName,svResult,CONTINUE);ndwhile;nResult=ListGetNextString(listDrive,svString);endwhile;nResult=ListGetFirstString(listIDE,svString);//߸ᮁ᠔᳝Ide.exeЁᰃ৺ᄬ೼⠜ᴀো"5.50.136.0"ⱘ᭛ӊwhile(nResult!=END_OF_LIST)VerGetFileVersion(svString,svVersionNumber);if(svVersionNumber="5.50.136.0")thenbFind=TRUE;nStrLen=StrLength(svString);StrSub(svSubStr,svString,0,nStrLen-15);StrRemoveLastSlash(svSubStr);svPath=svSubStr;gotoEndFind;endif;nResult=ListGetNextString(listIDE,svString);endwhile;EndFind:ListDestroy(listDrive);ListDestroy(listIDE);returnbFind;end;ǂǂབᵰ⫼᠋㾝ᕫϞ䗄ᶹᡒⱘᮍ⊩᠔㢅䌍ⱘᯊ䯈໾䭓ˈৃҹ䆩䆩ϟ䴶ⱘᮍ⊩ˈᅗᰃẔ⌟Windows㋏㒳ⱘ"ᓔྟ"->"⿟ᑣ"㦰ऩ乍Ёᰃ৺ᄬ೼InstallShield⿟ᑣ乍DŽ݋ԧҷⷕབϟ˖functionExistsInstallShieldFast(svPath)STRINGszFolderName,szItemName,svCmdLine,svWrkDir,svIconPath;STRINGsvShortCutKey;NUMBERnvIconIndex,nvMinimizeFlag,nResult,nStrLen;BOOLbFind;beginbFind=FALSE;szItemName="InstallShield5.5ProfessionalEdition";szFolderName=FOLDER_PROGRAMS^szItemName;nResult=QueryProgItem(szFolderName,szItemName,svCmdLine,svWrkDir,svIconPath,nvIconIndex,svShortCutKey,145 InstallShieldㅔᯢՓ⫼ᬭ⿟nvMinimizeFlag);if(nResult=IS_ITEM)thenbFind=TRUE;nStrLen=StrLength(svCmdLine);StrSub(svPath,svCmdLine,0,nStrLen-15);StrRemoveLastSlash(svPath);endif;returnbFind;end;ǂǂҷⷕЁˈߑ᭄QueryProgItemህᰃ⫼ᴹᶹᡒᶤϾ⿟ᑣ乍៪᭛ӊ།ⱘˈᅗⱘॳൟབϟ˖QueryProgItem(szFolderName,szItemName,svCmdLine,svWrkDir,svIconPath,nvIconIndex,svShortCutKey,nvMinimizeFlag);ǂǂ݊ЁˈszFolderName⫼ᴹᣛᅮࣙ৿⿟ᑣ乍៪Ⳃᔩⱘ᭛ӊ།ৡ⿄DŽᅗгৃҹᰃϟ߫ؐПϔ˖FOLDER_DESKTOPḠ䴶᭛ӊ།OLDER_STARTMENU"ᓔྟ"ⱘ᭛ӊ།FOLDER_STARTUP"ਃࡼ"㦰ऩ᭛ӊ།ǂǂ㗠szItemName⫼ᴹᣛᅮ㽕Ẕ⌟ⱘ⿟ᑣ乍៪Ⳃᔩৡ⿄DŽsvCmdLine⫼ᴹ䖨ಲ⿟ᑣ乍ⱘৃᠻ㸠᭛ӊⱘҸ㸠ݙᆍˈ៪㗙ᰃᖿ᥋ᮍᓣⱘⳂᷛݙᆍˈ៪㗙ᰃ⿟ᑣⳂᔩⱘ䏃ᕘܼৡDŽsvWrkDir⫼ᴹ䖨ಲ⿟ᑣ乍ⱘᎹ԰Ⳃᔩⱘ䏃ᕘܼৡDŽsvIconPath⫼ᴹ䖨ಲ.ico៪.exe᭛ӊⱘ䏃ᕘܼৡDŽnvIconIndex⫼ᴹ䖨ಲ⫼Ѣ⿟ᑣ乍ⱘ೒ᷛ㋶ᓩDŽsvShortCutKey⫼ᴹ䖨ಲ⿟ᑣ乍ⱘᖿ᥋䬂DŽnvMinimizeFlag⫼ᴹ䖨ಲ⿟ᑣ乍ⱘ䖤㸠ᮍᓣˈᅗৃ㛑ᰃNULL៪RUN_MINIMIZEDˈߚ߿㸼⼎ᐌ㾘にষ੠にষ᳔ᇣ࣪DŽߑ᭄䖨ಲIS_ITEM㸼⼎szItemNameᰃϔϾ⿟ᑣ乍៪ᖿ᥋ᮍᓣˈ㗠䖨ಲIS_FOLDER߭㸼⼎szItemNameᰃϔϾ⿟ᑣ᭛ӊ།ˈ䖨ಲ<0ⱘؐ߭㸼⼎ϡ㛑ᶹᡒDŽǂǂᔧ✊ˈ᳔དⱘᮍ⊩ᰃ䗮䖛⊼ݠ㸼ᴹᶹᡒˈ೼ϟϔゴᇚ䅼䆎䖭ᮍ䴶ⱘݙᆍDŽ2ˊ໡ࠊᑊ໛ӑॳᴹⱘ᭛ӊᅝ㺙∝࣪㸹ϕ᳔㒜ⳂⱘᰃᇚⳌ݇᭛ӊ໡ࠊࠄ㋏㒳ЁˈЎℸ៥Ӏ䳔㽕⊼ᛣҹϟ޴Ͼᮍ䴶˖(1)Ẕ⌟∝࣪㸹ϕᰃ৺㒣ᅝ㺙䖛˗(2)ᇚॳᴹⱘ᭛ӊ໛ӑ˗(3)೼߯ᓎᮄⱘၦҟৢˈ䳔㽕ᇚ∝࣪Ⳍ݇㸹ϕ᭛ӊ໡ࠊࠄথᏗⱘᅝ㺙ၦҟЁˈЎ䙓ܡ∝࣪ৢⱘ_IsRes.DllǃIsUninst.Exeঞ_setup.dll᭛ӊϢᅝ㺙⿟ᑣᴀ䑿ⱘކさˈ᳔དᇚ䖭ϝϾ᭛ӊⱘ᭛ӊৡ԰䗖ᔧⱘ᳈ᬍˈབ೼᭛ӊৡࠡࡴ"P"ㄝDŽ݋ԧҷⷕབϟ˖146 InstallShieldㅔᯢՓ⫼ᬭ⿟functionInstallChineseFiles(szPath)STRINGszSrcDir1,szSrcDir2;NUMBERnResult;beginszSrcDir1=szPath^"Redistributable\CompressedFiles\0009-English\Intel32";szSrcDir2=szPath^"Redistributable\UncompressedFiles\0009-English"+"\OSIndependent";VarSave(SRCTARGETDIR);//ᇚ㔎ⳕⱘ⑤᭛ӊ།੠Ⳃᷛ᭛ӊ།ԡ㕂ᄬSRCDIR=szSrcDir1;//䆒ᅮ㔎ⳕⱘ⑤᭛ӊ།ԡ㕂TARGETDIR=szSrcDir1;//䆒ᅮ㔎ⳕⱘⳂᷛ᭛ӊ།ԡ㕂//䞡ᮄৡⳌ݇᭛ӊˈҹ԰Ў໛ӑnResult=RenameFile("_IsRes.Dll","_IsRes.bak");if(nResult<0)gotoEndInstall;RenameFile("IsUninst.Exe","IsUninst.bak");SRCDIR=szSrcDir2;TARGETDIR=szSrcDir2;RenameFile("_setup.dll","_setup.bak");VarRestore(SRCTARGETDIR);//ᘶ໡㔎ⳕⱘ⑤᭛ӊ།੠Ⳃᷛ᭛ӊ།ԡ㕂VarSave(SRCTARGETDIR);TARGETDIR=szSrcDir1;//໡ࠊⳌ݇᭛ӊˈ⊼ᛣᖙ乏㽕XCopyFileЁᣛᅮCOMP_UPDATE_DATEখ᭄ˈ//䖭ḋা᳝ᔧ໡ࠊ᭛ӊ↨ॳᴹⱘ᭛ӊⱘ᮹ᳳ੠ᯊ䯈ᮄᯊˈᠡӮ໡ࠊˈ䙓ܡњ䞡໡ᅝ㺙DŽnResult=XCopyFile("P_IsRes.Dll","",COMP_UPDATE_DATE);nResult=XCopyFile("PIsUninst.Exe","",COMP_UPDATE_DATE);if(nResult=0)thenSRCDIR=TARGETDIR;RenameFile("P_IsRes.Dll","_IsRes.Dll");RenameFile("PIsUninst.Exe","IsUninst.Dll");VarRestore(SRCTARGETDIR);endif;TARGETDIR=szSrcDir2;nResult=XCopyFile("P_setup.dll","",COMP_UPDATE_DATE);if(nResult=0)thenSRCDIR=TARGETDIR;RenameFile("P_setup.dll","_setup.dll");endif;147 InstallShieldㅔᯢՓ⫼ᬭ⿟VarRestore(SRCTARGETDIR);EndInstall:if(nResult<0)thenMessageBox("Ꮖ㒣ᅝ㺙䖛InstallShieldⱘ∝࣪㸹ϕʽ",SEVERE);endif;returnnResult;end;3ˊᅠᭈⱘᅝ㺙⿟ᑣǂǂᅠᭈⱘᅝ㺙⿟ᑣབϟ˖prototypeExistsInstallShieldFast(BYREFSTRING);prototypeInstallChineseFiles(STRING);STRINGsvPath;BOOLnvSetup,nvDelete,bHasSetup;programSetDialogTitle(DLG_MSG_SEVERE,"ᅝ㺙༅䋹");SetDialogTitle(DLG_MSG_INFORMATION,"ᅝ㺙ᙃ");if(ExistsInstallShieldFast(svPath)=FALSE)thenMessageBox("ᅝ㺙InstallShield5.5∝࣪㸹ϕПࠡˈᑨܜᅝ㺙InstallShield",SEVERE);exit;endif;if(InstallChineseFiles(svPath)!=0)thenMessageBox("ᅝ㺙InstallShield5.5ⱘ∝࣪㸹ϕ༅䋹ʽ",SEVERE);elseMessageBox("Ꮖ៤ࡳᅝ㺙InstallShield5.5ⱘ∝࣪㸹ϕ!",INFORMATION);endif;endprogramfunctionExistsInstallShieldFast(svPath)...begin//ৠࠡend;148 InstallShieldㅔᯢՓ⫼ᬭ⿟functionInstallChineseFiles(szPath)...begin//ৠࠡend;ǂǂ㟇ℸЎℶˈ⫼᠋ৃҹЎϔϾWindowsϔ㠀ᑨ⫼⿟ᑣᓎゟϔϾ乛݋߯ᛣⱘᅝ㺙⿟ᑣDŽԚᰃˈ៥Ӏ䖬≵᳝⍝ঞࠄ᭄᥂ᑧᑨ⫼⿟ᑣǃVisualBasicᑨ⫼⿟ᑣҹঞ݊Ҫ໡ᴖⱘᑨ⫼⿟ᑣⱘࣙ㺙ˈϟϔゴᇚ䅼䆎䖭ϔᮍ䴶ⱘݙᆍDŽ149 InstallShieldㅔᯢՓ⫼ᬭ⿟㄀㄀㄀5ゴゴゴ⏅ܹᅝ㺙⿟ᑣࠊ԰ǂǂࠡ䴶ⱘ޴ゴݙᆍ෎ᴀ⒵䎇њࠊ԰ϔ㠀ᅝ㺙⿟ᑣⱘ䳔∖ˈԚᇍѢ⿡⿡໡ᴖⱘᑨ⫼䕃ӊᴹ䇈ˈ݊ᅝ㺙⿟ᑣⱘᵘ䗴᳝ᯊবᕫᓖᐌೄ䲒ˈ՟བϔϾODBC᭄᥂ᑧᑨ⫼⿟ᑣᅝ㺙ৢˈ᭄݊᥂⑤㢹⬅ᅝ㺙⿟ᑣ㞾ࡼᅮНˈ߭៤ЎϔϾᡔᴃ䲒乬DŽᔧ✊ˈInstallShield5.5ⱘⳌ݇῵ᵓЎ⫼᠋ⱘᅝ㺙⿟ᑣᦤկњᖙ㽕ⱘ㒧ᵘḚᶊˈᦤ催њࠊ԰ᅝ㺙⿟ᑣⱘᬜ⥛ˈᑊϨInstallShield5.5ЁⱘᶤѯᴎࠊՓᕫ⫼᠋ᕜᆍᯧഄᇍᅝ㺙㒘ӊ੠ᅝ㺙㉏ൟ䖯㸠᥻ࠊDŽ䰸ℸП໪ˈᅝ㺙Ё䖬ᐌᐌ⍝ঞࠄডᅝ㺙ǃ໮Ͼᅝ㺙⿟ᑣঞ䇗䆩ㄝϔѯ⏅ܹ䆱乬DŽ5.1ডᅝ㺙ǂǂᔧᅝ㺙೼䅵ㅫᴎЁⱘᑨ⫼⿟ᑣ៪䕃ӊϡݡ䳔㽕ᯊˈ⫼᠋ᕜᏠᳯ㛑ᇚᅗӀᅠܼߴ䰸ᥝˈ䖭Ͼ䖛⿟⿄Ўডᅝ㺙DŽ䱣InstallShield5.5ϔ䍋থ㸠ⱘUnInstallShieldᰃϔϾ䴲ᐌϡ䫭ⱘডᅝ㺙Ꮉ݋ᑨ⫼⿟ᑣˈᅗ㱑✊ᕜᇣᎻˈԚ݊ࡳ㛑ϔ⚍ϡ䗞㡆˗㗠Ϩˈᔧ⫼InstallShield乍Ⳃ৥ᇐ߯ᓎⱘᅝ㺙⿟ᑣ䖯㸠ᑨ⫼⿟ᑣᅝ㺙ৢˈUnInstallShieldᇚ㞾ࡼ䎳䏾ᑊ䆄ᔩᅝ㺙ݙᆍˈҢ㗠Փᕫডᅝ㺙ᅠܼᕏᑩഄߴ䰸ᑨ⫼⿟ᑣDŽ5.1.1ὖ䗄ǂǂ೼Windows98ЁˈᇍϔϾᑨ⫼⿟ᑣ䖯㸠ডᅝ㺙ˈৃᣝϟ߫ℹ偸䖯㸠˖(1)䗝ᢽḠ䴶ⱘ"ᓔྟ"㦰ऩ->"䆒㕂"->"᥻ࠊ䴶ᵓ"Ҹˈᠧᓔ"᥻ࠊ䴶ᵓ"にষDŽ(2)ᡒࠄ"⏏ࡴ/ߴ䰸⿟ᑣ"乍ˈঠߏ哴ᷛᎺ䬂(Ӵ㒳ᮍᓣ)(3)ᔍߎ"⏏ࡴ/ߴ䰸⿟ᑣሲᗻ"ᇍ䆱Ḛˈ೼ᑨ⫼⿟ᑣ߫㸼Ё䗝ᢽᣛᅮⱘᑨ⫼⿟ᑣৡˈབ"YourApplicationName"(4)ᔍߎ"ConfirmFileDeletion"䆶䯂ᇍ䆱Ḛˈऩߏ[ᰃ]ᣝ䪂䖯㸠ϟϔℹDŽ(5)ऩߏ[ᰃ]ᣝ䪂ˈ㋏㒳ᇚ㞾ࡼ䖯㸠䆹ᑨ⫼⿟ᑣⱘߴ䰸ˈ㒧ᵰབ೒5.1᠔⼎DŽ150 InstallShieldㅔᯢՓ⫼ᬭ⿟(6)ऩߏ[OK]ᣝ䪂ˈ݇䯁ᇍ䆱ḚDŽǂǂϞ䗄ߴ䰸ᑨ⫼⿟ᑣⱘ䖛⿟ᰃ㞾ࡼᠻ㸠ⱘˈԚџᅲϞˈUnInstallShield䖤㸠ᯊ䖬䳔㽕ϔϾৃᠻ㸠᭛ӊ੠ϔϾডᅝ㺙⊼ݠ᭛ӊDŽϔ㠀ഄˈIsUninst.exeᰃUnInstallShieldⱘৃᠻ㸠᭛ӊDŽᔧথᏗ⫼InstallShield乍Ⳃ৥ᇐ߯ᓎⱘᅝ㺙⿟ᑣᯊˈIsUninst.exe㹿㞾ࡼय़㓽ࠄ_sys1.cab᭛ӊЁDŽ㗠ᔧ⿟ᑣᅝ㺙ৢˈIsUninst.exe䖬Ӯ㹿㞾ࡼ໡ࠊࠄWindows᭛ӊ།ЁDŽUnInstallShieldⱘডᅝ㺙⊼ݠ᭛ӊᰃ೼↣⃵䖯㸠ᑨ⫼⿟ᑣᅝ㺙ᯊ⬅InstallShield㞾ࡼ߯ᓎⱘˈ⫼ᴹ䆄ᔩᅝ㺙䖛⿟ЁϢডᅝ㺙Ⳍ݇ⱘџӊDŽ㸼5.1߫ߎњৃҹ㹿UnInstallShield䆄ᔩⱘߑ᭄ৡDŽ151 InstallShieldㅔᯢՓ⫼ᬭ⿟ǂǂᅲ䰙Ϟˈা᳝䖤㸠ᅝ㺙㛮ᴀ⿟ᑣЁⱘDeinstallStartߑ᭄ৢˈডᅝ㺙⊼ݠᠡӮⳳℷᓔྟDŽϔ㠀ᴹ䇈ˈ㔎ⳕⱘ⊼ݠ᭛ӊৡЎDeisLxx.isuˈ݊Ё"xx"ᰃҢ1ᓔྟⱘ乎ᑣোˈ㢹ᔧࠡᑨ⫼⿟ᑣ᭛ӊ།Ё≵᳝ӏԩডᅝ㺙⊼ݠ⊼ⱘᯊ䖭ˈӊ᭛ݠ᭛ӊৡЎDeisL1.isu5.1.2IsUninst.exeҸ㸠খ᭄UnInstallShieldⱘৃᠻ㸠᭛ӊIsUninst.exeৃҹՓ⫼ϔѯҸখ᭄ˈབ㸼5.2᠔⼎DŽ152 InstallShieldㅔᯢՓ⫼ᬭ⿟ǂǂ䳔㽕䇈ᯢⱘᰃˈIsUninst.exe੠ᣛᅮⱘҸ㸠খ᭄П䯈ϔᅮ㽕᳝ぎḐˈᑊϨ㢹᭛ӊⱘ䏃ᕘৡЁ᳝ぎḐˈ߭ᖙ乏೼᭛ӊ䏃ᕘৡⱘϸ䖍⫼ঠᓩোᣀ䍋ᴹDŽ5.1.3ᓎゟডᅝ㺙ǂǂ೼ᅝ㺙㛮ᴀ⿟ᑣЁᓎゟϔϾᅠᭈⱘডᅝ㺙ࡳ㛑ˈϔ㠀㽕䖯㸠ϟ߫ℹ偸˖(1)ܜ䇗⫼InstallationInfoߑ᭄(ᖙ䳔ⱘ)ЎDeinstallStartߑ᭄԰ޚ໛˗(2)䇗⫼DeinstallStart(ᖙ䳔ⱘ)߯ᓎডᅝ㺙⊼ݠ⊼㸠䖯Ё㸼ݠ⊼೼ᑊӊ᭛ݠ˗(3)䇗⫼RegDBSetItem(ᖙ䳔ⱘ)೼᥻ࠊ䴶ᵓЁ"⏏ࡴ/ߴ䰸"ᇍ䆱ḚЁⱘᑨ⫼⿟ᑣ߫㸼Ё⏏ࡴডᅝ㺙ⱘᑨ⫼⿟ᑣৡˈᑊ೼⊼ݠ⊼㸠䖯Ё㸼ݠ˗(4)ЎњѢ⫼᠋ⱘডᅝ㺙᪡԰ˈ䖬ᑨᇚᑨ⫼⿟ᑣⱘডᅝ㺙Ҹᬒܹ⿟ᑣ᭛ӊ།ЁDŽǂǂϞ䗄䖛⿟ЁⱘInstallationInfoǃDeinstallStartҹঞRegDBSetItemߑ᭄ⱘॳൟབϟ˖InstallationInfo(szCompany,szProduct,szVersion,szProductKey);ǂǂ䆹ߑ᭄ᰃ⫼ᴹЎDeinstallStartߑ᭄ᣛᅮⳌᑨⱘ݀ৌৡ⿄ǃѻકৡ⿄ǃ⠜ᴀোҹঞᑨ⫼⿟ᑣⱘৃᠻ㸠᭛ӊৡDŽখ᭄szCompanyᣛᅮ݀ৌⱘৡ⿄ˈInstallShieldՓ⫼szCompanyখ᭄೼⊼ݠ㸼Ёⱘ[HKEY_LOCAL_MACHINE]Softwareϟ߯ᓎϔϾ䬂DŽszProductᣛᅮѻકⱘৡ⿄ˈInstallShieldՓ⫼szProductখ᭄೼⊼ݠ㸼Ёⱘ[HKEY_LOCAL_MACHINE]Softwareϟ߯ᓎϔϾ䬂DŽszVersion⫼ᴹᣛᅮ⠜ᴀোˈInstallShieldՓ⫼szVersionখ᭄೼⊼ݠ㸼Ёⱘ[HKEY_LOCAL_MACHINE]Software\ϟ߯ᓎϔϾ䬂DŽszProductKey⫼ᴹᣛᅮᑨ⫼⿟ᑣⱘৃᠻ㸠᭛ӊৡˈInstallShieldՓ⫼szProductKeyখ᭄೼⊼ݠ㸼Ёⱘ[HKEY_LOCAL_MACHINE]SoftwareMicrosoftWindowsCurrentVersionAppPathsϟ߯ᓎⳌᑨⱘᑨ⫼⿟ᑣ䏃ᕘˈԚ䖭Ͼᑨ⫼⿟ᑣ䏃ᕘ䬂া᳝䗮䖛䇗⫼ߑ᭄RegDBSetItemᠡӮⳳℷ㹿߯ᓎDŽ153 InstallShieldㅔᯢՓ⫼ᬭ⿟DeinstallStart(szDefLogPath,svLogFile,szKey,lStyle);ǂǂ䆹ߑ᭄ᰃ⫼ᴹ೼⊼ݠ⊼㺙ᅝডᇍঞҹ䬂㺙ᅝডᑣ⿟⫼ᑨⱘ݇Ⳍᓎ߯Ё㸼ݠ᭛ӊ䖯㸠߱ྟ࣪DŽখ᭄szDefLogPath⫼ᴹᣛᅮডᅝ㺙⊼ݠ᭛ӊᬒ㕂ⱘ䏃ᕘܼৡˈϡ㽕ࣙ৿᭛ӊৡDŽsvLogFile⫼ᴹᣛᅮডᅝ㺙⊼ݠ⊼㺙ᅝডⱘⳕ㔎⫼Փ߭ˈ""Ў᭄খℸ㢹DŽৡӊ᭛ⱘӊ᭛ݠ᭛ӊৡDŽszKey⫼ᴹᣛᅮ㽕߯ᓎⱘᑨ⫼⿟ᑣডᅝ㺙ⱘ䬂ৡDŽlStyleখ᭄ᖙ乏Ў0RegDBSetItem(nItem,szValue);ǂǂ䆹ߑ᭄ᰃ⫼ᴹ೼ᑨ⫼⿟ᑣ䏃ᕘ䬂ৡ៪ᑨ⫼⿟ᑣডᅝ㺙䬂ৡϟ䆒㕂Ⳍ݇ⱘ䬂ؐDŽখ᭄szValue⫼ᴹᣛᅮⳌᑨⱘ䬂ؐDŽnItem⫼ᴹᣛᅮ㽕䆒㕂ⱘ䬂ৡˈᅗৃҹᰃϟ߫ؐПϔ˖REGDB_APPPATH೼ᑨ⫼⿟ᑣ䏃ᕘ䬂ৡϟ䆒㕂[Path]䬂ؐDŽREGDB_APPPATH_DEFAULT೼ᑨ⫼⿟ᑣ䏃ᕘ䬂ৡϟ䆒㕂[DefaultPath]䬂ؐDŽREGDB_UNINSTALL_NAME೼ডᅝ㺙䬂ৡϟ䆒㕂[DisplayName]䬂ؐDŽᣝ✻Ϟ䗄ⱘℹ偸ˈ៥Ӏৃҹ⫼ϟ߫ⱘㅔऩ⼎՟ᴹᅲ⦄ᑨ⫼⿟ᑣⱘডᅝ㺙ࡳ㛑DŽ[՟Ex_UnInstall]ᅲ⦄ᑨ⫼⿟ᑣⱘডᅝ㺙ࡳ㛑DŽ//ᅮН᠔䳔㽕ⱘヺোᐌ䞣#defineAPPBASE_PATH"៥ⱘⳂᔩ"#defineCOMPANY_NAME"៥ⱘ݀ৌ"#definePRODUCT_NAME"៥ⱘᑨ⫼⿟ᑣ"#definePRODUCT_VERSION"6.0"#definePRODUCT_KEY"test.exe"#defineDEINSTALL_KEY"Test_DeinstKey"#defineUNINSTALL_NAME"៥ⱘᑨ⫼⿟ᑣ6.0"#definePROGRAM_FOLDER_NAME"៥ⱘᑨ⫼⿟ᑣ"STRINGszMsg,svTarget,svResult,svUninstLogFile,svFolder,szProgram;programstart://䗝ᢽᅝ㺙Ⳃⱘԡ㕂szMsg="䗝ᢽϔϾⳂⱘԡ㕂.";svTarget=TARGETDISK^APPBASE_PATH;if(AskDestPath("",szMsg,svTarget,0)=BACK)then154 InstallShieldㅔᯢՓ⫼ᬭ⿟gotostart;endif;InstallationInfo(COMPANY_NAME,PRODUCT_NAME,PRODUCT_VERSION,PRODUCT_KEY);DeinstallStart(svTarget,svUninstLogFile,DEINSTALL_KEY,0);RegDBSetItem(REGDB_UNINSTALL_NAME,UNINSTALL_NAME);//೼⿟ᑣ㦰ऩЁ⏏ࡴডᅝ㺙㦰ऩ乍svFolder=PROGRAM_FOLDER_NAME;CreateProgramFolder(svFolder);szProgram=UNINST;szProgram=szProgram+"-f"+svUninstLogFile;AddFolderIcon(svFolder,"unInstallShield",szProgram,WINDIR,"",0,"",REPLACE);ndprogramǂǂ䆹⿟ᑣ೼Windows98Ё䖤㸠ৢˈ㒧ᵰЎ˖(1)೼"ᓔྟ"->"⿟ᑣ"㦰ऩЁˈ߯ᓎњ"៥ⱘᑨ⫼⿟ᑣ"㦰ऩˈ䆹㦰ऩЁࣙ৿њ"UnInstallShield"Ҹˈ݊䫒᥹ⱘݙᆍЎ"C:WINDOWSIsUninst.exe-fC:៥ⱘⳂᔩDeIsL1.isu"(2)᥻ࠊ䴶ᵓⱘ"⏏ࡴ/ߴ䰸⿟ᑣሲᗻ"ᇍ䆱Ḛⱘᑨ⫼⿟ᑣ߫㸼Ё৿᳝"៥ⱘᑨ⫼⿟ᑣ6.0"˗(3)㔎ⳕᅝ㺙ৢˈᑨ⫼⿟ᑣⱘᎹ԰᭛ӊ།Ў"C:៥ⱘⳂᔩ"ˈ䆹᭛ӊ།Ёᄬ೼ϔϾডᅝ㺙⊼ݠ᭛ӊDeIsL1.isu155 InstallShieldㅔᯢՓ⫼ᬭ⿟5.2ᅝ㺙㉏ൟ੠㒘ӊ᥻ࠊǂ㔎ⳕⱘᅝ㺙⿟ᑣ乍Ⳃϔ㠀䛑ࣙᣀCompact(㋻ޥ)ǃTypical(݌ൟ)੠Custom(ᅮࠊ)ϝϾᅝ㺙㉏ൟˈҹঞ↣Ͼᅝ㺙㉏ൟ䛑᳝"ProgramFiles"ǃ"ExampleFiles"ǃ"HelpFiles"੠"SharedDLLs"ㄝ㒘ӊDŽ䖭ѯᅝ㺙㉏ൟ੠㒘ӊⱘ᥻ӊ᮶ৃҹ೼䲚៤ᓔথ⦃๗ЁⳈ᥹᪡԰ˈгৃҹ䗮䖛㓪⿟ᴹ᥻ࠊDŽ5.2.1ᅝ㺙㉏ൟ᥻ࠊǂǂ೼InstallShield5.5Ёˈা᳝SdSetupTypeExৃҹՓ⫼䰸CompactǃTypical੠CustomП໪ⱘ໮Ͼᅝ㺙㉏ൟˈᑊϨܕ䆌⫼᠋ᇍᅝ㺙㉏ൟ䖯㸠ᅮࠊDŽ՟བϟ䴶ⱘ䖛⿟˖(1)߯ᓎϔϾBlankSetup㉏ൟⱘᅝ㺙乍Ⳃ(䆒݊㔎ⳕⱘ乍ⳂৡЎBlankSetup-1)(2)ᇚ乍ⳂᎹ԰ऎにষߛᤶࠄSetupTypes义䴶DŽ(3)೼SetupTypes义䴶Ёˈ䗝ᅮ᳔Ϟϔሖⱘ"’BlankSetup-1’SetupTypes"乍ˈᑊেߏ哴ᷛˈҢᔍߎⱘᖿ᥋㦰ऩЁ䗝ᢽ"NewSetupType"ҸDŽ(4)䖭ᯊˈᅝ㺙㉏ൟЁ⏏ࡴњϔϾ"NewSetupType1"㉏ൟDŽ(5)䗝ᅮᮄ⏏ࡴⱘᅝ㺙㉏ൟ乍ˈেߏ哴ᷛˈҢᔍߎⱘᖿ᥋㦰ऩЁ䗝ᢽ"Rename"ҸDŽᑊᇚ"NewSetupType1"ᬍЎ"Minimum"(6)ձ⃵েߏ৘Ͼᅝ㺙㉏ൟˈҢᔍߎⱘᖿ᥋㦰ऩЁ䗝ᢽ"Properties"ҸDŽߚ߿ᇚᅗӀⱘሲᗻᬍ៤ϟ߫㒧ᵰ˖ǂǂǂᅝ㺙㉏ൟDescriptionDisplayNameMinimum᳔ᇣᅝ㺙ˈ໻㑺䳔㽕50M⹀Ⲭぎ䯈DŽ᳔ᇣCompact㋻ޥᅝ㺙ˈ໻㑺䳔㽕80M⹀Ⲭぎ䯈DŽ㋻ޥTypical݌ൟᅝ㺙ˈ໻㑺䳔㽕120M⹀Ⲭぎ䯈(ϔ㠀⫼᠋ⱘᅝ㺙ᮍᓣ)݌ൟCustomᅮࠊᅝ㺙ˈ᳔໮䳔㽕150M⹀Ⲭぎ䯈(催㑻⫼᠋ⱘᅝ㺙ᮍᓣ)ᅮࠊ(7)ᇚ乍ⳂᎹ԰ऎにষߛᤶࠄMedia义䴶DŽऩߏMediaBuildWizard乍ˈ߯ᓎᮄⱘၦҟDŽ(8)ᠧᓔ㛮ᴀᅝ㺙⿟ᑣ᭛ӊSetup.rulˈ⏏ࡴϟ߫ҷⷕ˖#include"sddialog.h"STRINGszTitle,szMsg,svSetupType;programDisable(BACKBUTTON);szTitle="ᅝ㺙㉏ൟ";szMsg="⚍পᙼᏠᳯⱘᅝ㺙㉏ൟˈ✊ৢᣝ[Next]ᣝ䪂";SdSetupTypeEx(szTitle,szMsg,"",svSetupType,0);endprogram156 InstallShieldㅔᯢՓ⫼ᬭ⿟#include"sddialog.rul"(9)㓪䆥ᑊ䖤㸠DŽ㒧ᵰབ೒5.2᠔⼎DŽ5.2.2㒘ӊ᥻ࠊǂǂᇍ㒘ӊⱘϔ㠀᪡԰䖛⿟བϟ˖(1)߯ᓎϔϾBlankSetup㉏ൟⱘᅝ㺙乍Ⳃ(䆒݊㔎ⳕⱘ乍ⳂৡЎBlankSetup-2)(2)ᇚ乍ⳂᎹ԰ऎにষߛᤶࠄComponents义䴶DŽ(3)䖭ᯊˈᅝ㺙㉏ൟЁᏆ⏏ࡴњϔϾ"NewComponent1"㉏ൟˈ䗝Ёᑊߴ䰸ᅗDŽ(4)೼Components义䴶Ёˈ䗝ᅮ᳔Ϟϔሖⱘ"’BlankSetup-2’Components"乍ˈᑊেߏ哴ᷛˈҢᔍߎⱘᖿ᥋㦰ऩЁ䗝ᢽ"ComponentWizard..."ҸDŽ(5)䖭ᯊˈᔍߎབ೒5.3᠔⼎ⱘᇍ䆱Ḛˈ೼᥼㤤ⱘ㒘ӊৡ߫㸼ḚЁ䗝ᅮ"SharedFiles"乍ˈᑊऩߏ[ϟϔℹ]ᣝ䪂DŽ157 InstallShieldㅔᯢՓ⫼ᬭ⿟(6)ᔍߎབ೒5.4᠔⼎ⱘᇍ䆱Ḛˈ⬭㔎ⳕؐˈऩߏ[ᅠ៤]ᣝ䪂ৢˈ㋏㒳ህӮ⏏ࡴϔϾৡЎ"SharedFiles"㒘ӊDŽ158 InstallShieldㅔᯢՓ⫼ᬭ⿟(7)䞡໡Ϟ䗄᪡԰ˈݙ೼ӊ㒘Componentⱘⳕ㔎ᴹॳৠ䖲ˈḋ䖭DŽӊ㒘Ͼϝࡴ⏏Ⳃ乍㺙ᅝЎݡϔ᳝݅ಯϾ㒘ӊˈৡ⿄ߚ߿ᰃ"SharedFiles"ǃ"HelpFiles"ǃ"SampleFiles"੠"NewComponent0"(8)䗝ᅮ"SampleFiles"ˈᑊেߏ哴ᷛˈҢᔍߎⱘᖿ᥋㦰ऩЁ䗝ᢽ"Rename"ҸDŽᑊᇚ"SampleFiles"ᬍЎ"Examples"DŽ㉏Ԑⱘˈᇚ"NewComponent0"ᬍЎ"Executable"(9)ձ⃵ऩߏ৘Ͼᅝ㺙㒘ӊˈߚ߿ᇚᅗӀⱘሲᗻᬍЎབ㸼5.3᠔⼎ⱘ㒧ᵰDŽ㸼ЁˈNewFileGroup1ǃNewFileGroup2੠NewFileGroup3ᰃ೼ᅝ㺙乍ⳂⱘFileGroups义䴶Ё߯ᓎⱘᮄⱘ᭛ӊ㒘DŽ(10)ᇚ乍ⳂᎹ԰ऎにষߛᤶࠄMedia义䴶DŽऩߏMediaBuildWizard乍ˈ߯ᓎᮄⱘၦҟDŽ(11)ᠧᓔ㛮ᴀᅝ㺙⿟ᑣ᭛ӊSetup.rulˈ⏏ࡴϟ߫ҷⷕ˖#include"sddialog.h"STRINGszTitle,szMsg,szDir;programszTitle="䗝ᢽ㒘ӊ";szMsg="䗝ᢽᙼ䳔㽕ᅝ㺙ⱘ㒘ӊˈ⏙䰸ϡ䳔㽕ⱘ㒘ӊDŽ";szDir="C:\ProgramFiles\Temp";SdComponentDialog2(szTitle,szMsg,szDir,"");endprogram#include"sddialog.rul"(12)㓪䆥ᑊ䖤㸠DŽ㒧ᵰབ೒5.5᠔⼎DŽ159 InstallShieldㅔᯢՓ⫼ᬭ⿟ǂǂҢϞ䴶ⱘ⼎՟䖛⿟ৃҹⳟߎ˖䗮䖛InstallShieldⱘᓔথ⦃๗ᇍ㒘ӊⱘ᪡԰ˈ៥Ӏৃҹᆍᯧഄᅲ⦄㒘ӊⱘ䗝ᢽҹঞⳌ݇᭛ӊⱘӴ䗕ˈ䖭ᰃϔ⾡᳔〇ཹⱘᮍ⊩DŽᔧ✊ˈ៥Ӏгৃ೼ᅝ㺙㛮ᴀ⿟ᑣЁⳈ᥹ᇍ㒘ӊ䖯㸠⏏ࡴǃ䆒ᅮㄝ᪡԰DŽ՟བϟ䴶ⱘҷⷕ䖛⿟ˈ݊㒧ᵰ੠೒5.5ᰃϔḋⱘDŽ[՟Ex_ScriptComponent]Ⳉ᥹⫼㛮ᴀ⿟ᑣᇍ㒘ӊ䖯㸠᪡԰DŽ#include"sddialog.h"#defineCOMP1"ᖙ乏ⱘৃᠻ㸠᭛ӊ"#defineCOMP1SIZE7005184#defineCOMP1DESC"䆹㒘ӊࣙ৿䆹⿟ᑣ᠔ᖙ乏ⱘৃᠻ㸠᭛ӊ"#defineCOMP2"݅ѿ᭛ӊ"#defineCOMP2SIZE123904#defineCOMP2DESC"䗝Ёℸ㒘ӊˈᇚᅝ㺙䆹⿟ᑣⱘ݅ѿ᭛ӊ"#defineCOMP3"ᐂࡽ᭛ӊ"#defineCOMP3SIZE134144#defineCOMP3DESC"䗝Ёℸ㒘ӊˈᇚᅝ㺙䆹⿟ᑣⱘⳌᑨⱘᐂࡽ᭛ӊ"#defineCOMP4"⼎՟᭛ӊ"#defineCOMP4SIZE82944#defineCOMP4DESC"䗝Ёℸ㒘ӊˈᇚᅝ㺙䆹⿟ᑣⱘVisualC++6.0ⱘ⼎՟᭛ӊ"#defineDESTDIR"C:\ProgramFiles\Temp"#defineSDCOMPTITLE"䗝ᢽ㒘ӊ"#defineSDCOMPMSG"䗝ᢽᙼ䳔㽕ᅝ㺙ⱘ㒘ӊˈ⏙䰸ϡ䳔㽕ⱘ㒘ӊDŽ"STRINGszDir;NUMBERnData;160 InstallShieldㅔᯢՓ⫼ᬭ⿟program//ᅮНϔϾᮄⱘmediaৡ⿄MEDIA="MyComponent";//⏏ࡴ㄀ϔϾ㒘ӊComponentAddItem(MEDIA,COMP1,COMP1SIZE,TRUE);//䆒㕂㄀ϔϾ㒘ӊⱘⳌ݇ሲᗻComponentSetData(MEDIA,COMP1,COMPONENT_FIELD_DESCRIPTION,nData,COMP1DESC);ComponentAddItem(MEDIA,COMP2,COMP2SIZE,TRUE);ComponentSetData(MEDIA,COMP2,COMPONENT_FIELD_DESCRIPTION,nData,COMP2DESC);ComponentAddItem(MEDIA,COMP3,COMP3SIZE,TRUE);ComponentSetData(MEDIA,COMP3,COMPONENT_FIELD_DESCRIPTION,nData,COMP3DESC);ComponentAddItem(MEDIA,COMP4,COMP4SIZE,TRUE);ComponentSetData(MEDIA,COMP4,COMPONENT_FIELD_DESCRIPTION,nData,COMP4DESC);szDir=DESTDIR;//䆒㕂Ⳃⱘ᭛ӊ།SdComponentDialog2(SDCOMPTITLE,SDCOMPMSG,szDir,"");//ᘶ໡ॳᴹⱘmediaMEDIA="DATA";endprogram#include"sddialog.rul"ǂǂϞ䗄⿟ᑣЁˈComponentAddItem੠ComponentSetDataᰃ⫼Ѣ㒘ӊ⏏ࡴ੠䆒ᅮⱘϸϾЏ㽕ߑ᭄ˈᅗӀⱘॳൟབϟ˖ComponentAddItem(szMedia,szComponent,nDataSize,bSelected);ǂǂ䆹ߑ᭄⫼ᴹ߯ᓎϔϾা䗖⫼Ѣscript-created㒘ӊ㋏߫ⱘ㒘ӊDŽখ᭄szMedia⫼ᴹᣛᅮscript-created㒘ӊ㋏߫ⱘၦҟৡDŽ㢹ᣛᅮⱘၦҟৡϡᄬ೼ˈ߭ᇚ㞾ࡼ߯ᓎDŽszComponent⫼ᴹᣛᅮ㽕⏏ࡴⱘ㒘ӊˈϡ㛑ЎNULLnDataSize⫼ᴹᣛᅮ䆹㒘ӊ᠔ࣙ৿ⱘ᭛ӊᄫ㡖᭄DŽbSelected⫼ᴹᣛᯢ䆹㒘ӊⱘ㔎ⳕ䗝ᅮ⢊ᗕDŽЎTRUEᯊˈ㸼⼎䗝Ё˗ЎFALSEᯊˈ㸼⼎᳾䗝ЁDŽComponentSetData(szMedia,szComponent,nInfo,nData,szData);ǂǂ䆹ߑ᭄⫼ᴹ䆒㕂ᶤϾ㒘ӊⱘⳌ݇ሲᗻˈ䖭ѯሲᗻ੠InstallShieldᓔথ⦃๗Ёⱘ㒘ӊሲᗻ෎ᴀϔϔᇍᑨDŽখ᭄szMedia⫼ᴹᣛᅮscript-created㒘ӊ㋏߫ⱘၦҟৡDŽszComponent⫼ᴹᣛᅮ㽕䆒㕂ⱘ㒘ӊDŽnData⫼ᴹᣛᅮ䆒㕂ⱘ᭄ؐDŽszData⫼ᴹᣛᅮ䆒㕂ⱘ᭛ᴀDŽnInfo⫼ᴹᣛᅮ㽕䆒㕂ⱘሲᗻ㉏ൟˈᅗৃҹᰃϟ߫ؐПϔ˖161 InstallShieldㅔᯢՓ⫼ᬭ⿟COMPONENT_FIELD_DESCRIPTION㒘ӊⱘᦣ䗄OMPONENT_FIELD_FTPLOCATION㒘ӊⱘFTPഄഔCOMPONENT_FIELD_HTTPLOCATION㒘ӊⱘHTTPഄഔCOMPONENT_FIELD_VISIBLE㒘ӊᰃ৺೼䗝ᢽ㒘ӊᇍ䆱ḚЁᰒ⼎ߎᴹDŽⳌᑨⱘnDataЎTRUE(ᰒ⼎)៪FALSE(ϡᰒ⼎)COMPONENT_FIELD_SELECTED㒘ӊⱘ䗝Ё⢊ᗕDŽⳌᑨⱘnDataЎTRUE(䗝Ё)៪FALSE(᳾䗝Ё)COMPONENT_FIELD_MISC㒘ӊⱘ݊Ҫ᭛ᴀCOMPONENT_FIELD_DISPLAYNAME㒘ӊⱘᰒ⼎ৡ⿄ǂǂ䳔㽕䇈ᯢⱘᰃˈ೼ᅝ㺙߱ྟ࣪ᯊˈ㋏㒳ব䞣MEDIAⱘ㔎ⳕؐ㹿䆒㕂៤"DATA"ˈ㢹⫼᠋⫼script-createdᴎࠊ߯ᓎ㒘ӊˈᑊ᳈ᬍњMEDIAⱘؐˈ߭೼䇗⫼ComponentMoveDataǃCreateShellObjects៪CreateRegistrySetߑ᭄Пࠡˈᖙ乏ᇚMEDIAⱘؐ䞡ᮄ䆒㕂៤ॳᴹⱘ"DATA"162 InstallShieldㅔᯢՓ⫼ᬭ⿟5.3ࠊ԰᭄᥂ᑧᑨ⫼⿟ᑣⱘᅝ㺙ǂǂ೼ࠊ԰ᅝ㺙⿟ᑣᯊˈབᵰϔ㠀ᑨ⫼⿟ᑣⱘ䖤㸠⦃๗াᰃ䳔㽕ϔѯⳌᑨⱘDLL᭛ӊˈ䙷М䖭⾡㉏ൟⱘᅝ㺙⿟ᑣᰃ䴲ᐌᆍᯧࠊ԰ⱘDŽ՟བˈϔ㠀ⱘVisaulBasic6.0ᑨ⫼⿟ᑣ⿟ᑣা䳔㽕೼Windows᪡԰㋏㒳ⱘSystemⳂᔩЁᅝ㺙Msvbvm60.dll੠ComCat.dll᭛ӊህৃҹ䖤㸠њDŽԚᰃˈ㢹ᰃϔϾ᭄᥂ᑧᑨ⫼⿟ᑣˈᅝ㺙⿟ᑣⱘᵘ䗴ህবᕫ໡ᴖњˈ಴ℸ៥Ӏϡҙ䳔㽕㗗㰥᠔Փ⫼ⱘ᭄᥂ᑧᡔᴃ੠ᮍᓣˈ㗠Ϩ䖬㽕㗗㰥䞛⫼ⱘ᭄᥂ᑧᓔথ䕃ӊ⦃๗DŽད೼InstallShieldᦤկњODBC-DAO-RDOǃOLEDBǃAccessǃPowerBuilderㄝᅝ㺙⿟ᑣ῵ᵓˈՓᕫ䯂乬বᕫㅔऩ䆌໮DŽ5.3.1ὖ䗄ǂǂ⫼᭄᥂ᑧᮍᓣᴹㅵ⧚ҎӀ᮹ᐌ⫳⌏Ё໻䞣ⱘᙃᏆবᕫ䍞ᴹ䍞䞡㽕ˈᑊ⍠⦄ߎ䆌໮᭄᥂ᑧㅵ⧚㋏㒳ˈབPowerBuilderǃMicosoftAccessǃMicosoftSQLServerǃOracleServerǃSybaseSQLServer੠MicosoftVisualFoxproㄝDŽሑㅵ䖭ѯ㋏㒳㛑ߎ㡆ഄ㚰ӏ᭄᥂ᑧⱘㅵ⧚ˈԚैϡ㛑ᓔথߎ݊ᅗࡳ㛑ᔎ໻ⱘWindowsᑨ⫼⿟ᑣDŽ㗠䆌໮ᓔྟᎹ݋བVisualC++ህ㛑ᇚ݇㋏᭄᥂ᑧϢ䴶৥ᇍ䈵ⱘ㓪⿟ᮍ⊩᳝ᴎഄ㒧ড়䍋ᴹˈՓᕫ᭄᥂ᑧ໘⧚੠ᑨ⫼⿟ᑣᓔথ䛑㛑ᕜདഄ䖯㸠DŽǂǂϔ㠀ഄˈ䖭ѯᓔথᎹ݋䗮ᐌЎ⫼᠋ᦤկњODBC(OpenDatabaseConnectivityˈᓔᬒ᭄᥂ᑧ䖲᥹)ǃDAO(DataAccessObjectsˈ᭄᥂䆓䯂ᇍ䈵)ঞOLEDB(OLEDataBaseˈOLE᭄᥂ᑧ)ϝ⾡᭄᥂ᑧᮍᓣˈՓ⫼᠋ⱘᑨ⫼⿟ᑣҢ⡍ᅮⱘ᭄᥂ㅵ⧚㋏㒳(DBMS)㜅⾏ߎᴹDŽODBCᦤկњᑨ⫼⿟ᑣ᥹ষ(API)ˈՓᕫӏԩϔϾ᭄᥂ᑧ䛑ৃҹ䗮䖛ODBC偅ࡼ఼ϢᣛᅮⱘDBMSⳌ㘨DŽ⫼᠋ⱘ⿟ᑣህৃҹ䗮䖛䇗⫼ODBC偅ࡼㅵ⧚఼ЁⳌᑨⱘ偅ࡼ⿟ᑣ䖒ࠄㅵ⧚᭄᥂ᑧⱘⳂⱘDŽ԰ЎMicrosoftWindowsOpenStandardsArchitecture(WOSAˈWindowsᓔᬒᓣ᳡ࡵԧ㋏㒧ᵘ)ⱘЏ㽕㒘៤䚼ߚˈODBCϔⳈ⊓⫼㟇ҞDŽDAO㉏ԐѢ⫼MicrosoftAccess៪MicrosoftVisualBasic㓪ݭⱘ᭄᥂ᑧᑨ⫼⿟ᑣˈᅗՓ⫼Jet᭄᥂ᑧᓩ᪢ᔶ៤ϔ㋏߫ⱘ᭄᥂䆓䯂ᇍ䈵˖᭄᥂ᑧᇍ䈵ǃ㸼੠ᶹ䆶ᇍ䈵ǃ䆄ᔩ䲚ᇍ䈵ㄝDŽᅗৃҹᠧᓔϔϾAccess᭄᥂ᑧ᭛ӊ(MDB᭛ӊ)ˈгৃⳈ᥹ᠧᓔϔϾODBC᭄᥂⑤ҹঞՓ⫼Jetᓩ᪢ᠧᓔϔϾISAM(㹿㋶ᓩⱘ乎ᑣ䆓䯂ᮍ⊩)㉏ൟⱘ᭄᥂⑤(dBASEǃFoxProǃParadoxǃExcel៪᭛ᴀ᭛ӊ)OLEDB䆩೒ᦤկϔ⾡㒳ϔⱘ᭄᥂䆓䯂᥹ষˈᑊ㛑໘⧚䰸њᷛޚⱘ݇㋏ൟ᭄᥂ᑧЁⱘ᭄᥂П໪ˈ䖬㛑໘⧚ࣙᣀ䚂ӊ᭄᥂ǃWebϞⱘ᭛ᴀ៪೒ᔶǃⳂᔩ᳡ࡵ(DirectoryServices),ҹঞЏᴎ㋏㒳ЁⱘIMS੠VSAM᭄᥂DŽOLEDBᦤկϔϾ᭄᥂ᑧ㓪⿟COM(㒘ӊᇍ䈵῵ൟ)᥹ষˈՓᕫ᭄᥂ⱘՓ⫼㗙(ᑨ⫼⿟ᑣ)ৃҹՓ⫼ৠḋⱘᮍ⊩䆓䯂৘⾡᭄᥂ˈ㗠ϡ⫼㗗㰥᭄᥂ⱘ݋ԧᄬټഄ⚍ǃḐᓣ៪㉏ൟDŽ䖭ϾCOM᥹ষϢODBCⳌ↨ˈ݊عໂᗻ੠♉⌏ᗻ㽕催ᕫ໮DŽԚᰃˈ⬅ѢOLEDBⱘ⿟ᑣ↨䕗໡ᴖˈ಴㗠ᇍѢϔ㠀⫼᠋ᴹ䇈ˈᑨՓ⫼෎ѢOLEDBⱘ催ሖ䆓䯂᥹ষADO(ActiveXDataObject)ˈᅗᇍOLEDBⱘ᥹ষ԰Ўᇕ㺙ˈҢ㗠Փ⿟ᑣᓔথᕫࠄㅔ࣪DŽ163 InstallShieldㅔᯢՓ⫼ᬭ⿟5.3.2Փ⫼InstallShieldᅝ㺙῵ᵓInstallShieldᦤկϔᅮ᭄䞣ⱘᅝ㺙⿟ᑣ῵ᵓˈ䖭ѯ῵ᵓᰃϔѯᅠᭈⱘǃৃ䖤㸠ⱘᅝ㺙乍Ⳃˈ⫼᠋ৃҹᇚ݊Ⳉ᥹໡ࠊ៪೼ℸ෎⸔Ϟ԰䖯ϔℹⱘᬍDŽInstallShield5.5⠜ᴀᦤկњབϟⱘᅝ㺙⿟ᑣ῵ᵓ˖1.TemplateOne䆹῵ᵓᰃ⫼ѢWindows95ǃ98៪WindowsNT4.0ⱘ᳔෎ᴀⱘᅝ㺙⿟ᑣ῵ᵓˈ⫼᠋䗮䖛ᇥ䞣ⱘᬍৃ⒵䎇ϔ㠀ᅝ㺙⿟ᑣⱘ䳔㽕DŽҹℸ῵ᵓ߯ᓎⱘᅝ㺙⿟ᑣᠻ㸠ϟ߫䖛⿟˖(1)ᰒ⼎㔎ⳕⱘᅝ㺙ਃࡼ⬏䴶ˈ⫼᠋䗮䖛ᬍSetup.bmpᴹᬍবᰒ⼎ⱘݙᆍ˗(2)䇗⫼SdWelcomeߑ᭄ˈᰒ⼎Ⳍ݇⃶䖢ᙃ˗(3)䇗⫼SdAskDestPathߑ᭄㦋প⫼᠋ᣛᅮⱘᅝ㺙䏃ᕘ˗(4)䖯㸠ডᅝ㺙Ϣᅝ㺙Ⳍ݇᪡԰˗(5)೼㋏㒳"ᓔྟ"->"⿟ᑣ"᭛ӊ།Ё߯ᓎ⿟ᑣ᭛ӊ།ঞ݊ᖿ᥋ᮍᓣˈᑊ䇗⫼ShowProgramFolderߑ᭄ᰒ⼎Ⳍ݇ⱘݙᆍ˗(6)䇗⫼MessageBoxߑ᭄ᦤ⼎ᅝ㺙㒧ᴳDŽ2.TemplateTwoǂǂ䆹῵ᵓ↨TemplateOne᳈ᅠ୘ˈᅗⱘࡳ㛑੠"ProjectWizard"䴲ᐌⳌԐDŽ3.MFCTemplate䆹῵ᵓ⫼Ѣ෎ѢMFCⱘWindows95ǃ98៪WindowsNT4.0ⱘ෎ᴀᑨ⫼⿟ᑣ῵ᵓDŽҹℸ῵ᵓ߯ᓎⱘᅝ㺙⿟ᑣᠻ㸠ϢTemplateOneⳌԐⱘ䖛⿟ˈϡৠⱘᰃᅗՓ⫼㞾ᏺⱘMFC䖤㸠ᑧMfc42.dll੠Msvcrt.dllˈᔧ✊⫼᠋ৃҹᇚᴀഄ᳔ᮄⱘ䖤㸠ᑧ໡ࠊࠄTemplateDataMFCTemplateDataⳌ݇Ⳃᔩϟᴹ᳈ᮄDŽ4.VisualBasicTemplate䆹῵ᵓ⫼Ѣ෎ѢVB5.0/6.0ⱘWindows95ǃ98៪WindowsNT4.0ⱘ෎ᴀᑨ⫼⿟ᑣⱘᅠᭈ῵ᵓˈᅝ㺙⿟ᑣ䖤㸠䖛⿟੠"ProjectWizard"ᰃϔ㟈ⱘDŽ㢹⫼᠋ᛇ㽕⫼ℸ῵ᵓᅝ㺙VB6.0ᑨ⫼⿟ᑣˈ߭䳔㽕ᇚ"WindowsSystemSelf-regSharedFiles"᭛ӊ㒘ЁⱘMsvbvm50.dll᳈ᤶ៤Msvbvm60.dllेৃDŽǂǂ䰸њϞ䗄ᑨ⫼⿟ᑣ෎ᴀ῵ᵓП໪ˈInstallShield5.5䖬ᇍ᳔ᮄⱘ᭄᥂ᑧᮍᓣᦤկњ䆌໮῵ᵓˈᅗӀᰃAccessTemplate(ᬃᣕMicrosoftAccess97)ǃADOTemplate(ܼ䴶ᬃᣕADOˈᅝ㺙ADOǃOLEDB164 InstallShieldㅔᯢՓ⫼ᬭ⿟ᦤկ㗙ҹঞOLEDB)ǃBDE4.51Template(ᬃᣕBorlandDatabaseEngine4.51)ǃBDE5Template(ᬃᣕBorlandDatabaseEngine5)ǃODBC-DAO-RDOTemplate(ܼ䴶ᬃᣕDAOǃRDOҹঞODBCˈࣙᣀḠ䴶᭄᥂ᑧ偅ࡼ⿟ᑣǃSQL੠Oracle偅ࡼ⿟ᑣҹঞⳌᑨⱘDSN)ǃOLEDBTemplate(ᬃᣕOLEDB1.5)ǃPowerBuilderTemplate(ܼ䴶ᬃᣕPowerBuilder6.0ˈࣙᣀ䖤㸠ᑧ᭛ӊǃODBC3.5ㄝ)ሑㅵInstallShield5.5᳝ᕜ໮Ϟ䗄䖭ḋⱘ῵ᵓˈԚᅗӀⱘՓ⫼ᮍ⊩ैᰃ෎ᴀϔḋⱘDŽ՟བϟ䴶ⱘ䖛⿟ᰃ⫼ODBC-DAO-RDOTemplate߯ᓎVC6.0᭄᥂ᑧᑨ⫼⿟ᑣⱘᅝ㺙乍ⳂˈᏆⶹ˖Access2000ࠊ԰ⱘ᭄᥂ᑧstudent.mdbˈᑧЁࣙ৿ϔᓴৡЎxsⱘ᭄᥂㸼ˈ㽕∖ODBC᭄᥂⑤ৡЎ"៥ⱘ᭄᥂ᑧ"(1)ਃࡼInstallShield5.5˗(2)ऩߏ"New"Ꮉ݋ᣝ䪂៪䗝ᢽ"File"->"New"㦰ऩҸˈᔍߎⳌᑨⱘᇍ䆱Ḛˈߛᤶࠄ"Template"义䴶ˈབ೒5.6᠔⼎˗(3)೼Ꮊ䖍ⱘ῵ᵓ߫㸼ḚЁ䗝ᅮ"ODBC-DAO-RDOTemplate"ˈऩߏ[Properties]ᣝ䪂ৃҹᶹⳟ䆹῵ᵓ᳝Ⳍ݇ሲᗻᙃ˗(4)ऩߏ[⹂ᅮ]ᣝ䪂ৢˈIntallShieldህӮ㞾ࡼЎ⫼᠋߯ᓎϔϾৡЎ"ODBC-DAO-RDOTemplate"ⱘᅝ㺙乍Ⳃ˗(5)ߛᤶࠄ"FileGroups"义䴶ˈሩᓔ"ProgramFiles"乍ˈ䗝ᅮ"StaticFileLinks"ˈߴ䰸ে䖍にষЁⱘ᠔᳝᭛ӊˈᑊেߏ哴ᷛˈҢᔍߎⱘᖿ᥋㦰ऩЁ䗝ᢽ"InsertFiles"Ҹˈᇚ᭄᥂ᑧ᭛ӊ"student.mdb"੠VC6.0ᑨ⫼⿟ᑣ(Release⠜)"Ex_ODBC.exe"䇗ܹ˗(6)ᣝⳌৠⱘᮍ⊩ˈᇚ"WindowsSystemSelf-regFiles"ϟⱘ䫒᥹᭛ӊᬍЎ"Msvcrt.dll"ˈᑊᇚ݊"Self-Registered"ሲᗻᬍЎ"No"ˈᇚ"WindowsSystemSelf-regShareFiles"ϟⱘ䫒᥹᭛ӊᬍЎ"Mfc42.dll"˗(7)ߛᤶࠄ"Resource"义䴶ˈሩᓔ"ExplorerShell"ⱘ᠔᳝ᄤ乍ˈ䗝ᅮ"App"ˈᇚ݊"Target"ሲᗻᬍ165 InstallShieldㅔᯢՓ⫼ᬭ⿟Ў"Ex_ODBC.exe"(8)ߛᤶࠄ"SetupFiles"义䴶ˈሩᓔ"English"乍ˈ䗝ᅮ"Windows95/98&NT3.51/4.0"ˈঠߏে䖍にষⱘ"_Drivers.ini"᭛ӊˈ䖭ḋ䆹᭛ӊህӮ㹿ᠧᓔDŽ(9)ᇚ"_Drivers.ini"ݙᆍ⿏ࠄ᳔ৢˈᡒࠄ[SampleAccessDataSource]䚼ߚˈ݊Ё݇䬂ᄫ˖Descriptionᰒ⼎೼ODBCㅵ⧚఼ЁⱘDSNᦣ䗄DriverϢDSNⳌ݇ⱘ偅ࡼ᭛ӊৡDSN᭄᥂⑤ৡDBQϢDSNⳌ݇ⱘ᭄᥂⑤ⱘᅠᭈ䏃ᕘ੠᭄᥂ᑧ᭛ӊranslationDLLϢDSNⳌ݇ⱘᔶᅲ䕀ᤶDLLTranslationNameϢTranslationDLLⳌ݇ⱘ⊼ݠ㸼䬂ৡISODBCDriverDescϢ偅ࡼⳌ݇ⱘ⊼ݠ㸼䬂ৡISODBCComponentNameϢDSNⳌ݇ⱘᅝ㺙㒘ӊৡISODBCDSNType㽕ᅝ㺙ⱘ᭄᥂⑤㉏ൟˈᔧЎuserᯊ㸼⼎㔎ⳕⱘ⫼᠋᭄᥂⑤㉏ൟˈᔧЎsystemᯊЎ㋏㒳᭄᥂⑤㉏ൟDŽǂǂ೼ҹϞⱘ݇䬂ᄫЁˈDescription=,Driver=,DSN=,੠DBQ=ᰃᖙ乏ⱘDŽ(10)ᇚ[SampleAccessDataSource]ݙᆍᬍবབϟ˖Description=⫼ѢVC++ⱘ᭄᥂⑤ISODBCDriverDesc=MicrosoftAccessDriver(*.mdb)Driver=odbcjt32.dllDSN=៥ⱘ᭄᥂ᑧDefaultDir=DBQ=student.mdbUID=SODBCUninstDSN=TRUEISODBCComponentName=ISODBCDriversMicrosoftAccessDriver(11)ᇚ乍ⳂᎹ԰ऎにষߛᤶࠄMedia义䴶ˈऩߏMediaBuildWizard乍ˈ߯ᓎᮄⱘၦҟDŽ(12)㓪䆥ᑊ䖤㸠DŽǂǂ䳔㽕䇈ᯢⱘᰃˈ䖭ѯ᭄᥂ᑧ῵ᵓⱘⳂⱘᰃᇚ᭄᥂ᑧᑨ⫼⿟ᑣঞ݊᠔᳝ⱘ䖤㸠⦃๗ܼ䚼ࣙ㺙ˈ䖭ᰃϔϾ᳔ᅠ㕢ⱘخ⊩˗ԚৠᯊгᏺᴹϔϾᮄⱘ䯂乬ˈ䙷ህᰃ⬅Ѣ᭄᥂ᑧ䖤㸠⦃๗ⱘ⠜ᴀব࣪ˈॳ᳝ⱘᅝ㺙῵ᵓϡݡ䗖⫼DŽЎℸ䳔㽕⫼᠋ঞᯊ䆓䯂http://www.installshield.com/support/is5ҹ㦋ᕫ᳔ᮄⱘᅝ㺙῵ᵓDŽ5.3.3Փ⫼⊼ݠ㸼166 InstallShieldㅔᯢՓ⫼ᬭ⿟InstallShield5.5Ў⫼᠋䆌໮᪡԰⊼ݠ㸼ⱘߑ᭄ˈབRegDBSetDefaultRootǃRegDBCreateKeyExǃRegDBSetKeyValueEx੠RegDBDeleteKeyㄝˈᅗӀⱘॳൟབϟ˖RegDBSetDefaultRoot(nRootKey);ǂǂ䆹ߑ᭄⫼ᴹ䆒㕂InstallShield᪡԰ⱘ㔎ⳕḍ䬂ৡDŽখ᭄nRootKey⫼ᴹᣛᅮ㽕䆒㕂ⱘḍ䬂ৡˈᅗৃҹᰃHKEY_CLASSES_ROOTǃHKEY_LOCAL_MACHINE(WindowsNT4.0䰸໪)ǃHKEY_CURRENT_USER៪HKEY_USERSRegDBCreateKeyEx(szKey,szClass);ǂǂ䆹ߑ᭄⫼ᴹ೼⊼ݠ㸼Ё߯ᓎϔϾЏ䬂DŽখ᭄szKey⫼ᴹ೼⊼ݠ㸼ⱘḍ䬂ϟˈᣛᅮ㽕߯ᓎⱘ䬂ৡˈৃҹՓ⫼ϸϾড᭰ᴴ"\"ᴹ㸼⼎ᄤ䬂ⱘሖ⃵DŽszClass⫼ᴹᣛᅮϔϾϢ䆹䬂Ⳍ݇ⱘ㉏ৡ(催㑻⫼᠋Փ⫼)RegDBSetKeyValueEx(szKey,szName,nType,szValue,nSize);ǂǂ䆹ߑ᭄⫼ᴹ೼⊼ݠ㸼Ё䆒㕂ᣛᅮ䬂ৡϟⱘ䬂ؐDŽখ᭄szKey⫼ᴹᣛᅮ㽕䆒㕂䬂ؐⱘ䬂ৡˈৃҹՓ⫼ϸϾড᭰ᴴ"\"ᴹ㸼⼎ᄤ䬂ⱘሖ⃵˗szName⫼ᴹᣛᅮ೼szKeyϟϢ䆒㕂ⱘؐⳌ݇㘨ⱘؐৡ˗㢹㽕䆒㕂㔎ⳕⱘؐˈᇚszName㕂ЎNULL˗szValue⫼ᴹᣛᅮ㽕䆒㕂ⱘؐ˗nSize⫼ᴹᣛᅮ㽕䆒㕂ؐ߫ϟᰃҹৃᅗˈൟ㉏᭄ؐⱘ㕂䆒⼎㸼nType˗ᇣ໻㡖ᄫⱘؐПϔ˖REGDB_STRINGऩ㸠ᄫヺІ᭛ᴀREGDB_STRING_EXPAND৿᳝㉏Ԑ"%MYPATH%"ⱘᄫヺІREGDB_STRING_MULTI໮㸠ᄫヺІ᭛ᴀREGDB_NUMBER᭄ᄫREGDB_BINARYѠ䖯ࠊ᭄ؐRegDBSetKeyValueExⳌᇍᑨⱘߑ᭄ᰃRegDBGetKeyValueExˈᅗᰃ⫼ᴹ೼⊼ݠ㸼Ё㦋পᣛᅮ䬂ৡϟⱘ䬂ؐDŽRegDBDeleteKey(szSubKey);ǂǂ䆹ߑ᭄೼⊼ݠ㸼Ёߴ䰸⬅szSubKeyᣛᅮⱘϔϾ䬂DŽ1.䗮䖛⊼ݠ㸼㦋পᑨ⫼⿟ᑣᅝ㺙ᙃǂǂ೼㄀ಯゴ㄀Ѩ㡖Ёˈҟ㒡њϸ⾡ᮍ⊩ᴹẔ⌟InstallShield5.5ϧϮ⠜ⱘᅝ㺙䏃ᕘDŽԚབᵰ⫼⊼ݠ㸼᪡԰ߑ᭄ህᰒᕫ䴲ᐌᆍᯧˈབϟ䴶ⱘҷⷕ˖#defineTITLE"RegDBGetAppInfo"STRINGszStrName,svStrValue,szMsg;NUMBERnvSize,nvType;program//Settherootkey.RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);167 InstallShieldㅔᯢՓ⫼ᬭ⿟szStrName="Software\InstallShield\InstallShieldProfessional\5.5\Main";if(RegDBGetKeyValueEx(szStrName,"Path",nvType,svStrValue,nvSize)<0)thenMessageBox("Failedtogetapplicationinformationvalue.",SEVERE);abort;elseif(nvType=REGDB_STRING)thenszMsg="TheInstallShieldInstalledPathis:%s";SprintfBox(INFORMATION,TITLE,szMsg,svStrValue);endif;endif;endprogram2.䗮䖛⊼ݠ㸼䜡㕂ODBCǂǂ䰸њࠡ䴶ODBC-DAO-RDOⱘᅝ㺙῵ᵓৃҹ䖯㸠ODBC᭄᥂⑤ⱘ䆒㕂໪ˈⳈ᥹᪡԰⊼ݠ㸼г㛑䖒ࠄৠḋᬜᵰDŽǂǂ՟བϟ䴶ⱘ䖛⿟ᰃ߽⫼MFCTemplateࠊ԰VC6.0᭄᥂ᑧᑨ⫼⿟ᑣⱘᅝ㺙乍Ⳃ(ᴵӊৠࠡ):(1)ਃࡼInstallShield5.5˗(2)ऩߏ"New"Ꮉ݋ᣝ䪂៪䗝ᢽ"File"->"New"㦰ऩҸˈᔍߎⳌᑨⱘᇍ䆱Ḛˈߛᤶࠄ"Template"义䴶ˈ䗝ᅮ"MFCTemplate"ˈऩߏ[⹂ᅮ]ᣝ䪂ৢˈIntallShieldህӮ㞾ࡼЎ⫼᠋߯ᓎϔϾৡЎ"MFCTemplate"ⱘᅝ㺙乍Ⳃ˗(3)ߛᤶࠄ"FileGroups"义䴶ˈሩᓔ"ProgramFiles"乍ˈ䗝ᅮ"StaticFileLinks"ˈߴ䰸ে䖍にষЁⱘ᠔᳝᭛ӊˈᑊেߏ哴ᷛˈҢᔍߎⱘᖿ᥋㦰ऩЁ䗝ᢽ"InsertFiles"Ҹˈᇚ᭄᥂ᑧ᭛ӊ"student.mdb"੠VC6.0ᑨ⫼⿟ᑣ(Release⠜)"Ex_ODBC.exe"䇗ܹ˗(4)ߛᤶࠄ"Resource"义䴶ˈሩᓔ"ExplorerShell"ⱘ᠔᳝ᄤ乍ˈ䗝ᅮ"App"ˈᇚ݊"Target"ሲᗻᬍЎ"Ex_ODBC.exe"(5)ߛᤶࠄ"Scripts"义䴶ˈᠧᓔ"setup.rul"㛮ᴀ᭛ӊˈ೼prototypeCheckRequirements();ǂǂǂ䇁হⱘϟϔ㸠⏏ࡴϟ߫䇁হ˖prototypeSetupRegistry();(6)೼㛮ᴀ᭛ӊⱘৢ䴶⏏ࡴ䆹㞾ᅮНߑ᭄ҷⷕ˖functionSetupRegistry()NUMBERnResult;STRINGszPath,szKeyName;beginRegDBSetDefaultRoot(HKEY_CURRENT_USER);szKeyName="Software\ODBC\ODBC.INI\៥ⱘ᭄᥂ᑧ";if(RegDBKeyExist(szKeyName)<0)thenRegDBCreateKeyEx(szKeyName,"");elseRegDBDeleteKey(szKeyName);168 InstallShieldㅔᯢՓ⫼ᬭ⿟RegDBCreateKeyEx(szKeyName,"");endif;szKeyName="Software\ODBC\ODBC.INI\ODBCDataSources";if(RegDBKeyExist(szKeyName)<0)thenRegDBCreateKeyEx(szKeyName,"");endif;RegDBSetKeyValueEx(szKeyName,"៥ⱘ᭄᥂ᑧ",REGDB_STRING,"MicrosoftAccessDriver(*.mdb)",-1);szPath=TARGETDIR^"student.mdb";szKeyName="Software\ODBC\ODBC.INI\៥ⱘ᭄᥂ᑧ";RegDBSetKeyValueEx(szKeyName,"DBQ",REGDB_STRING,szPath,-1);RegDBSetKeyValueEx(szKeyName,"Description",REGDB_STRING,"⫼ѢVC++ⱘ᭄᥂⑤",-1);RegDBSetKeyValueEx(szKeyName,"Driver",REGDB_STRING,WINSYSDIR+"odbcjt32.DLL",-1);RegDBSetKeyValueEx(szKeyName,"DriverID",REGDB_NUMBER,"25",-1);RegDBSetKeyValueEx(szKeyName,"SafeTransactions",REGDB_NUMBER,"0",-1);RegDBSetKeyValueEx(szKeyName,"UID",REGDB_STRING,"",-1);RegDBCreateKeyEx("Software\ODBC\ODBC.INI\៥ⱘ᭄᥂ᑧ\Engines","");RegDBCreateKeyEx("Software\ODBC\ODBC.INI\៥ⱘ᭄᥂ᑧ\Engines\Jet","");szKeyName="Software\ODBC\ODBC.INI\៥ⱘ᭄᥂ᑧ\Engines\Jet";RegDBSetKeyValueEx(szKeyName,"Driver",REGDB_STRING,WINSYSDIR+"odbcjt32.DLL",-1);RegDBSetKeyValueEx(szKeyName,"ImplicitCommitSync",REGDB_STRING,"",-1);RegDBSetKeyValueEx(szKeyName,"Threads",REGDB_NUMBER,"3",-1);RegDBSetKeyValueEx(szKeyName,"UserCommitSync",REGDB_STRING,"Yes",-1);end;(7)ᇚ乍ⳂᎹ԰ऎにষߛᤶࠄMedia义䴶ˈऩߏMediaBuildWizard乍ˈ߯ᓎᮄⱘၦҟDŽ(8)㓪䆥ᑊ䖤㸠DŽ169 InstallShieldㅔᯢՓ⫼ᬭ⿟5.4໮Ͼᅝ㺙⿟ᑣǂǂ䳔㽕໮Ͼᅝ㺙⿟ᑣⱘᚙމᰃ↨䕗໮ⱘˈབ"䞥ቅ䆡䴌"ⱘᅝ㺙DŽਃࡼ໮Ͼᅝ㺙⿟ᑣৃህϟ䴶ϸ⾡ᚙމ㗠᳝ϡৠⱘᮍ⊩DŽ1.⬅InstallShieldᵘ䗴ⱘϸϾᅝ㺙乍Ⳃǂǂ೼䖭⾡ᚙމϟˈ⫼᠋佪ܜᣛᅮ݊ЁϔϾЎЏᅝ㺙乍Ⳃˈ঺ϔϾЎ⃵ᅝ㺙乍ⳂˈᑊϨ⃵ᅝ㺙乍ⳂᏆ㹿㓪䆥䖛ˈ㛑ᅠܼℷ⹂䖤㸠DŽ䖭ᯊˈ៥Ӏᣝϟ߫ℹ偸䖯㸠˖(1)ਃࡼInstallShield5.5ˈᇚЏᅝ㺙乍Ⳃ䇗ܹDŽ(2)ߛᤶࠄ乍ⳂᎹ԰ऎにষⱘ"SetupFiles"义䴶ˈᇚ⃵ᅝ㺙乍Ⳃ㽕থᏗⱘᅝ㺙ၦҟDsik1ǃDisk2...ㄝ᭛ӊ།ϟⱘ᭛ӊܼ䚼䇗ܹ⫼᠋ᣛᅮⱘⳂᔩ乍ЁDŽ(3)೼Џᅝ㺙乍Ⳃⱘ㛮ᴀ⿟ᑣЁˈ⏏ࡴϟ߫䇁হ˖DoInstall(SUPPORTDIR^"Setup.ins","",WAIT);ǂǂ݊ЁˈDoInstallህᰃ⫼ᴹਃࡼ঺ϔϾᅝ㺙⿟ᑣⱘˈ݊ߑ᭄ॳൟབϟ˖DoInstall(szInsFile,szCmdLine,lWait);ǂǂ䆹ߑ᭄ᰃ⫼ᴹ䖤㸠঺ϔϾᅝ㺙⿟ᑣDŽখ᭄szInsFile⫼ᴹᣛᅮ⫼᠋㽕䖤㸠ⱘ㹿ℷ⹂㓪䆥䖛ⱘ㛮ᴀ᭛ӊ.insⱘ᭛ӊܼৡ˗szCmdLine⫼ᴹᣛᅮInstallShieldҸ㸠ݙᆍ˗lWait㸼⼎䖤㸠ⱘ᪡԰ᮍᓣˈᅗৃҹᰃϟ߫ؐПϔ˖NOWAITϸϾᅝ㺙⿟ᑣৠᯊ䖤㸠WAIT೼⃵ᅝ㺙⿟ᑣ䖤㸠ᅠ៤ৢˈᠡ䖯㸠Џᅝ㺙乍Ⳃⱘϟϔℹ᪡԰ǂǂ䆹ߑ᭄䖨ಲ1ᯊ㸼⼎៤ࡳ䇗⫼њ⃵ᅝ㺙⿟ᑣˈᑊᇚ⌕⿟䖨ಲࠄ䇗⫼DoInstallⱘϟϔϾ䇁হЁDŽ㢹InstallShieldᡒࠄњ㽕䇗⫼ⱘᅝ㺙㛮ᴀ᭛ӊˈԚैϡ㛑ਃࡼᅗˈ䙷М⌕⿟ҡህ㹿䖨ಲˈᑊϨℸߑ᭄䖨ಲ1DŽ䖨ಲ-2ᯊ㸼⼎InstallShield≵᳝ᡒࠄ㽕䇗⫼ⱘᅝ㺙㛮ᴀ᭛ӊDŽ䖨ಲ݊Ҫ䋳᭄߭㸼⼎ѻ⫳ϡৃ乘ⶹⱘ䫭䇃DŽ(4)ᇚ乍ⳂᎹ԰ऎにষߛᤶࠄMedia义䴶ˈऩߏMediaBuildWizard乍ˈ߯ᓎᮄⱘၦҟDŽ(5)㓪䆥ᑊ䖤㸠DŽǂǂ䳔㽕䇈ᯢⱘᰃˈབᵰ㹿䇗⫼ⱘ⃵ᅝ㺙⿟ᑣЁг᳝DoInstallⱘ䇗⫼ˈ䙷Мህᔶ៤њጠ༫ˈҢ㗠ৃҹਃࡼ䆌䆌໮໮ⱘᅝ㺙⿟ᑣDŽ170 InstallShieldㅔᯢՓ⫼ᬭ⿟2.⬅㄀ϝᮍᦤկⱘᅝ㺙⿟ᑣࣙǂǂབᵰ㽕ᠻ㸠ⱘ঺ϔϾᅝ㺙⿟ᑣᰃ㄀ϝᮍᦤկⱘᅝ㺙⿟ᑣˈᅗৃ㛑া᳝ϔϾৃᠻ㸠ⱘ᭛ӊDŽ䖭ᯊህ㽕Փ⫼LaunchAppAndWait੠LaunchAppߑ᭄ᴹਃࡼˈᅗӀⱘॳൟབϟ˖LaunchAppAndWait(szProgram,szCmdLine,lWait);LaunchApp(szCommand,szCmdLine);ǂǂ䖭ϸϾߑ᭄䛑ᰃ⫼ᴹਃࡼϔϾᑨ⫼⿟ᑣˈᅗӀଃϔⱘऎ߿ᰃLaunchAppߑ᭄ⳈࠄᏆਃࡼⱘᑨ⫼⿟ᑣ㹿݇䯁៪Ёᮁৢˈ⌕⿟ᠡӮ㹿䖨ಲˈ㗠LaunchAppAndWaitৃҹゟे䖨ಲ⌕⿟DŽখ᭄szProgram੠szCommand䛑ᰃ⫼ᴹᣛᅮ㽕ਃࡼⱘᑨ⫼⿟ᑣ᭛ӊܼৡˈԚᇍѢszProgramᴹ䇈ˈ㢹ᑨ⫼⿟ᑣ≵᳝ᣛᅮ䏃ᕘ੠᭛ӊᠽሩৡˈLaunchAppAndWaitϡӮਃࡼ䆹ᑨ⫼⿟ᑣˈ㗠ᇍѢszCommandᴹ䇈ˈ㢹≵᳝ᣛᅮᑨ⫼⿟ᑣⱘ䏃ᕘˈLaunchAppᇚ೼ᔧࠡⳂᔩǃWindowsⳂᔩǃWindows㋏㒳Ⳃᔩҹঞ݊ҪPATH⦃๗ব䞣ᣛᅮⱘⳂᔩЁ䖯㸠ᶹᡒDŽszCmdLine⫼ᴹᣛᅮᑨ⫼⿟ᑣᠻ㸠ᯊⱘҸ㸠খ᭄ˈ㢹≵᳝ˈ߭ᇚℸখ᭄䆒ЎNULLlWait⫼ᴹᣛᅮ⌕⿟ⱘ䖨ಲᮍᓣˈᅗৃҹᰃNOWAIT(ゟे䖨ಲ)៪WAIT(Ⳉࠄᑨ⫼⿟ᑣ݇䯁៪Ёᮁᠡᇚ⌕⿟䖨ಲ)བᵰ䳔㽕ਃࡼⱘᑨ⫼⿟ᑣ䳔㽕ⱘDLL᭛ӊϡ೼Windows㋏㒳ⳂᔩЁˈ߭䳔㽕䇗⫼ChangeDirectoryߑ᭄ᴹᬍব䇗⫼DLLⱘⳂᔩˈ՟བϟ䴶ⱘ䖛⿟ᰃ䗮䖛LaunchAppAndWaitߑ᭄ᠻ㸠঺ϔϾᅝ㺙⿟ᑣ˖(1)ਃࡼInstallShield5.5ˈᇚЏᅝ㺙乍Ⳃ䇗ܹDŽ(2)ߛᤶࠄ乍ⳂᎹ԰ऎにষⱘ"SetupFiles"义䴶ˈᇚ⃵ᅝ㺙乍Ⳃ㽕থᏗⱘᅝ㺙ၦҟϟⱘ᭛ӊܼ䚼䇗ܹ⫼᠋ᣛᅮⱘⳂᔩϟDŽ(3)೼Џᅝ㺙乍Ⳃⱘ㛮ᴀ⿟ᑣЁˈ⏏ࡴϟ߫䇁হ˖NUMBERnResult;STRINGszDir;program...szDir=SUPPORTDIR;StrRemoveLastSlash(szDir);ChangeDirectory(szDir);LaunchAppAndWait(SUPPORTDIR^"Setup.exe","",WAIT);endprogram(4)ᇚ乍ⳂᎹ԰ऎにষߛᤶࠄMedia义䴶ˈऩߏMediaBuildWizard乍ˈ߯ᓎᮄⱘၦҟDŽ(5)㓪䆥ᑊ䖤㸠DŽ171 InstallShieldㅔᯢՓ⫼ᬭ⿟5.5ᅝ㺙⿟ᑣⱘ䇗䆩InstallShield5.5ᓔথ⦃๗Ё䲚៤њࡳ㛑ᔎ໻ⱘ䇗䆩Ꮉ݋ˈ߽⫼ᅗӀৃҹ䇗䆩InstallScriptᅝ㺙⿟ᑣˈᑊϨ㛑䆒㕂੠ㅵ⧚ᮁ⚍ǃᶹⳟܼሔ੠ሔ䚼ব䞣ⱘؐㄝDŽ5.5.1䇗⫼ࠡⱘޚ໛ǂǂ೼InstallShieldЁˈ䇗䆩ϔϾᅝ㺙⿟ᑣϔ㠀ߚЎϸℹDŽ佪ܜˈℷ೼㓪䆥ᯊѻ⫳ⱘϡℷ⹂ⱘ䇁⊩੠ᣐ䫭ⱘ݇䬂䆡ㄝ䫭䇃ˈⳈ㟇㓪䆥䗮䖛Ўℶ˗✊ৢˈݡ⫼䇗䆩఼Ẕ⌟੠ℷ䘏䕥䫭䇃ҹঞ೼ᕾ⦃ǃ߸ᮁㄝ䖤㸠ᯊѻ⫳ⱘ䫭䇃DŽǂǂЎњ㛑᳝ᬜഄ䖯㸠ᅝ㺙⿟ᑣⱘ䇗䆩ˈϟ䴶ⱘݙᆍᑨ䆹㽕ᥠᦵDŽ1.䇗䆩఼㛑Ẕ⌟ߎⱘ䫭䇃㉏ൟInstallShieldᓔথ⦃๗䲚៤ⱘ䇗䆩఼㛑䇗䆩ߎϟ߫ϝ⾡㉏ൟⱘ䫭䇃˖1)䇁⊩䫭䇃䖭ᰃ᳔ㅔऩⱘϔ⾡䫭䇃㉏ൟˈ䗮ᐌࣙᣀᣐݭ䫭䇃ǃᷛ⚍ヺো䫭䇃ǃ䇁হ㒧ᵘঞ݊⫼⊩䫭䇃ˈབif䇁হЁᖬ䆄њendifDŽ䖭㉏䫭䇃ϔ㠀䛑㛑㹿㓪䆥఼থ⦄ᑊࡴҹᷛ䆄DŽ2)䖤㸠䫭䇃乒ৡᗱНˈ䖭㉏䫭䇃ᰃ೼ᅝ㺙⿟ᑣ䖤㸠ᯊѻ⫳ⱘ䫭䇃ˈᅗ䗮ᐌ᳝޴⾡㸼⦄ᔶᓣDŽ՟བˈᅝ㺙⿟ᑣ䆩೒೼ϔϾϡᄬ೼ⱘ᭛ӊ།Ё໡ࠊ᭛ӊˈݙᄬϡ໳ǃⳂᷛ⺕ⲬᏆ⒵៪ᤳണㄝDŽ3)䘏䕥䫭䇃ǂǂ䖭㉏䫭䇃㽕↨䇁⊩䫭䇃੠䖤㸠䫭䇃᳈݋䱤㬑ᗻDŽ՟བˈ؛བ⫼᠋೼㛮ᴀЁ᳝ϔᴵ߯ᓎ䏃ᕘⱘ䇁হˈ䆹䇁হ⍝ঞࠄϸϾ៪ҹϞⱘব䞣DŽϔᮺ߯ᓎⱘ䏃ᕘϡℷ⹂ˈᙼ㛑⹂ᅮᰃાϾব䞣ѻ⫳䫭䇃ਸ਼˛2.೼ϡৠⱘᴎ఼Ё䇗䆩䫭䇃ǂǂЎњ㛑೼ϡৠⱘ᪡԰㋏㒳Ё(བWindows3.1៪WindowsNT3.51)䆕ᅝ㺙⿟ᑣ㛑ℷ⹂䖤㸠ˈ៥Ӏ䳔㽕೼ϡৠⱘᴎ఼Ё䖯㸠䇗䆩DŽ䗮ᐌᣝϟ߫ℹ偸䖯㸠˖172 InstallShieldㅔᯢՓ⫼ᬭ⿟(1)೼ᅝ㺙᳝InstallShield5.5ⱘᴎ఼Ё㓪䆥ᑊᓎゟ⫼᠋ⱘᅝ㺙⿟ᑣDŽ(2)䗝ᢽ"Build"->"DebugSetup"㦰ऩҸˈ೼䇗䆩఼㹿ਃࡼࠡˈ㋏㒳Ӯѻ⫳Setup.dbgˈϔᯊ䇗䆩఼㹿ਃࡼˈゟे䗔ߎᅗDŽ(3)೼঺໪ϔϾᴎ఼Ϟˈ໡ࠊϟ߫᭛ӊ˖ǂǂၦҟ᭛ӊ೼MyInstallations\Media\DiskImages᭛ӊЁDŽSetup.dbg೼MyInstallations\ScriptFiles᭛ӊЁDŽIsdbgi51.dll(32ԡIntel)ǂ៪Isdbga51.dll(32ԡAlpha)ǂ៪Isdbg51.dll(16ԡ)ҢWindows㋏㒳᭛ӊ།Ё໡ࠊࠄ঺ϔϾᴎ఼ⱘⳌৠ᭛ӊ།Ё(4)೼঺ϔϾᴎ఼Ёˈ⫼DOS῵ᓣ䖤㸠setup-d3.ਃࡼ䇗䆩఼ǂǂϔᮺϔϾᅝ㺙⿟ᑣ㹿㓪䆥䗮䖛ৢˈህৃҹ⫼ϟ䴶ϸ⾡ᮍᓣਃࡼ䇗䆩఼˖(1)䗝ᢽ"Build"->"DebugSetup"㦰ऩҸ˗(2)ऩߏᎹ݋ᷣϞⱘᣝ䪂"DebugSetup"ᣝ䪂DŽ5.5.2Փ⫼䇗⫼఼ǂǂ䇗䆩఼ਃࡼৢˈᅗ䖬ذ⚍ᮁᇚᑊˈᑣ⿟㺙ᅝ䆥㓪ഄ⃵ݡ⬭೼ᅝ㺙㛮ᴀ⿟ᑣԧЁⱘ㄀ϔᴵ䇁হϞˈབ೒5.7᠔⼎DŽ173 InstallShieldㅔᯢՓ⫼ᬭ⿟1.䇗䆩఼ⱘ⬠䴶ǂǂ೒5.7ᰃInstallShield䇗䆩఼ⱘܼ䚼⬠䴶ˈᅗ䗮ᐌ৿᳝ᶹⳟにষǃব䞣にষǃҷⷕにষҹঞⳌ݇᥻ࠊᣝ䪂DŽ1)ᶹⳟにষǂǂᶹⳟにষЁᕔᕔᰒ⼎ߎϔѯব䞣ঞⳌᑨⱘؐˈᔧ⫼᠋೼䆹にষЁ䗝ᅮᶤϾব䞣ˈᣝϟ[Del]䬂ᇚߴ䰸䆹乍ˈ㢹⫼᠋೼ব䞣にষЁ䗝ᅮϔϾব䞣ৢˈऩߏ"ᶹⳟ"ᣝ䪂ህӮᇚ䆹ব䞣ঞ݊ݙᆍ⏏ࡴ೼ᶹⳟにষЁDŽ2)ব䞣にষǂǂব䞣にষ᳝ϸ㒘᥻ӊˈߚ߿⫼Ѣᶹⳟܼሔব䞣੠ሔ䚼ব䞣ⱘؐDŽᓔྟᯊˈᶹⳟܼሔব䞣᥻ӊ㒘㹿▔⌏ˈ⫼᠋ৃҹ䗮䖛Variable㒘ড়Ḛ䗝ᅮᶤϾܼሔব䞣ˈ᥻ӊ㒘ে䖍ⱘValue㓪䕥ḚᰒߎⳌᑨⱘݙᆍDŽ3)ҷⷕにষ174 InstallShieldㅔᯢՓ⫼ᬭ⿟ǂǂҷⷕにষৃݐ԰㓪䕥఼ˈ⫼ᴹ㓪䕥ҷⷕǃ䆒㕂ᮁ⚍ԡ㕂ҹঞᰒ⼎⿟ᑣᠻ㸠ⱘ⌕⿟ㄝDŽ4)᥻ࠊᣝ䪂ǂǂ᥻ࠊᣝ䪂⫼ᴹ䖯㸠⿟ᑣ䇗䆩ˈ৘ᣝ䪂ⱘࡳ㛑བ㸼5.4᠔⼎DŽ2.䆒㕂ᑊՓ⫼ᮁ⚍䇗䆩఼ਃࡼৢˈऩߏ"Break"ᣝ䪂ˈᇚᔍߎབ೒5.8᠔⼎ⱘ"SetBreakpoints"ᇍ䆱Ḛˈ⫼ᴹ䆒㕂ᮁ⚍DŽǂǂ೼ᇍ䆱ḚЁˈ"Functions"㒘ড়Ḛ⫼ᴹ䗝ᅮᅝ㺙㛮ᴀ⿟ᑣЁৃ㛑ߎ⦄ⱘߑ᭄԰Ўᮁ⚍ⱘԡ㕂ˈऩߏ[Set]ᣝ䪂ᇚℸߑ᭄᠔೼ⱘԡ㕂䆒㕂Ўᮁ⚍DŽऩߏ[Clear]ᇚ೼"CurrentBreakpoints"߫㸼Ё䗝ᅮⱘᮁ⚍ߴ䰸ˈऩߏ[ClearAll]ᣝ䪂ᇚ᠔᳝ⱘᮁ⚍⏙䰸ˈऩߏ[Close]ᣝ䪂݇䯁"SetBreakpoints"ᇍ䆱ḚDŽǂǂᅲ䰙Ϟˈᮁ⚍гৃ䗮䖛哴ᷛᴹ䆒㕂ˈ䖭⾡ᮍ⊩᳔ЎⳈ㾖ǃ䱣ᛣˈ݊᪡԰ℹ偸བϟ˖(1)⫼哴ᷛᇚҷⷕにষ⿏ࡼ㟇⫼᠋⒵ᛣⱘഄᮍˈᑊՓҷⷕにষব໻ѯDŽ(2)ℸᯊⱘҷⷕにষህڣᰃϔϾ㓪䕥఼にষDŽ䗮䖛ҷⷕにষⱘ⒮ࡼᴵˈ⫼᠋ৃ⌣㾜ᅝ㺙㛮ᴀ⿟ᑣҷⷕˈབ೒5.9᠔⼎DŽ175 InstallShieldㅔᯢՓ⫼ᬭ⿟(3)೼ᛇ㽕䆒㕂ᮁ⚍ⱘഄᮍঠߏ哴ᷛˈℸᯊᮁ⚍᠔೼ⱘ㸠ব៤њ㑶㡆ˈখ㾕೒5.9(4)㢹ᛇ⏙䰸߮ᠡ䆒㕂ⱘᮁ⚍ˈা䳔ᇚ哴ᷛᣛ䩜⿏㟇ᮁ⚍᠔೼㸠ˈ✊ৢঠߏ哴ᷛेৃDŽ(5)ݡᇚҷⷕにষ⿏䍄ˈՓ"᥻ࠊᣝ䪂"᠔೼ⱘにষϡ㹿ҷⷕにষ᠔䙂ᣵDŽ3.ᶹⳟব䞣ǂǂᶹⳟᅝ㺙㛮ᴀ⿟ᑣЁⱘܼሔ੠ሔ䚼ব䞣↨䕗ㅔऩᆍᯧˈা䳔䗮䖛"ব䞣にষ"ⱘϞϟϸ㒘᥻ӊ䖯㸠Ⳍ݇᪡԰ेৃDŽ⬅Ѣࠡ䴶Ꮖ䆎䗄䖛ˈ䖭䞠ϡݡ䞡໡DŽԚ䳔㽕⊼ᛣⱘᰃˈݙᓎߑ᭄ⱘ䖨ಲؐᰃ䗮䖛ᶹⳟܼሔব䞣LAST_RESULTᴹᕫࠄⱘDŽ5.5.3ޣᇥ䫭䇃ѻ⫳ǂǂᇍѢϔ㠀ⱘҷⷕ䫭䇃ˈ⫼᠋ৃҹ䗮䖛㓪䆥఼੠䇗䆩఼ህৃ㾷އDŽԚᰃˈ⬅ѢInstallShield䲚៤ᓔথ⦃๗೼䖤㸠䖛⿟Ё䖬Ӯѻ⫳ϔѯҷⷕҹ໪ⱘ䫭䇃ˈ಴ℸϟ䴶ⱘϔѯᓎ䆂ؐᕫখ㗗DŽ1.Փ⫼㋏㒳ⱘ⺕Ⲭᠿᦣ⿟ᑣWindows㋏㒳Ёⱘ"⺕Ⲭᠿᦣ⿟ᑣ"ϡҙৃҹẔᶹ⹀Ⲭⱘ䘏䕥੠⠽⧚䫭䇃ˈ㗠Ϩ䖬ৃҹ໡ᏆᤳണⱘऎඳDŽЎњ䆕InstallShield䖤㸠〇ᅮᗻˈ᳔ৢ೼ᅝ㺙៪ਃࡼInstallShieldࠡܜ䖯㸠⺕ⲬᠿᦣDŽ೼Windows98Ёˈਃࡼ"⺕Ⲭᠿᦣ⿟ᑣ"ᰃ䗮䖛䗝ᢽ"ᓔྟ"->"⿟ᑣ"->"䰘ӊ"->"㋏㒳Ꮉ݋"->"⺕Ⲭᠿᦣ⿟ᑣ"㦰ऩҸ㗠䖯㸠ⱘDŽ176 InstallShieldㅔᯢՓ⫼ᬭ⿟2.݇䯁ড⮙↦⿟ᑣǂǂϔϾড⮙↦⿟ᑣᕔᕔᇍ⫼᠋ⱘ⿟ᑣᅝ㺙᳝ϔᅮⱘᕅડˈ໻໮᭄ড⮙↦⿟ᑣ䗮ᐌӮϡ䅽⿟ᑣ৥⹀Ⲭḍ᠛ऎݭ᭄᥂ҹঞᡸᶤѯEXEǃDLL៪COM᭛ӊϡ㹿ᬍDŽ⬅Ѣড⮙↦⿟ᑣϡ㛑߸ᮁાѯᬍᰃ᳝⫼ⱘҹঞાѯᬍᰃ᳝ᆇⱘˈ಴㗠೼ᅝ㺙⿟ᑣ᳔ࠡད݇䯁ড⮙↦⿟ᑣDŽǂǂ݇䯁ᯊˈৃ䞛⫼ϟ߫ℹ偸˖(1)㢹া᳝⮙↦ⲥ᥻⿟ᑣˈ߭া㽕݇䯁ᅗेৃ䖯㸠⿟ᑣᅝ㺙DŽԚ㢹ড⮙↦⿟ᑣᰃ偏⬭೼ݙᄬЁˈ߭䳔㽕ᣝϟ䴶ℹ偸䖯㸠DŽ(2)⫼᭛ӊ㓪䕥఼ᠧᓔḍⳂᔩϟⱘ"Autoexec.bat"(3)ᇚ᠔᳝Ϣড⮙↦⿟ᑣⳌ݇ⱘҸ㸠ࠡ䴶ࡴܹ"REM"(4)ᄬAutoexec.bat(5)䞡໡ࠡ䴶ⱘ᪡԰ˈᇚConfig.sys᭛ӊ԰ৠḋᬍDŽ(6)䞡ᮄਃࡼ䅵ㅫᴎDŽ3.䫭䇃ߚᵤǂǂϟ䴶޴Ͼ᥾ᮑৃᐂࡽ⫼᠋ᶹᡒ䫭䇃ѻ⫳ⱘḍ⑤˖(1)InstallShieldᰃ৺াᅝ㺙䖛ϔ⃵˛㢹ᰃˈݡ䞡ᮄᅝ㺙ϔ⃵ˈབᵰ䯂乬ҡ✊ᄬ೼ˈ᳝ᴵӊⱘ䆱ˈݡ೼݊Ҫᴎ఼Ё䖯㸠໮⃵ᅝ㺙DŽ㢹䯂乬ҡ✊ᄬ೼ˈৃᥦ䰸ᰃInstallShieldᓔথ⦃๗ѻ⫳䫭䇃ⱘৃ㛑ᗻDŽ(2)䯂乬ᰃ৺੠থᏗⱘၦҟ᳝݇˛㢹ᰃˈ䆩䆩೼3.5"䕃Ⲭ੠CD-ROMϸϾၦҟϞৠᯊথᏗᅝ㺙⿟ᑣˈ䖭ḋৃᐂࡽ⫼᠋㓽ᇣ䫭䇃ѻ⫳ⱘ㣗ೈDŽ(3)া㽕᳝ৃ㛑ህՓ⫼ક⠠དⱘၦҟˈ䖭ḋህৃᥦ䰸ၦҟᴀ䑿ѻ⫳䫭䇃ⱘৃ㛑ᗻDŽ(4)䆩䆩೼໮Ͼ᪡԰㋏㒳⦃๗Ё䖯㸠䇗䆩ˈ㢹䫭䇃াথ⫳೼݊ЁᶤϾ㋏㒳Ёˈা᳝㛑ᡒߎ䆹㋏㒳੠݊Ҫ㋏㒳ⱘᏂ߿ˈህৃᡒߎ䫭䇃ѻ⫳ⱘॳ಴DŽ(5)ሑৃ㛑ᇚ㋏㒳ऴ⫼ⱘ䌘⑤䞞ᬒߎᴹˈᑊ䆕ݙᄬ䎇໳໮ˈ䖭ḋৃᥦ䰸⬅Ѣ䌘⑤䰤ࠊ᠔ѻ⫳ⱘ䫭䇃ⱘৃ㛑ᗻDŽInstallShield᳔ᇣ䳔㽕2MBⱘݙᄬˈ㢹䖬㽕䇗⫼݊Ҫ㛮ᴀ⿟ᑣҹঞ໻᳝ԡ೒᭛ӊˈ߭䖬䳔㽕᳈໮ⱘݙᄬDŽǂǂџᅲϞˈᅝ㺙ⱘ⏅ܹ䆱乬䖬᳝ᕜ໮ˈ՟བ㔥㒰ᅝ㺙ǃ݊Ҫᑨ⫼⿟ᑣⱘᅝ㺙ㄝDŽ䳔㽕䇈ᯢⱘᰃˈ᳔ᮄⱘInstallShield䕃ӊࣙЁ䖬৿᳝ExpressǃInstallFromTheWebǃPackageForTheWebǃJavaEditionǃApplicationRepackagerㄝ䕃ӊˈ೼䰘ᔩЁᇚᇍ䖭ѯݙᆍ԰ㅔऩҟ㒡DŽ177 InstallShieldㅔᯢՓ⫼ᬭ⿟䰘ᔩAՓ⫼InstallShield㋏㒳ব䞣ⱘ㔎ⳕؐǂǂ㢹InstallShieldᅝ㺙೼DⲬˈWindows㋏㒳ᅝ㺙೼CⲬˈ⌟䆩ⱘᅝ㺙乍Ⳃᰃ㄀ϔ⃵߯ᓎⱘBlankSetupˈ߭InstallShield㋏㒳ব䞣ⱘ㔎ⳕؐབϟ˖BATCH_INSTALL0*COMMONFILESC:ProgramFilesCommonFilesERRORFILENAME--FOLDER_DESKTOPC:WINDOWSDesktopFOLDER_PROGRAMSC:WINDOWSStartMenuProgramsFOLDER_STARTMENUC:WINDOWSStartMenuFOLDER_STARTUPC:WINDOWSStartMenuProgramsਃࡼHINST_INSTALL0*INFOFILENAME--ISRESC:WINDOWSTEMP_ISTMP0.DIRB3F9AB.DLL*ISUSERC:WINDOWSTEMP_ISTMP0.DIR_ISUSER.DLL*ISVERSION5.50.136.0LAST_RESULT0*LOGHANDLE0*MEDIADATAPROGRAMFILESC:ProgramFilesSELECTED_LANGUAGE9SRCDIRC:MyInstallationsBlankSetupMediaDefaultDiskImagesdisk1SRCDISKC:SUPPORTDIRC:WINDOWSTEMP_ISTMP0.DIR*TARGETDIRC:WINDOWS*TARGETDISKC:*UNINSTC:WINDOWSISUNINST.EXEWINDIRC:WINDOWSWINDISKC:WINSYSDIRC:WINDOWSSYSTEMWINSYSDISKC:ǂǂ⊼˖޵ᰃৢ䴶᯳᳝ো(*)ⱘؐ೼ϡৠⱘᅝ㺙乍Ⳃ៪ᅝ㺙䖯⿟Ёৃ㛑Ӯ᳝ϡৠDŽ178 InstallShieldㅔᯢՓ⫼ᬭ⿟䰘ᔩBՓ⫼InstallShieldforVisualC++6.0InstallShieldforMicrosoftVisualC++6(ㅔ⿄InstallShieldⱘVC⠜)ᰃ䱣MicrosoftVisualStudio98ϔ䍋থ㸠ⱘˈ㱑ᰃϔϾܡ䌍⠜ᴀˈԚᅗⱘࡳ㛑ҡ↨݊Ҫᅝ㺙Ꮉ݋䕃ӊ⬹㚰ϔㅍˈ಴ЎᅗᰃInstallShieldϧϮ⠜5.1ⱘᄤ䲚ˈ݋໛њInstallShieldⱘ෎ᴀࡳ㛑ঞⳌৠⱘ䲚៤ᓔথ⦃๗˗㗠ϨҸҎ᚞୰ⱘᰃˈInstallShieldⱘ㛮ᴀ䇁㿔InstallScriptՓᕫ⫼᠋ৃҹڣ݊Ҫ催㑻䇁㿔䙷ḋ♉⌏ഄᵘ䗴ߎ㞾Ꮕⱘᅝ㺙㛮ᴀ⿟ᑣDŽԚᅗϢⳌᑨⱘInstallShield5.5ϧϮ⠜᳝䆌໮ϡৠˈЏ㽕㸼⦄೼ҹϟ޴Ͼᮍ䴶DŽ1ˊᓔথ⦃๗(1)VC⠜ϡ㛑߯ᓎ16ԡWindows㋏㒳ⱘᅝ㺙⿟ᑣDŽ(2)VC⠜ϡ㛑߯ᓎ㞾䞞ᬒⱘEXEᅝ㺙⿟ᑣࣙDŽ(3)VC⠜߯ᓎⱘ㒘ӊϡ㛑䍙䖛5ϾˈϨϡ㛑߯ᓎᄤ㒘ӊˈ㗠ϧϮ⠜ϡফ䰤ࠊDŽ(4)VC⠜≵᳝㒘ӊ৥ᇐDŽ(5)VC⠜߯ᓎⱘ᭛ӊ㒘ϡ㛑䍙䖛8Ͼˈ㗠ϧϮ⠜ϡফ䰤ࠊDŽ(6)VC⠜Փ⫼ⱘ᭛ӊय़㓽ᮍᓣৠInstallShield3.0ⳌৠDŽ(7)VC⠜ϡܕ䆌ᅮНDLLߑ᭄DŽ(8)VC⠜೼߯ᓎⱘᅝ㺙⿟ᑣЁˈਃࡼ⍜ᙃᇍ䆱Ḛϡ㛑᳈ᬍгϡ㛑䱤㮣DŽ(9)VC⠜ϡӮ᡹ਞၦҟ߯ᓎⱘ㒧ᵰDŽ(10)VC⠜ϡ㛑᳈ᬍ⫼᠋ᇍ䆱ḚᎺջⱘԡ೒DŽ2InstallScripࡳ㛑InstallShieldⱘVC⠜ⱘ㛮ᴀ䇁㿔೼ߑ᭄ࡳ㛑Ϟ᳝ϔѯ䰤ࠊˈབ㸼1᠔⼎DŽ179 InstallShieldㅔᯢՓ⫼ᬭ⿟3.Փ⫼InstallShieldⱘVC⠜InstallShieldⱘVC⠜ⱘᓔথ⦃๗੠InstallShieldϧϮ⠜5.1ᰃϔḋⱘˈ䖭䞠ϡݡ䞡໡DŽ⬅Ѣ䆹InstallShieldᰃϧ䮼ЎMicrosoftVisualC++6ᅮࠊⱘˈ᠔ҹҢVisualC++6ᓔথ⦃๗ЁⳈ᥹䖤㸠InstallShield᳈ᖿ᥋ᮍDŽǂǂᔧ⫼᠋⫼VisualC++6䇗䆩དᑨ⫼⿟ᑣৢᑊ㓪䆥៤Release⠜ⱘEXE᭛ӊˈህৃ䗝ᢽ"Tools"㦰ऩЁ"InstallShieldWizard"Ҹˈᠻ㸠ϟ߫䖛⿟(ҹVisualC++ऩ᭛ḷᑨ⫼⿟ᑣMySDIЎ՟)(1)佪ܜˈߎ⦄བ೒1᠔⼎ⱘ"Welcome"ᇍ䆱Ḛˈ㽕∖⫼᠋䗝ᅮϔϾVisualC++6.0ⱘᑨ⫼⿟ᑣ180 InstallShieldㅔᯢՓ⫼ᬭ⿟乍Ⳃ(ҹ.dswЎᠽሩৡ)DŽऩߏ[Browse...]ᣝ䪂ৃ೼⺕ⲬЁ䖯㸠ᶹᡒDŽ(2)ऩߏ[ϟϔℹ]ᣝ䪂ˈߎ⦄བ೒2᠔⼎ⱘ"ApplicationInformation"ᇍ䆱Ḛˈ㽕∖⫼᠋䕧ܹᑨ⫼⿟ᑣৡ⿄ǃ݀ৌৡ⿄ǃᑨ⫼⿟ᑣⱘ㉏ൟǃ⠜ᴀোҹঞᑨ⫼⿟ᑣⱘৃᠻ㸠᭛ӊDŽऩߏBrowseᣝ䪂(᳝"..."ヺোⱘᣝ䪂)ৃᇚ⺕ⲬЁᏆ᳝ⱘᑨ⫼⿟ᑣⱘৃᠻ㸠᭛ӊৡ䇗ܹDŽ(3)ऩߏ[ϟϔℹ]ᣝ䪂ˈߎ⦄བ೒3᠔⼎ⱘ"Summary"ᇍ䆱Ḛˈᰒ⼎䆹ᅝ㺙乍ⳂЁⱘ᭛ӊঞ᭛ӊ㒘ᙃDŽ181 InstallShieldㅔᯢՓ⫼ᬭ⿟(4)ऩߏ[ᅠ៤]ᣝ䪂ˈᅝ㺙乍ⳂMySDIህ߯ᓎདњˈᑊ㞾ࡼਃࡼInstallShieldforMicrosoftVisualC++6(5)߽⫼InstallShieldᓔথ⦃๗䖯㸠᳈⏅ⱘᅝ㺙乍Ⳃⱘ᪡԰DŽǂǂ䳔㽕䇈ᯢⱘᰃˈ⬅ѢInstallShieldforMicrosoftVisualC++6ℷ⹂ᅝ㺙ৢˈӮ㞾ࡼ೼VisualC++6.0(ᖙ乏ܜᅝ㺙)ⱘ"Tool"㦰ऩϟ⏏ࡴϔϾৡЎ"InstallShieldWizard"㦰ऩҸˈ䆹Ҹᰃ⫼ᴹЎϔϾVisualC++6.0ⱘᑨ⫼⿟ᑣ߯ᓎᅝ㺙乍ⳂⱘDŽ㢹InstallShieldᅝ㺙ࠡ≵᳝ᅝ㺙VisualC++6.0ˈ߭ᔧIntallShieldᅝ㺙ৢˈ䖯㸠ϟ߫䆒㕂ҹ㛑೼VisualC++6.0ⱘ"Tool"㦰ऩЁՓ⫼"InstallShieldWizard"㦰ऩҸ˖(1)VisualC++6.0ℷ⹂ᅝ㺙ৢˈਃࡼVisualC++6.0ˈᑊ䗝ᢽ"Tools"㦰ऩ->"Customize"ҸDŽ(2)೼ᔍߎⱘ"Customize"ᇍ䆱ḚЁˈߛᤶࠄ"Tools"义䴶ˈབ೒4᠔⼎DŽ182 InstallShieldㅔᯢՓ⫼ᬭ⿟(3)ᇚ㦰ऩ߫㸼乍⒮ࡼࠄ᳔ৢϔϾぎ㸠ˈᑊঠߏ哴ᷛˈ䬂ܹ"&InstallShieldWizard"ˈᑊᣝEnter䬂DŽ(4)䗝ᅮ߮ᠡ䬂ܹⱘ㦰ऩ߫㸼乍ˈऩߏBrowseᣝ䪂(᳝"..."ヺোⱘᣝ䪂)ᇚInstallShield᠔೼ⱘProgram᭛ӊ།ϟⱘIsVcWiz.exe䇗ܹDŽ(5)ᇚ"Initialdirectory"ⱘ䏃ᕘ䆒ЎIsVcWiz.exe᠔೼ⱘ䏃ᕘDŽ183 InstallShieldㅔᯢՓ⫼ᬭ⿟䰘ᔩC᳔ᮄInstallShieldѻકㅔҟǂǂ೼InstallShield5.5ѻક㋏߫Ёˈ䰸њᴀ䑿ⱘInstallShieldϧϮ⠜໪ˈ䖬᳝express(ㅔᯢ⠜)ǃJavaEdition(⫼Ѣ䎼ᑇৄⱘJavaᅝ㺙)ǃApplicationRepackager(⫼Ѣᑨ⫼⿟ᑣⱘࣙ㺙ˈᅗ㞾ࡼẔ⌟Ϣᑨ⫼⿟ᑣⳌ݇ⱘDLLㄝݙᆍ)ǃPackagefortheweb(⫼Ѣᇚᅝ㺙ၦҟᠧࣙ៤ϔϾ㞾䖤㸠᭛ӊ)ҹঞInstallfromtheweb(߯ᓎ⫼ѢWEBⱘᅝ㺙乍Ⳃ)ㄝDŽǂǂᔧ✊ˈInstallShieldѻકⳂࠡᏆথሩࠄ䎼ᑇৄǃᬃᣕ᳈໮᪡԰㋏㒳ⱘ⿟ᑺˈ݊ЁInstallShieldProfessional-StandardEdition6.2੠InstallShieldProfessional-WindowsInstallerEdition2.0ህᰃϸϾࡳ㛑ᔎ໻ǃ⬠䴶ᮄ乪ⱘ᳔ᮄѻકDŽStandardEdition6.2ᰃҢInstallShieldϧϮ⠜5.5থሩ㗠ᴹˈᅗ೼ॳ᳝ⱘ෎⸔Ϟ๲ࡴ䆌໮ࡳ㛑ˈᇸ݊ᰃ೼Internetᅝ㺙Ϟ᳈ᰃབℸˈ䖭Џ㽕ԧ⦄೼˖(1)㘇Ⳃϔᮄⱘ"ProjectWizard"Փ⫼ᕫᓔথ㗙᳈ᖿ᥋ഄ߯ᓎ᳔ᮄᑨ⫼⿟ᑣⱘᅝ㺙乍Ⳃˈ݊ࡳ㛑䴲ᐌᔎ໻ˈབ೒5᠔⼎DŽ(2)"One-ClickInstall"㾷އᮍḜˈᅗՓᕫ⫼᠋া䳔೼㔥义Ϟㅔऩഄ⚍ߏϔϟˈህৃ䖯㸠ᅝ㺙ˈ݊ϟ䕑੠ᅝ㺙ᰃৠᯊ䖯㸠ⱘ˗ᅝ㺙䖛⿟Ёᰒ⼎ߎᅝ㺙䖯ᑺǃᔧࠡϟ䕑䗳ᑺҹঞ᠔䳔㽕ⱘᯊ䯈ˈབ೒6᠔⼎DŽ184 InstallShieldㅔᯢՓ⫼ᬭ⿟(3)೼ॳ᳝ⱘᅝ㺙῵ᵓϞ๲ࡴњᮄ໮㄀ϝᮍⱘᡔᴃˈᑊ⫼"ObjectGallery"(ᇍ䈵ᑧ)ⱘᔶᓣᴹㅵ⧚ˈབ೒7᠔⼎DŽWindowsInstallerEdition೼ᅝ㺙ᡔᴃϞᰃ᳔ᮄⱘˈᅗ䆩೒䅽⫼᠋᥹ফ᳔ᮄⱘWindowsᅝ㺙⿟ᑣᷛޚˈ㉏ԐѢOffice2000ⱘᅝ㺙ˈᅗⱘ催ᬜǃᯧ⫼ҹঞৃ᥻ᗻᏆ㒣䌶ᴹϡᇥᅶ᠋DŽ᳔ᮄⱘ⡍ᗻ䰸њᬃᣕWindows2000໪ˈ䖬ԧ⦄೼˖185 InstallShieldㅔᯢՓ⫼ᬭ⿟(1)ࡼᗕ䇗䆩ࡳ㛑ৃҹՓ⫼᠋߯ᓎⱘᅝ㺙⿟ᑣ䫭䇃ޣᇥࠄ᳔ᇣˈᑊẔ⌟ᰃ৺⒵䎇᳔ᮄⱘWindowsᅝ㺙ᷛޚˈབ೒8᠔⼎DŽ(2)Ў⫼᠋ᦤկ᳈໮ǃ᳈ᮄⱘݙᓎ῵ഫˈᦤ催⫼᠋ᓔথᬜ⥛ˈᅗৠᯊгᬃᣕAccess,MDAC੠DCOMㄝˈབ೒9᠔⼎DŽ(3)ৃ㾚࣪ⱘᇍ䆱Ḛ㓪䕥ࡳ㛑Փ⫼᠋ᕜᆍᯧഄᬍབᷛ乬ǃܗ㋴ㄝݙᆍˈᑊৃᮍᇚ݊Ҫᅝ㺙乍ⳂЁᏆ᳝ⱘᇍ䆱Ḛ⏏ࡴ䖯ᴹˈབ೒10᠔⼎DŽ186 InstallShieldㅔᯢՓ⫼ᬭ⿟(4)݋᳝㞾ࡼᶹᡒ੠⏏ࡴϢᑨ⫼⿟ᑣⳌ݇ⱘDLL੠݊Ҫ᭛ӊDŽ(5)⫼᠋гৃՓ⫼InstallScript㛮ᴀ䇁㿔䖯㸠ᅝ㺙ⱘᅮࠊˈབ೒11᠔⼎DŽ187

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。
关闭