Home > Software engineering >  Ask how to make the program installation package
Ask how to make the program installation package

Time:09-28


I wrote a small program, using MFC generated exe can be run directly itself, but with the help of TeeChart8 this control, ocx files, need to register first to use, if not register my little program can't start, but my program for others still have to teach others how to register, although wrote a bat run can register on your own, but still very troublesome,

Want to ask, how to make the installation package, a program can automatically put ocx is not easy to user accidentally delete the directory, and then automatically registered, this program to others with others can understand it, is a need to install the program,

CodePudding user response:

In a 64 - bit Windows:
64 exe and DLL in the directory c: \ Windows \ sys tem32 directory.
32 bit exe and DLL in the directory c: \ Windows \ sys wow64 directory.
So pay attention to:
In win64 system registered under 32-bit ocx DLL to 32 ocx or copy the DLL to the c: \ Windows \ syswow64 \ directory,
And registered to c: \ Windows \ syswow64 \ regsvr32 XXXXXXX ocx or DLL
Under win64 a system set up 32-bit programs use a database alias to c: \ Windows \ \ syswow64 \ cliconfg exe
Under win64 a system set up a 32-bit application system DSN to c: \ Windows \ \ syswow64 \ odbcad32 exe
A 64 - bit Windows platform attention point of the file system redirection http://www.cnblogs.com/jiake/p/4981555.html
64 - bit Windows platforms attention point of the registry to redirect http://www.cnblogs.com/jiake/p/4956218.html

Learn how to use the depends. Exe view exe dependent DLL

CodePudding user response:

reference 1st floor zhao4zhong1 response:
under the 64 - bit Windows:
64 exe and DLL in the directory c: \ Windows \ sys tem32 directory.
32 bit exe and DLL in the directory c: \ Windows \ sys wow64 directory.
So pay attention to:
In win64 system registered under 32-bit ocx DLL to 32 ocx or copy the DLL to the c: \ Windows \ syswow64 \ directory,
And registered to c: \ Windows \ syswow64 \ regsvr32 XXXXXXX ocx or DLL
Under win64 a system set up 32-bit programs use a database alias to c: \ Windows \ \ syswow64 \ cliconfg exe
Under win64 a system set up a 32-bit application system DSN to c: \ Windows \ \ syswow64 \ odbcad32 exe
A 64 - bit Windows platform attention point of the file system redirection http://www.cnblogs.com/jiake/p/4981555.html
64 - bit Windows platforms attention point of the registry to redirect http://www.cnblogs.com/jiake/p/4956218.html

Learn how to use the depends. Exe view exe dependent DLL


I do not ask how to register ocx, but want to do an installation package, users in the installation package to install my small program, can automatically register ocx

CodePudding user response:

reference 1st floor zhao4zhong1 response:
under the 64 - bit Windows:
64 exe and DLL in the directory c: \ Windows \ sys tem32 directory.
32 bit exe and DLL in the directory c: \ Windows \ sys wow64 directory.
So pay attention to:
In win64 system registered under 32-bit ocx DLL to 32 ocx or copy the DLL to the c: \ Windows \ syswow64 \ directory,
And registered to c: \ Windows \ syswow64 \ regsvr32 XXXXXXX ocx or DLL
Under win64 a system set up 32-bit programs use a database alias to c: \ Windows \ \ syswow64 \ cliconfg exe
Under win64 a system set up a 32-bit application system DSN to c: \ Windows \ \ syswow64 \ odbcad32 exe
A 64 - bit Windows platform attention point of the file system redirection http://www.cnblogs.com/jiake/p/4981555.html
64 - bit Windows platforms attention point of the registry to redirect http://www.cnblogs.com/jiake/p/4956218.html

Learn how to use the depends. Exe view exe dependent DLL


Miss zhao, good habits,

CodePudding user response:

Have to find a way, made the installation package, ActualInstaller may perform the specified file at the specified time

CodePudding user response:

Inno the production installation package is quite good. Even support third-party libraries (such as duilib) skin library.

CodePudding user response:

reference 5 floor xiaohuh421 reply:
inno the production installation package is quite good. Even support third-party libraries (such as duilib) skin library.

I've never used inno, so I don't know if there is any inno shortcomings,

CodePudding user response:

I personally do with NSIS for many years, this relatively simple:
! The include x64. NSH 

The Name Example
OutFile Example. Exe

Section Install
SetOutPath $INSTDIR

//pack your own program files (native path)
The File/r ". \ dir1-name \ * "
//create a desktop shortcut icon
CreateShortcut "$DESKTOP \ AppName. LNK" "$INSTDIR \ app. Exe"
//create the uninstaller
WriteUninstaller "$INSTDIR \ uninst exe"

SetOutPath $SYSDIR//$SYSDIR: System32 (x86)/SysWow64 (x64)

Other documents (native path//packaging)
The File ". \ dir2 \ xxx_x86 ocx "
ExecWait ` "$SYSDIR \ regsvr32 exe"/s "of" $SYSDIR \ xxx_x86 ocx `

//if no account of 64, the judge can not,
//such as your program and ocx is 32-bit,
//64 platform release and register 64 file
${If} ${RunningX64}

//$${DisableX64FSRedirection} SYSDIR: SysWow64=& gt; System32 (x64)
Other documents (native path//packaging)
The File ". \ dir2 \ xxx_x64 ocx "
ExecWait ` "$SYSDIR \ regsvr32 exe"/s "of" $SYSDIR \ xxx_x64 ocx `
//$${EnableX64FSRedirection} SYSDIR: System32=& gt; SysWow64 (x64)

The ${EndIf}
SectionEnd
this is a basic reference, not include the uninstall program,

CodePudding user response:

VS2010 itself come with packaging tools,
  • Related