修复Windows系统

我们在平时操作电脑的过程中可能会因为某个误操作而丢失了一些重要的系统文件,系统因此变得非常不稳定,总是出现错误提示
,如果是为此而重新安装系统的话,那必将浪费你好长的时间,其实使用SFC文件检测器命令就可以轻松地帮你检测并修复受损的系统文
件。
  
  具体方法:插入系统安装光盘,然后在命令提示符窗口中输入“sfc /scannow”命令并回车,这时sfc文件检测器将立即扫描所有受
保护的系统文件。在大约几分钟的时间里,SFC会检测并修复好受保护的系统文件。
  
  小提示:如果身边没有Windows XP安装盘,但以前在硬盘上备份了安装盘文件的话,可以通过下面的小小设置即可让文件检测器从硬
盘上的安装文件中来恢复系统文件。

展开“HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Setup”子键,然后在右侧窗口中修改Installation

Sources、ServicePackSourcePath和SourcePath三个键值为硬盘上的系统安装程序路径,例如Windows XP的安装原文件存放在E盘/CDXP

文件夹中,那么修改以上三个键的键值为“E:/CDXP”。这样再使用SFC命令时,则可以直接使用硬盘上的安装文件来恢复系统而不需要
插入安装光盘。

手动删除Windows服务

步骤:

1.运行service.msc运用服务属性定位可执行文件位置
删除该文件
2.运行regedit定位到
/HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services
删除相应注册表项
3.重新启动

说明:
1.适用于无法删除的非系统自带服务选项
2.如果有卸载程序请首先使用卸载程序
3.有些服务是有移除选项的
例如:-remove
可以google一下^0^

VBS枚举硬盘信息

1、GetHDInfo.vbs
这个脚本,是Google后找到的,虽然是VBS,但比网上绝大多数的代码,靠谱的多得多

'---------------------------------------------------
'Get the properties of all partitions on all drives, 
'including USB drives.
'Core code from the Scripting Guy
'7.1.2012 FNL
'---------------------------------------------------
Set oWMIService = GetObject("winmgmts:\\.\root\cimv2")
Set cDiskDrives = oWMIService.ExecQuery("SELECT * FROM Win32_DiskDrive")

For Each oDrive In cDiskDrives
	WScript.echo "Disk #" & oDrive.Index & "(" & oDrive.InterfaceType & "): " _
		& oDrive.Caption & ", Size=" & Format(oDrive.Size, False) & " MBytes"
	WScript.echo "Part.  Drive          F/S   Size(MBytes)  Free(MBytes)  Active  Primary"
	WScript.echo String(71, "-")

	'WScript.Echo "ASSOCIATORS OF {Win32_DiskDrive.DeviceID=""" & Replace(oDrive.DeviceID, "\", "\\") & """} WHERE AssocClass = " & "Win32_DiskDriveToDiskPartition"

	Set cPartitions = oWMIService.ExecQuery("ASSOCIATORS OF {Win32_DiskDrive.DeviceID=""" _
		& Replace(oDrive.DeviceID, "\", "\\") & """} WHERE AssocClass = " & "Win32_DiskDriveToDiskPartition")
 
	For Each oPartition In cPartitions
		aPartition = Split(oPartition.DeviceID)
		Set cLogicalDisks = oWMIService.ExecQuery _
	 		("ASSOCIATORS OF {Win32_DiskPartition.DeviceID=""" & oPartition.DeviceID _
			& """} WHERE AssocClass = Win32_LogicalDiskToPartition")
 		if oPartition.Bootable         then sActive  = "Yes" Else sActive  = "No "
 		if oPartition.PrimaryPartition then sPrimary = "Yes" Else sPrimary = "No "
		For Each oLogicalDisk In cLogicalDisks
			For Each oVolume In cLogicalDisks
				sLabel = Left(oVolume.VolumeName & Space(12), 12)
			Next
			With oLogicalDisk
				sSpacer = Space(8 - Len(.FileSystem))
	 	   		WScript.Echo " " & aPartition(3) & "    " & .DeviceID & " " & sLabel _
				& .FileSystem & sSpacer & Format(.Size, True) & "       " _
				& Format(.FreeSpace, True) & "     " & sActive & "     " & sPrimary
			End With
		Next
	Next
	WScript.Echo
Next

Function Format(n, bPad)
	n = FormatNumber(n/1000000, 0, -1, 0, -1)
	if bPad then Format = Space(7-Len(n)) & n Else Format = n
End Function

2、运行

@REM do not use wscript GetHDInfo.vbs
@cscript GetHDInfo.vbs

Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved.

Disk #1(IDE): Hitachi HTS545032B9A302 ATA Device, Size=320,070 MBytes
Part.  Drive          F/S   Size(MBytes)  Free(MBytes)  Active  Primary
-----------------------------------------------------------------------
 #1    D: WinAPP      NTFS    319,862       182,455     No      Yes

Disk #0(IDE): Samsung SSD 850 EVO 500GB ATA Device, Size=500,105 MBytes
Part.  Drive          F/S   Size(MBytes)  Free(MBytes)  Active  Primary
-----------------------------------------------------------------------
 #1    E: MacSSD      HFS     256,114        89,747     No      Yes
 #3    C: BOOTCAMP    NTFS    242,999        45,934     Yes     Yes

Press any key to continue . . .