Related to your search Похожие для поиска
wscript run cmd security wscript запустить cmd безопасности
You came here from Вы пришли сюда из www.google.com searching for wscript run cmd security . поиск wscript запустить cmd безопасности. These posts might be of interest: Эти должности могут заинтересовать:
- More VBS Scripts for System Administrators Больше VBS скриптов для системных администраторов
- Free PC/Computer Security Software for Windows Applications Бесплатная ПК / компьютерной безопасности программного обеспечения для приложений Windows
- VBS Script for System Administrators - How to backup Outlook email automatically in a login or logoff script Скрипт VBS для администраторов системы - Как резервной электронной почты Outlook автоматически в регистрации или выход сценарий
- Half the spam you get might come from your own company Половина спама вам, возможно, с вашей собственной компании
- 8 Security Tips and Guidelines for your WordPress Blog 8 Безопасности Советы и руководящие принципы для WordPress Ваш блог
More VBS Scripts for System Administrators Больше VBS скриптов для системных администраторов
Posted on March 30, 2007 at 8:56 am Добавлено 30 марта 2007 г. в 8:56 утра
Over the past few years as a Systems Admin, I’ve had to write a good number of scripts to manage desktops, security, and data backup. За последние несколько лет в качестве системного администратора, я должна написать немало сценариев для управления ПК, безопасности и резервного копирования данных. Here are a couple of short scripts that I’ve used in my environment! Вот несколько коротких сценариев, которые я уже использовали в моей среде!
How to create a shortcut on the desktop - Using this script, you can get a reference to the destop using the special folders function, so you don’t have to worry about the exact path for each user. Как создать ярлык на рабочем столе - С помощью этого скрипта, вы можете получить ссылку на рабочий стол с помощью специальной папки функции, так что вам не придется беспокоиться о точном путь для каждого пользователя. Then just point to a URL or in my case, an internal web server. Затем просто указывают на URL или в моем случае, внутренний веб-сервер.
set WshShell = WScript.CreateObject(”WScript.Shell”) набор WshShell = WScript.CreateObject ( "WScript.Shell")
strDesktop = WshShell.SpecialFolders(”Desktop”) strDesktop = WshShell.SpecialFolders ( "Desktop")
set oShellLink = WshShell.CreateShortcut(strDesktop & “\Support Site.URL”) набор oShellLink = WshShell.CreateShortcut (strDesktop и "\ Поддержка Site.URL")
oShellLink.TargetPath = “http://websvr/TechSupport” oShellLink.TargetPath = "http://websvr/TechSupport"
oShellLink.Save
How to create a folder with items in the Start Menu Как создать папку с пунктов в меню "Пуск"
Set FSO = CreateObject(”Scripting.FileSystemObject”) Установить ПС = CreateObject ( "Scripting.FileSystemObject")
‘Get the start menu path "Получить меню" Пуск "путь
strStartMenu = WshShell.SpecialFolders(”StartMenu”) strStartMenu = WshShell.SpecialFolders ( "StartMenu")
‘First delete the old start menu folder - mine is called Apps "Первое удалить старую папку меню" Пуск "- мина называется Apps
‘ This is the main folder when you click All Programs, then we’ll create "Это главная папку при нажатии Все программы, то мы создадим
‘ subfolders by dept later on "вложенные папки в отдел позднее
NewFolder = strStartMenu & “\Programs\Apps” NewFolder = strStartMenu и "\ Programs \ Apps"
If FSO.FolderExists( NewFolder ) then Если FSO.FolderExists (NewFolder), то
FSO.DeleteFolder NewFolder FSO.DeleteFolder NewFolder
end if конец если
‘Re-Create or create the folder "Восстановление Создать или создать папку
If NOT FSO.FolderExists( NewFolder ) then Если НЕ FSO.FolderExists (NewFolder), то
FSO.CreateFolder NewFolder FSO.CreateFolder NewFolder
End if Конец если
‘Now we create sub-folders for each department "Сейчас мы создаем вложенных папок для каждого департамента
strStartMenu = WshShell.SpecialFolders(”StartMenu”) strStartMenu = WshShell.SpecialFolders ( "StartMenu")
DeptFolder = strStartMenu & “\Programs\Apps\Dept1″ DeptFolder = strStartMenu и "\ Programs \ Apps \ Dept1"
If NOT FSO.FolderExists( DeptFolder ) then Если НЕ FSO.FolderExists (DeptFolder), то
FSO.CreateFolder DeptFolder FSO.CreateFolder DeptFolder
End if Конец если
‘Work around the short file name problem "Работа во коротким именем файла проблема
Dim ret Dim ret
’subst a drive to make the mapping work "вещества диска сделать картирования
ret = WshShell.Run (”cmd /c subst i: c:\”, 0, TRUE) ret = WshShell.Run ( "cmd / с вещества я: с: \", 0, TRUE)
‘Create the links here, assign shortcut keys, path on server, and working dir "Создать связи здесь, назначать сочетания клавиш, путь на сервер, и рабочие реж
set oShellLink = WshShell.CreateShortcut(DeptFolder & “\Search Lab Track.lnk”) набор oShellLink = WshShell.CreateShortcut (DeptFolder и "\ Поиск Lab Track.lnk")
oShellLink.TargetPath = “i:\SearchLab\SearchLab.exe” oShellLink.TargetPath = "я: \ SearchLab \ SearchLab.exe"
oShellLink.WindowStyle = 1 oShellLink.WindowStyle = 1
oShellLink.Hotkey = “CTRL+SHIFT+S” oShellLink.Hotkey = "CTRL + SHIFT + S"
oShellLink.IconLocation = “i:\SearchLab\SearchLab.exe, 0″ oShellLink.IconLocation = "я: \ SearchLab \ SearchLab.exe, 0"
oShellLink.Description = “2 - Search Lab Track quickly” oShellLink.Description = "2 - поиск Lab дорожки быстро"
oShellLink.WorkingDirectory = “i:\SearchLab” oShellLink.WorkingDirectory = "я: \ SearchLab"
‘ You can continue to add more links into the folder, by copying this code above Вы можете продолжать добавлять другие ссылки в папку, скопировав этот код выше
‘remove the subst "удалить вещества
ret = WshShell.Run (”cmd /c subst i: /d”, 0, TRUE) ret = WshShell.Run ( "cmd / с вещества я: / р", 0, TRUE)
‘Make sure the start menu is alphatecially ordered "Убедитесь, что начало меню alphatecially приказал
‘Deleting from the registry, can’t use regular method. "Удаление из реестра, не может использовать очередной метод. Must delete by first deleting all subkeys and then deleting key Нужно удалить сначала удалить все subkeys, а затем опустить ключ
strComputer = “.” ‘ use “.” for local computer strComputer = "." "использования". " для локального компьютера
Const HKCU = &H80000001 ‘HKEY_CURRENT_USER Уст HKCU = и H80000001 "HKEY_CURRENT_USER
Set objRegistry = GetObject _ Установить objRegistry = GetObject _
(”winmgmts:{impersonationLevel=impersonate}!\\” & strComputer & “\root\default:StdRegProv”) ( "winmgmts: (impersonationLevel =) выдавайте! \ \ "и strComputer и" \ корневой \ умолчанию: StdRegProv ")
KillKey HKCU, “Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder\Start Menu” KillKey HKCU, "Software \ Microsoft \ Windows \ CurrentVersion \ Explorer \ MenuOrder \ Пуск"
Sub KillKey(lHive, strKey) Подкомиссия KillKey (lHive, strKey)
Dim strElement, IsSubscriptOutOfRange Dim strElement, IsSubscriptOutOfRange
Dim sKeys() Dim sKeys ()
objRegistry.EnumKey lHive, strKey, sKeys objRegistry.EnumKey lHive, strKey, sKeys
On Error Resume Next По ошибке возобновить Следующая
IsSubscriptOutOfRange = sKeys(0) IsSubscriptOutOfRange = sKeys (0)
If Err = 0 Then Если Эрр = 0 Тогда
For Each strElement In sKeys For Each strElement В sKeys
KillKey lHive, strKey & “\” & strElement KillKey lHive, strKey и "\" и strElement
Next Следующий
End If Конец Если
Err.Clear
objRegistry.DeleteKey lHive, strKey objRegistry.DeleteKey lHive, strKey
End Sub Конец Подкомиссии
How to enable the Encrypt File shorcut in the context menu - This will allow a user to right click on a file and choose Encrypt, rather than having to open the properties of the file. Как позволить Шифрование файлов shorcut в контекстном меню - Это позволит пользователю щелкните правой кнопкой мыши на файл и выбрать Шифрование, вместо того, чтобы открыть свойства файла.
‘ Create an object to hold a reference to the Wscript.Shell object "Создать объект провести ссылкой на Wscript.Shell объекта
Dim objShell Dim objShell
Set objShell = WScript.CreateObject(”WScript.Shell”) Установить objShell = WScript.CreateObject ( "WScript.Shell")
‘ Create some registry keys and values using RegWrite with objShell "Создать некоторых ключей реестра и значений используя RegWrite с objShell
objshell.RegWrite “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\EncryptionContextMenu”, 1, “REG_DWORD” objshell.RegWrite "HKLM \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Explorer \ Advanced \ EncryptionContextMenu", 1, "REG_DWORD"
How to open a Word document from your file server automatically - This little script does nothing but create a link to a Word Doc off the file server and then opens it. Как открыть документ Word файл с сервера автоматически - Этот маленький скрипт, но никак не создать ссылку на Word Doc у файлового сервера, а затем открывает его. You can add some code to maybe open on the file only on Mondays, maybe like a once a week update to the company. Вы можете добавить код может открыть этот файл только по понедельникам, может быть, как раз в неделю обновление для компании. Then all you have to do is update the Word file on the server. Тогда все что вам нужно сделать - это обновить Word файла на сервере.
Set FSO = CreateObject(”Scripting.FileSystemObject”) Установить ПС = CreateObject ( "Scripting.FileSystemObject")
set WshShell = WScript.CreateObject(”WScript.Shell”) набор WshShell = WScript.CreateObject ( "WScript.Shell")
strDesktop = WshShell.SpecialFolders(”Desktop”) strDesktop = WshShell.SpecialFolders ( "Desktop")
set oShellLink = WshShell.CreateShortcut(strDesktop & “\Company News.lnk”) набор oShellLink = WshShell.CreateShortcut (strDesktop и "\ Компания News.lnk")
oShellLink.TargetPath = “K:\Public\CompanyNews.doc” oShellLink.TargetPath = "K: \ публичной \ CompanyNews.doc"
oShellLink.Save
‘ Get a reference to the Word Application object. "Получить ссылку на Word Применение объекта.
Set appWord = Wscript.CreateObject(”Word.Application”) Установить appWord = Wscript.CreateObject ( "Word.Application")
‘ Display the application. "Показывать заявки.
appWord.Visible = TRUE appWord.Visible = TRUE
‘ Open ITdocument. "Открыть ITdocument.
link = strDesktop & “\Company News.lnk” ссылка = strDesktop и "\ Компания News.lnk"
appWord.Documents.Open(link) appWord.Documents.Open (ссылка)
How to remove admin shares from a computer - This greatly increases security as long as you’re not using Admin shares on any of your desktops. Как удалить администратора акций от компьютера - Это значительно повышает безопасность, пока вы не используете администратора акций на любом из своих компьютеров.
‘ Create an object to hold a reference to the Wscript.Shell object "Создать объект провести ссылкой на Wscript.Shell объекта
Dim objShell Dim objShell
Set objShell = WScript.CreateObject(”WScript.Shell”) Установить objShell = WScript.CreateObject ( "WScript.Shell")
‘ Create some registry keys and values using RegWrite with objShell "Создать некоторых ключей реестра и значений используя RegWrite с objShell
objshell.RegWrite “HKLM\SYSTEM\CurrentControlSet\Services\LanManServer\Parameters\AutoShareWks”, 0, “REG_DWORD” objshell.RegWrite "HKLM \ SYSTEM \ CurrentControlSet \ Services \ LanManServer \ Параметры \ AutoShareWks", 0, "REG_DWORD"
I’ll post some more later on when I have time! Я после несколько позже, когда я уже раз!
Related Posts: Похожие сообщения:
Bookmark, Share or Email this article. Закладка, Поделитесь или по почте статьи.
If you enjoyed this post, make sure you Если вам понравилось это сообщение, убедитесь, что subscribe to my RSS feed подписаться на мой канал ! !
» Filed Under Согласно поданной » IT Job Stuff Его работу Stuff
Related Posts Похожие сообщения
- VBS Script for System Administrators - How to backup Outlook email automatically in a login or logoff script Скрипт VBS для администраторов системы - Как резервной электронной почты Outlook автоматически в регистрации или выход сценарий
- Another way to hide files and folders in Windows XP Другой способ спрятать файлы и папки в Windows XP
- How to pin a folder to the Start Menu in Windows XP Как штифта папку в меню Пуск в Windows XP
- How to back up or save a Word document automatically before your computer crashes! Как для резервного копирования или сохранения документа Word автоматически представлен компьютер аварий!
- How to view the product keys for Microsoft Windows XP or Office XP/2003 for free Как просмотреть ключи для продуктов Microsoft Windows XP или Управление XP/2003 бесплатно
























