How to publish an application

Source: Internet
Author: User
Requirements:

Publish an MFC serial control program using mscomm32.ocx. OCX needs to be registered.

You can manually register OCX and enter the following statements in the command line. A prompt will be displayed after successful registration.

 Regsver32 "C:/Documents and Settings/owner/desktop/dm2005_dao/sys/mscomm32.ocx"

Log out of OCX and enter the following statement. A prompt is displayed after successful logon.

Regsvr32/u mscomm32.ocx

To publish an application, you must automatically register and deregister the OCX control.

Solution

You can select InstallShield, but this program is really large... Later I choseInno setupdAccording to the template provided by the software, set the main EXE and add files such as the DLL dependent on the exe. It is easy to create a file several times.

In the created ISS source file:

[Files] <br/> Source: "E:/cotdr_release/gl_mase_v10/cotdr.exe"; destdir: "{app}"; flags: ignoreversion <br/> Source: "E: /cotdr_release/gl_mase_v10/mscomm32.ocx "; destdir:" {sys} "; copymode: alwaysskipifsameorolder; flags: restartreplace regserver

In the code snippet above, the second sentence puts mscomm32.ocx under the system folder (system32), followed by the flags sign for registration.

[Uninistallrun] <br/> filename: "regsvr32"; parameters: "/u mscomm32.ocx" <br/> [uninstalldelete] <br/> type: files; Name: "{sys} // mscomm32.ocx"

In the above Code segment, when uninstalling, cancel mscomm32.ocx, and remove the OCX control from the system folder when deleting.

Source file of a complete Installer (*. ISS)-add by 2011-10-10

The script is generated by the Inno Setup script wizard !; For more information about creating an Inno Setup script file, see the help documentation! # Define myappname "Player client plug-in" # define myappversion "1.0.0.3" # define myapppublisher "Hangzhou fortune cargo Technology Co., Ltd." # define myappurl "http://yingtongkj.cn.alibaba.com/" # define myappexename "myprog.exe" [setup ]; note: The value of appid is to identify the application separately .; Do not use the same appid value for other installers .; (Generate a new guid, click the tool | generate a guid in IDE .) Appid ={{ 35c8e93d-5fda-45cf-9403-3c987a34c620} appname ={# myappname} appversion ={# myappversion }; appvername ={# myappname }{# myappversion} apppublisher ={# region} region ={# myappurl} appsupporturl ={# myappurl} appupdatesurl ={# myappurl} createappdir = nooutputdir = C: \ Users \ renyafei \ export topoutputbasefilename = setupcompression = lzmasow.compression = Yes [ages] Name: "chinesesimp"; messagesfile: "Compiler: default. isl "[files] Source:" I: \ 9-2 \ player. OCX "; destdir:" {sys} "; copymode: alwaysskipifsameorolder; flags: restartreplace regserversource:" I: \ 9-2 \ ds40xxsdk. DLL "; destdir:" {sys} "; flags: ignoreversionsource:" I: \ 9-2 \ hcnetsdk. DLL "; destdir:" {sys} "; flags: ignoreversionsource:" I: \ 9-2 \ hikclient. DLL "; destdir:" {sys} "; flags: ignoreversionsource:" I: \ 9-2 \ HPR. DLL "; destdir:" {sys} "; flags: ignoreversionsource:" I: \ 9-2 \ mfc90.dll "; destdir:" {sys} "; flags: ignoreversionsource:" I: \ 9-2 \ msvcp90.dll "; destdir:" {sys} "; flags: ignoreversionsource:" I: \ 9-2 \ msvcr90.dll "; destdir:" {sys} "; flags: ignoreversionsource: "I: \ 9-2 \ playctrl. DLL "; destdir:" {sys} "; flags: ignoreversion [uninistallrun] filename:" regsvr32 "; parameters:"/u player. OCX "[uninstalldelete] type: files; Name:" {sys} // player. OCX "type: files; Name:" {sys} // ds40xxsdk. DLL "type: files; Name:" {sys} // hcnetsdk. DLL "type: files; Name:" {sys} // hikclient. DLL "type: files; Name:" {sys} // HPR. DLL "type: files; Name:" {sys} // mfc90.dll "type: files; Name:" {sys} // msvcp90.dll "type: files; Name: "{sys} // msvcr90.dll" type: files; Name: "{sys} // playctrl. DLL "; Note: Do not use" Flags: ignoreversion "on any shared system files"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.