预览加载中,请您耐心等待几秒...
1/6
2/6
3/6
4/6
5/6
6/6

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

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

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. --Checktoseeiftheregistrykeyexists DotNet_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.NETinstalllocationfromtheregistry DotNet_Install_Location=Registry.GetValue(HKEY_LOCAL_MACHINE,"Software\\Microsoft\\.NETFramework","InstallRoot",true); --Lookforthefilemscorcfg.dll Does_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