UBUNTU 10.04 LTS

 
 
UBUNTU 10.04 LTS
 
Už za 2 dny je tu nové UBUNTU, ikdyž ve verzi 9.10 již není o čem pochybovat. Jednou nastoupíte a nebudete chtít zpět.
Ubuntu opravdu stojí za to!
 

Advertisements

Check if a file exists

 
Scriptin’10
 
Check if a file exist on a list of computers
Ověření, zda existuje soubor na definovaných strojích
 
 
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colFiles = objWMIService.ExecQuery _
    ("Select * From CIM_Datafile Where Name = ‘C:\\Program Files\\WinPcap\\Uninstall.exe’")
If colFiles.Count > 0 Then
    Wscript.Echo "yes"
Else
    Wscript.Echo "No"
End If
________________________________________________________________________________
 
On Error Resume Next
Set fso = CreateObject("Scripting.FileSystemObject")
Set objInputFile = fso.OpenTextFile("comps.txt", 1, True)
Set objOutputFile = fso.OpenTextFile("vystup.txt", 8, True)
Do While objInputFile.AtEndOfLine <> True
strComputer = objInputFile.ReadLine
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_ComputerSystem")
Set colFiles = objWMIService.ExecQuery _
    ("Select * From CIM_Datafile Where Name = ‘C:\\Program Files\\AVG\\AVG9\\avgrsx.exe’")
If colFiles.Count > 0 Then
    ObjOutputFile.WriteLine "Ano je AVG9 " & "PC: " & strComputer & vbNewLine
Else
    ObjOutputFile.WriteLine "Neni AVG9 " & "PC : " & strComputer & vbNewLine
End If
Loop