dim objShell
set objShell = CreateObject("Shell.Application")
objShell.ControlPanelItem("desk.cpl")
20 sie 2009
dim objShell
set objShell = CreateObject("Shell.Application")
objShell.ControlPanelItem("desk.cpl")
Dim fso, stream, str, re, name
Dim wsh, oExec
Set wsh = CreateObject("WScript.Shell")
Set oExec = wsh.Exec("cmd /c " & "tasklist | find " & Chr(34) & "gg.exe" & Chr(34))
wynik = oExec.StdOut.ReadAll
'msgbox wynik
Dim valid
Set objRegEx = CreateObject("VBScript.RegExp")
valid = False
objRegEx.Pattern = "^gg.exe"
valid = objRegEx.test(wynik)
If valid = True Then
''MsgBox(wynik)
Else
wsh.Run Chr(34) & "C:\\Program Files\\Gadu-Gadu\\gg.exe" & Chr(34)
Set wsh = Nothing
End if
dir = "d:\tmp\"
dir2 = "e:\temp\"
Set fso = CreateObject("Scripting.FileSystemObject")
czas = Now()
ex = Year(czas) & Month(czas) & Day(czas) & Hour(czas) & Minute(czas) & Second(czas)
dir_ex = dir2 & ex
fso.CreateFolder(dir_ex)
fso.CopyFolder dir & "*", dir_ex
set fso = nothing