iNNOKENTIY21
Silver Member | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору
Код: 'Windows-1251 Sub FileExists(file) If (NOT fso.FileExists(file)) Then WScript.Echo file, " - не найден." Call EndScript() End If End Sub Sub EndScript If (NOT IsNull(fso)) Then Set fso = Nothing End If If (NOT IsNull(objShell)) Then Set objShell = Nothing End If WScript.Quit End Sub Dim fso Set fso = CreateObject("Scripting.FileSystemObject") Set scriptFullName = fso.GetFile(Wscript.ScriptFullName) scriptPath = fso.GetParentFolderName(scriptFullName) prog = "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" args = " -nologo -noninteractive -noprofile -command & 'C:\Program Files\Everything\Everything.exe' -newwindow -search (Get-ClipBoard)" comd = prog & args Set shell = CreateObject("WScript.Shell") shell.Run comd, 0, false |
|