1. vbproject wizard 选择vbproject文件,自动引入相关的dll
[file groups] insert file and folder,
需要注册的ocx,有的需要放在system32目录的, 就要放在windows system self-reg shared files
更改GUID和Owner
更改版权信息license.txt, 程序信息infolist.txt
2. media wizard 一路默认下去就好了
3. setup.rul 更改公司名,安装目录
4. compile ,build media(F7) 注意资源管理器不能打开media所在的目录
删掉setup.bmp, 这个图默认的太难看了
假如需要指定路径的.修改setup.rul
Dlg_SdAskDestPath: szDir="d:\\XXX"; TARGETDIR ="d:\\XXX"; szTitle = ""; szMsg = ""; nResult = SdAskDestPath( szTitle, szMsg, szDir, 0 ); TARGETDIR = szDir; if (nResult = BACK) goto Dlg_SdRegisterUserEx;去掉
去掉setuptype界面(typical,custom..), 去掉start copy的确认
/*Dlg_SetupType: szTitle = ""; szMsg = ""; nResult = SetupType ( szTitle , szMsg , "" , nSetupType , 0 ); if (nResult = BACK) then goto Dlg_SdAskDestPath; else nSetupType = nResult; if (nSetupType != CUSTOM) then if(CMPT_ERR_DISK_NOTENOUGHSPACE = ComponentCompareSizeRequired(MEDIA, szDir, nvSize))then MessageBox( szSdStr_NotEnoughSpace, WARNING ); goto Dlg_SetupType; endif; endif; endif; */ Dlg_SdComponentTree: if ((nResult = BACK) && (nSetupType != CUSTOM)) goto Dlg_SdAskDestPath; szTitle = ""; szMsg = ""; szTargetdir = TARGETDIR; szComponents = ""; nLevel = 2; //if (nSetupType = CUSTOM) then // nResult = SdComponentTree(szTitle, szMsg, szTargetdir, szComponents, nLevel); // if (nResult = BACK) goto Dlg_SetupType; //endif; Dlg_SdSelectFolder: szfolder = SHELL_OBJECT_FOLDER; szTitle = ""; szMsg = ""; nResult = SdSelectFolder( szTitle, szMsg, szfolder ); SHELL_OBJECT_FOLDER = szfolder; if (nResult = BACK) goto Dlg_SdComponentTree; /*Dlg_SdStartCopy: szTitle = ""; szMsg = ""; listStartCopy = ListCreate( STRINGLIST ); //The following is an example of how to add a string(svName) to a list(listStartCopy). //eg. ListAddString(listStartCopy,svName,AFTER); nResult = SdStartCopy( szTitle, szMsg, listStartCopy ); ListDestroy(listStartCopy); if (nResult = BACK) goto Dlg_SdSelectFolder; */ // setup default status SetStatusWindow(0, ""); Enable(STATUSEX); StatusUpdate(ON, 100); return 0;
我的电脑64位的,VBbuild出来的exe,放在安装包里, 在32位的电脑安装. 有可能出现"运行时错误 380, 无效的属性值 ", 可以在32位电脑VB重新build一个exe,放在安装包里.
(win7 未更新的问题?)
如果卸载时需要保留一些项目不被卸载,比如有些copy到system32的ocx要保持注册.
可以这样
=========================
如何快速建立一个项目.
1. copy原有的安装项目到新目录,然后改guid, 把file group目录的 Program Files.fgl 里面的文本替换成你想要的目录文件
2.在Resources tab 更改Folder_name, Product_name,