⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 setup.vbs

📁 一个统计文件大小和程序信息的插件程序(vc或vc.net下使用)
💻 VBS
字号:
Dim Shell
Set Shell = CreateObject("WScript.Shell")
Dim FSO
Set FSO = CreateObject("Scripting.FileSystemObject")

Title = "PLC Installer"

call Install

Sub Install
	If (MsgBox("This will install Project Line Counter.  Do you wish to continue?", 4, Title) <> 6) Then Exit Sub
	
	MsgBox "Please close all running instances of VC++ and VS.NET!", 48, Title

	' Get target directory
	ProgramFiles = "C:\Program Files"
	Targ = ProgramFiles + "\WndTabs.com\LineCount"
	Targ = InputBox("Enter target directory", Title, Targ)
	If (Len(Targ) = 0) Then Exit Sub

	' Create the target directory
	Dim pathParts
	pathParts = Split(Targ, "\")
	S = ""
	For Each Part in PathParts
		S = S + Part
		On Error Resume Next
		FSO.CreateFolder(S)
		On Error Goto 0
		S = S + "\"
	Next

	' Files to copy
	Dim files(1)
	files(0) = "PLC.txt"
	files(1) = "License.txt"

	' Copy the files
	For Each File In Files 
		FSO.CopyFile File, Targ & "\" & File, True
	Next
	
	' Extract the files from the cabinet
	Shell.Run "expand LineCount.cab -F:*.* """ & Targ & """",, True
	
	' Register the addin
	Shell.Run "RegSvr32 /s """ & Targ & "\LineCount.dll"""
	
	' Workspace Whiz! Interface
	If (MsgBox( _
		"Would you like to install the Workspace Whiz! Interface at this time?" & vbCRLF & _
		"The interface is required for VC5/6, but not for Visual Studio .NET."  & vbCRLF & _
		vbCRLF & _
		"Answer ""No"" if you already have Workspace Whiz! installed", 4, Title) = 6) Then
		
		Shell.Run WWhizIntInstaller,, True
		
	End If 
			
	
	' Finished...
	MsgBox "Installation Complete." & vbCRLF & vbCRLF & _
		"You will see a PLC toolbar next time you run VC/VS.NET", , _
		Title
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -