《Windows脚本编程核心技术精解AppendixB.pdf》由会员分享,可在线阅读,更多相关《Windows脚本编程核心技术精解AppendixB.pdf(6页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。
1、Appendix BAbout the CD-ROMThe CD-ROM included with this book contains the following materials:IAll scripts and component source code from the bookIMicrosoft Windows Script Technologies TrialIAdobe Acrobat ReaderIAn electronic version of this book,Windows Scripting Secrets,in.pdfformatScripts and Com
2、ponent Source CodeDont type in all the scripts and sources!Theres a much easier way:on thisbooks companion CD-ROM,where youll find both the scripts and all thecomponent source code.To compile and run the scripts and source code for this book,you will needthe Visual Basic Control Creation Edition(VB
3、CCE),which you can downloadfrom Microsoft at http:/ Windows Scripting Host 2.0,which you can obtain at http:/ your own COM objectsAfter you have installed the Visual Basic Control Creation Edition(or if youalready own Visual Basic),you can access the COM object source codes inthe CodeComponentsdirec
4、tory.These are organized in subdirectories byproject name:appactivate,capture,and so on.Open the.vbpfiles to seeall the internal mechanics.There are no secret parts;I have provided fullsource code of any COM object introduced in this book.Installing COM objects the easy wayIf you dont like to compil
5、e COM objects yourself,take a look into theInstallsubdirectory.Here,you find setup packages for all COM objects.Just call setup.exe,and the Visual Basic installer will install all necessaryfiles onto your computer.4684-8 appB.f.qc 3/3/00 9:46 AM Page 701However,before you install anything using the
6、Visual Basic installer,makesure you have read the installer limitations outlined in Appendix A.Thepackages have been compiled with Windows 2000 to ensure they will workwith as many Windows versions as possible.Still,using the VB installer maynot install all components correctly on your system.There
7、may even becases where the installer replaces newer files with older ones,an intrinsiclimitation of the VB installer,which is why you should pay attention to thefollowing caveat.On production systems critical to your business,youshould avoid the VB installer packages and instead compile the COMobjec
8、ts yourself.Using scriptsAll scripts are organized by chapter,and stored in the Code/Scriptssubfolder.In contrast to the source code printed in the book,the scripts on CD also include a protection routine.It checks whether all of the requiredCOM objects are installed on your system.This routine cons
9、ists of twoclearly marked parts,and you can remove those lines anytime if you dontneed this kind of protection.Changing and editing filesNote also that all files on CD by default have a write-protection attribute.Ifyou want to change a file,you must copy it to your hard drive and removethe write pro
10、tection attribute manually.Overview:COM object listAll COM objects discussed in this book and used within the scripts are listedin the following table.In the left column,you find the COM object namesscipts use to access the component.In the right column,you find the name of the component on CD.Searc
11、h for this name both in CodeComponents(source code)and CodeInstall(setup packages).Table A-1COM Objects and ComponentsCOM Object NameComponent Name on CDApp.activateappactivateCd.toolsCdtrayClip.boardClipboardCompress.filesCompressDialog.testInputbox702AppendixesII4684-8 appB.f.qc 3/3/00 9:46 AM Pag
12、e 702COM Object NameComponent Name on CDDlg.toolsComdlgDll.tobtoolsDllFile.versioninfoVersionFilesystem.toolfilesysFolder.toolsfolderpickerFormat.toolFormatIcon.handlericonhandlerIconpicker.toolIconpickIehelper.toolsIehelperImunicationInternetListview.toolListviewMci.managerMciMemory.statsMemoryMisc
13、.informationMiscinfoModeless.dialogModelessModule.spySpyNt.servicesNtserviceNt.shutdownNtshutdownNt.userNtuserOle.bitmapCaptureOle.errOleerrorOs.versionOsversionProcess.idProcessProperty.toolPropertyRegistry.updateRegupdateRegtool.tobRegistryScreen.toolscreenShellcopy.toolShellcopyTimer.eventTimerTr
14、ay.iconTrayTreeview.toolTreeviewContinuedAppendix A:About the CD-ROM703II4684-8 appB.f.qc 3/3/00 9:46 AM Page 703Table A-1(continued)COM Object NameComponent Name on CDTwain.managerScanTypelib.decoderTypelibWeb.dialogWebdialogWindow.listWindowlistWindow.list2Windowlist2Window.ManagerWinmanagerMicros
15、oft Windows Script Technologies TrialThe CD-ROM includes the Windows Script Technologies Trial from Microsoft,which includes valuable add-ons and documentation.Included are:ISCE10EN.EXE,which allows encryption of script filesISCT10EN.EXE,which includes script components useful for developerswho wish
16、 to include scripting capabilities into their applications.ISTE51EN.EXE,which helps install the latest version of Windows Scripting Host.IVBSDOC.EXE,which includes VBScript help files.IJSDOC.EXE,which includes JScript help files.IWSHDOC.EXE,which includes Windows Scripting Host help files.To install
17、 any of these items,go to the Windows Script Technologydirectory on the CD and double-click the appropriate executable file,thenfollow the setup instructions.Adobe Acrobat ReaderAdobe Acrobat Reader is a helpful program that will enable you to view theelectronic version of this book in the same page
18、 format as the actual book.To install and run Adobe Acrobat Reader and view the electronic version ofthis book,follow these steps:1.Start Windows Explorer(if youre using Windows 95/98)or WindowsNT/2000 Explorer(if youre using Windows NT/2000),and then open theAdobe Acrobatfolder on the CD-ROM.704App
19、endixesII4684-8 appB.f.qc 3/3/00 9:46 AM Page 7042.In the Adobe Acrobatfolder,double-click rs40eng.exeand follow theinstructions presented onscreen for installing Adobe Acrobat Reader.3.To view the electronic version of this book after you have installedAdobe Acrobat Reader,start Windows Explorer(if
20、 youre using Windows95/98)or Windows NT/2000 Explorer(if youre using Windows NT/2000),and then open the Windows Scripting SecretsPDF folder on theCD-ROM.In the Windows Scripting SecretsPDF folder,double-click the chapter orappendix file you want to view.All documents in this folder end with a.pdfextension.Appendix A:About the CD-ROM705II4684-8 appB.f.qc 3/3/00 9:46 AM Page 7054684-8 appB.f.qc 3/3/00 9:46 AM Page 706