AtEndOfStream True ' Get a line, trimmed from all whitespace and comments ("#*") strFileType = TrimEx ( objFileTypes. OpenTextFile ( strFileTypes, 1 ) Do While objFileTypes. Quit ( 1 ) ' Open text file and proceed with each line Set objFileTypes = objFSO. FileExists ( strFileTypes ) Then WScript. Quit ( 2 ) End If ' If types definition file does not exist, quit If Not objFSO. Quit ( 2 ) End Select strFileTypes = WScript. Item ( 0 ) Case "REMOVE" boolDelete = True Case "ASSIGN" boolDelete = False Case Else WScript. ExpandEnvironmentStrings ( "%ProgramFiles%" ) ' Require and verify arguments, if arguments incorrect or missing - quit If WScript. ' Common system objects, comment unused 'Set objNetwork = CreateObject("WScript.Network") 'Set objShellAp = CreateObject("Shell.Application") Set objWShell = CreateObject ( "WScript.Shell" ) 'Set objConnection = CreateObject("ADODB.Connection") 'Set objCommand = CreateObject("ADODB.Command") 'Set objSysInfo = CreateObject("ADSystemInfo") 'Set objWMIService = GetObject("winmgmts:!\\.\root\default:StdRegProv" ) ' Registry defaults Const HKEY_LOCAL_MACHINE =
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |