使用_Setup_Factory_70_打包netframework_20.doc
上传人:sy****28 上传时间:2024-09-14 格式:DOC 页数:6 大小:198KB 金币:16 举报 版权申诉
预览加载中,请您耐心等待几秒...

使用_Setup_Factory_70_打包netframework_20.doc

使用_Setup_Factory_70_打包netframework_20.doc

预览

在线预览结束,喜欢就下载吧,查找使用更方便

16 金币

下载此文档

如果您无法下载资料,请参考说明:

1、部分资料下载需要金币,请确保您的账户上有足够的金币

2、已购买过的文档,再次下载不重复扣费

3、资料包下载后请先用软件解压,在使用对应软件打开

下载地址:thunder://QUFodHRwOi8vODAuZHVvdGVnYW1lLmNvbS9zZXR1cGZhY3RvcnkuZXhlWlo=本文介绍一个工具:SetupFactory。在7.0版本中,SetupFactory的默认从属资源中仅支持VB5.0及VB6.0,想要在生成的安装程序中自动完成.NETFRAMEWORK的安装,从网上查了一下,须要按以下步骤做几件事:首先找到SetupFactory安装目录下的Dependencies目录,在目录中新建一个dotnet2_0.xml的文件。然后,在Dependencies目录下新建子目录,取名dotnet2_0,将.NETFRAMEWORK安装程序dotnetfx.exe拷至该子目录下,dotnetfx.exe可在VS2005的安装目录下的SDK\\v2.0\\BootStrapper\\Packages\\dotnetfx目录下找到。完成之后打开SetupFactory,选择:资源---从属---添加,可以看到.NETFRAMEWORK2.0了。C:\ProgramFiles\SetupFactory7.0\Dependencies文件dotnet2_0.xml内容如下:<DependencyTemplate><Dependency><Name>Microsoft.NETFramework2.0</Name><RuntimeTempFolder>dotnet2_0</RuntimeTempFolder><RevisionDate>Friday,March30,2007</RevisionDate><Description>安装Microsoft.NETFramework2.0应用程序所需的运行时文件。</Description><DetectScript>functionisDotNet_Installed()--author:zhengxinhewww.admans.net--Outputtothelogthatthe.NETdetectionhasstarted.SetupData.WriteToLogFile("Success\t.NET2.0Module:Detectionscriptstarted.\r\n",true);--Gettheoperatingsystemname.--ChecktoseeiftheregistrykeyexistsDotNet_Registry=Registry.DoesKeyExist(HKEY_LOCAL_MACHINE,"Software\\Microsoft\\.NETFramework");if(DotNet_Registry==nil)then--Theregistrykeydoesnotexist--Runthe.NETInstallationscript--Outputtothelogfilethat.NETcouldnotbefound,soitwillbeinstalled.SetupData.WriteToLogFile("Info\t.NET2.0Module:Noversionof.NET2.0fileswasfound..NET2.0willbeinstalled.\r\n",true);returnfalse;end--Thekeydoesexist--Getthe.NETinstalllocationfromtheregistryDotNet_Install_Location=Registry.GetValue(HKEY_LOCAL_MACHINE,"Software\\Microsoft\\.NETFramework","InstallRoot",true);--Lookforthefilemscorcfg.dllDoes_File_Exist=DotNet_Install_Location.."\\v2.0.50727\\aspnet_rc.dll";if(notFile.DoesExist(Does_File_Exist))then--Thefiledoesnotexist--Runthe.NETInstallationscript--Outputtothelogfilethat.NETcouldnotbefound,soitwillbeinstalled.SetupData.WriteToLogFile("Info\t.NET2.0Module:Noversionof.NET2.0filewasfound..NET2.0willbeinsta