杉宫竹苑工作室

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 2364|回复: 0

InstallShield 制作的打包程序——代码示例

[复制链接]
发表于 2017-1-7 19:44:11 | 显示全部楼层 |阅读模式

正式会员享受无限制浏览网站功能和高速网盘下载,赶快加入本站吧!

您需要 登录 才可以下载或查看,没有账号?立即注册

x
Setup.Rul
游客,如果您要查看本帖隐藏内容请回复


2、FeatureEvents.rul
  1. //---------------------------------------------------------------------------  
  2. // The Installed event is sent after the feature WebSite  
  3. // is installed.  
  4. //---------------------------------------------------------------------------  
  5.    
  6. export prototype WebSite_Installed();  
  7. function WebSite_Installed()  
  8. begin      
  9. //------------------------------------------------------------------------  
  10. //附加数据库  
  11. if !MAINTENANCE then  
  12.               //Server=[IS_SQLSERVER_SERVER];User id=[IS_SQLSERVER_USERNAME];Pwd=[IS_SQLSERVER_PASSWORD];DataBase=wxd;Max Pool Size=200;Connect Timeout=300;Connection Lifetime=3;   
  13.     AttachDB( szServer, szUser, szPassword);   
  14.   endif;  
  15.    
  16.     //---------------------------------------------------------------------------  
  17. end;  
  18. //---------------------------------------------------------------------------  
  19. // The Installing event is sent after the feature WebSite  
  20. // is installed.  
  21. //---------------------------------------------------------------------------  
  22.    
  23. export prototype WebSite_Installing();  
  24. function WebSite_Installing()   
  25.   
  26. begin        
  27.    
  28.   
  29.   
  30. end;  
  31. //---------------------------------------------------------------------------  
  32. // The UnInstalling event is sent just before the feature   
  33. // ExampleDatabase is uninstalled.  
  34. //---------------------------------------------------------------------------  
  35.    
  36. export prototype ExampleDatabase_UnInstalling();  
  37. function ExampleDatabase_UnInstalling()  
  38. begin   
  39. //-------------------------------------------------------------------------------------------  
  40. //分离数据库EXEC sp_detach_db @dbname = '数据库名称'   
  41. //Server=[IS_SQLSERVER_SERVER];User id=[IS_SQLSERVER_USERNAME];Pwd=[IS_SQLSERVER_PASSWORD];DataBase=wxd;Max Pool Size=200;Connect Timeout=300;Connection Lifetime=3;   
  42. //DetachDB();  
  43. //-----------------------------------------------------------------------------------------------------      
  44. end;  
  45. //---------------------------------------------------------------------------  
  46. // The Installing event is sent after the feature ExampleDatabase  
  47. // is installed.  
  48. //---------------------------------------------------------------------------  
  49.    
  50. export prototype ExampleDatabase_Installing();  
  51. function ExampleDatabase_Installing()  
  52. begin   
  53.   
  54.   
  55. end;  
  56. //---------------------------------------------------------------------------  
  57. // The UnInstalled event is sent after the feature ExampleDatabase  
  58. // is uninstalled.  
  59. //---------------------------------------------------------------------------  
  60.    
  61. export prototype ExampleDatabase_UnInstalled();  
  62. function ExampleDatabase_UnInstalled()  
  63. begin     
  64.     DeleteDir(ProgramFilesFolder+"//"+@COMPANY_NAME+"//示例数据库",ALLCONTENTS);  
  65.     DeleteDir(ProgramFilesFolder+"//"+@COMPANY_NAME+"//示例数据库",ONLYDIR);     
  66. end;  
复制代码


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋|手机版|Archiver|SgzyStudio

GMT+8, 2024-5-19 17:25 , Processed in 0.115646 second(s), 22 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表