首页 > 其他分享 >wix custom action 之 vbscript 简明步骤(IS2120@BG57IV3)

wix custom action 之 vbscript 简明步骤(IS2120@BG57IV3)

时间:2023-06-09 18:05:25浏览次数:31  
标签:文件 Sub BG57IV3 vbscript eg IS2120 vbs

[email protected]
//z 2013-04-28 00:10:26 [email protected][T3,L62,R1,V13]
1. 在 wxs 文件中创建一个 custom action
<CustomAction Id="Id_Of_ScriptAction" BinaryKey="Id_of_binary" VBScriptCall="Function_Name" />
ID : 一个唯一的ID
BinaryKey : 指向对应的 vbs 文件(见下文)
VBScriptCall : vbs文件中的函数
eg : <CustomAction Id="CA_HelloWorld" BinaryKey="Hello_World" VBScriptCall="HelloWorldFunc" />


2. 创建 vbscript 文件
Hello_World.vbs *_*
Sub HelloWorldFunc
    msgbox "Hello World!"
End Sub

3. 将创建的 vbs 文件添加到 wxs 中去
<Binary Id="Id_of_binary" src="Local_Path" />
eg: <Binary Id="Hello_World" src="E:\Hello_World.vbs" />

4. 然后就可以放入执行序列了
<InstallExecuteSequence>
    ...
    <Custom Action="Id_Of_ScriptAction" [After|Before|Sequence]="..." >Condition</Custom>
    ...
</InstallExecuteSequence>
eg: <Custom Action="CA_HelloWorld" Before="InstallFinalize" >Remove=All</Custom>
[email protected]


标签:文件,Sub,BG57IV3,vbscript,eg,IS2120,vbs
From: https://blog.51cto.com/u_16156420/6449667

相关文章

  • vc6,windows 7 x64 调试 (IS2120@BG57IV3)
    //z2012-12-2416:31:[email protected]在windows7x64上调试vc6console程序时,按了shift+f5,程序并不结束。解决方法:替换这个文件TLLOC.dllwww.dr-hoiby.com/TLLOC.dll//z2012-12-2416:31:[email protected]......
  • 2012中国软件业务收入百强企业发布 (zz.IS2120)
    2012年(第十一届)中国软件业务收入前百家企业名单//z2012-10-0320:27:[email protected] 单位:万元                      序号企业名称软件业务收入序号企业名称软件业务收入1华为技术有限公司850384926国电南京自动化股份有限公司26675......
  • 墨菲定律 三种(is2120)
    根据“墨菲定律”:一、任何事都没有表面看起来那么简单;二、所有的事都会比你预计的时间长;三、会出错的事总会出错;四、如果你担心某种情况发生,那么它就更有可能发生。墨菲定律的原句是这样的:Iftherearetwoormorewaystodosomething,andoneofthosew......
  • The specified DSN contains an architecture mismatch between the Driver and Appli
    ThespecifiedDSNcontainsanarchitecturemismatchbetweentheDriverandApplication如果希望DSN使用32位的驱动,应该使用c:\windows\sysWOW64\odbcad32.exe//z2013-01-1612:45:[email protected][T21,L319,R11,V383]1.Icreatedsystemdsninodbc32......
  • c++ book (IS2120@BG57IV3)
    //z2013-04-1513:20:[email protected][T424,L5832,R188,V6844]ReferenceStyle-AllLevelsTheC++ProgrammingLanguage(BjarneStroustrup)(soontobeupdatedforC++11)TheclassicintroductiontoC++byitscreator.Writtentoparallelthe......
  • fgetws 讀取Unicode文件 (zz.IS2120@BG57IV3)
    //z2012-11-2218:48:[email protected][T4,L45,R0,V24]fgetws讀取Unicode文件fgetws_fgetts读取中文乱码unicode双字节多字节最近要讀取一個unicode文件做額外處理,但是透過fgetws去讀取檔案,利用WriteConsole顯示在console畫面......
  • 痛苦造就性格(也许还造就坏产品)(zz.IS2120)
    JamieZawinski//z2012-09-2622:22:[email protected][T50,L1560,R32,V428]他是一个非常传奇的人,高中都没有毕业,却是世界上最好的程序员之一,Netscape公司的主力程序员,划时代产品”网景浏览器”的主要开发者。他在公司里就是一身摇滚明星的打扮,留长发、穿皮夹克、戴......
  • Handling Invalid Characters in an XML String (zz.IS2120.BG57IV3)
    Thereare5predefinedentityreferencesinXML://z2013-08-2018:03:[email protected][T191,L2147,R75,V2925]<<lessthan>>greaterthan&amp;&ampersand &apos;'apostrophe""quotationmark//z2014-04-1017:47......
  • Jamie Zawinski访谈:在折腾中成长 (zz.IS2120)
    //z2012-09-2622:24:[email protected][T51,L1560,R32,V428]Zawinski:那终究只是理论。Seibel:是的,不过有时这个理论也能成真,只要主事者有良好的判断力,框架也不是太过精致,的确能节省时间。你能讲讲自己属于哪一类吗?Zawinski:虽然是陈词滥调,不过我还是要重提:更差就是......
  • 任正非的《北国之春》(zz.is2120)
    任正非的《北国之春》//z2012-09-1211:30:52IS212 [T36,L565,R10,V264]这是华为首席执行官任正非在出访和考察日本回国后所写的一篇文章,不仅华为内部员工熟读于心,而且也让众多的企业家、专家学者和大学生们奉为经典,即便是今日今时仍然具有很大的现实意义。我曾数百......