Set. net Program Deployed on a machine without. Net framwork installed This article discusses how to use Windows Installer technology to release. net programs and how to use native Code Determine whether the. NET Framework is installed on the target machine. If not, the. NET Framework is automatically installed and the author's own. Net program is installed. Directory
- Content
- Create your own Installer
- Release. NET Framework
- Create your own native Installer
- Usage
- Summary
- Author
Content 1. Use vs. Net to create an installer. 2. How to deploy. NET Framework to the target machine. 3. How to use native code to make. NET Framework and your own installer into a unified installer. If no. NET Framework is installed on the target machine, the. NET Framework is automatically installed and then the author's program is automatically installed. Create your own installer in vs. net. You can create a "setup and deployment projects" project to flexibly and conveniently create your. Net program as a Windows installer file. For example, we can easily customize the following options: 1. Whether to place shortcuts on the desktop. 2. register your own file type. You can double-click the file to open it with your own program. 3. Registry processing in the following msdn site, we can get an example of creating your own installer through setup and deployment projects in vs. Net: http://msdn.microsoft.com/library/en-us/vsintro7/html/vbconDeploymentScenarios.asp The release of. NET Framework. NET Framework 1.0 provides an EXE file for re-deploying. Net: dotnetfx.exe. It contains the common language runtime and Other. net programs. We can download this EXE file from the following site: http://msdn.microsoft.com/downloads/sample.asp? Url =/MSDN-FILES/027/001/829/msdncompositedoc. XML is also available in vs. net installation CD or DVD. We can use multiple methods to deploy the. NET Framework to the target machine through dotnetfx.exe: 1. Deploy it through Microsoft Systems Management Server. 2. Deploy through active directory. 3. Use third-party tools. For more information, see Article : Http://msdn.microsoft.com/library/en-us/dnnetdep/html/redistdeploy.asp Create your own native installer.. Net Program released to the target machine, and we are not sure whether the target machine has been installed. net Framework, then we need to design a piece of unmanaged code to determine whether the target machine is installed.. NET Framework. If not, install dotnetfx.exe.. NET Framework, and then use Windows installer to install your own program. On the following msdn page, we can get an unmanaged C ++ installation program and its Source code : Http://msdn.microsoft.com/downloads/default.asp? Url =/code/sample. asp? Url =/msdn-files/027/001/830/msdncompositedoc. xml1. in csetaskclass, read "Settings. ini" to download your msiinstallation file, dotnetfx.exe path, and other settings. (For example, the. NET Framework language version) The getcaptiontext (void) getdialogtext (void) geterrorcaptiontext (void) getininame (void) getproductname (void) Parse () function is used to parse the settings. ini file. 2. In the main. cpp file, the global function fxinstallrequired () determines whether to install. NET Framework. fxinstallrequired()) dodododoand dotnetfx.exe. HKLM \ SOFTWARE \ Microsoft \. netframework \ Policy \ v1.03. to install the. NET Framework, use the following command to install dotnetfx.exe: dotnetfx.exe/Q: A/C: "Install/L/Q" 4 in zookeeper execute. Run the following command in the execcmd () global function to install your own MSI file: msiexec/I <your MSI file> Reboot = reallysuppress If we use the above native code as our own installer, we can use the following steps to install our own.. Net program and it are combined: 1. put your own. net program to become a Windows Installer (. MSI) file. 2. Open the "Settings. ini" file, set the MSI file path and file name for your own. Net program in the "Msi" key, and set the dotnetfx.exe path in the "fxinstallerpath" key. Specific parameter information, you can get from the following article: http://msdn.microsoft.com/library/default.asp? Url =/library/en-US/dnnetdep/html/redistdeploy. asp3. set "setup.exe", "settings. ini "," dotnetfx.exe "and your own MSI installation file are sent to the target machine, and then run" setup.exe ". The installer automatically checks whether there is any. net framwork. If not, run dotnetfx.exe first. After completing the preceding steps, you can successfully deploy your. Net program to a machine without the. NET framwork environment. After completing the preceding steps, you can successfully deploy your. Net program to a machine without the. NET framwork environment.