Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dim password, user, test, tmp, tmp2, path, path2, name
- password = "151200" '«<------— тут пишите свой пароль вместо "151200".
- test = "1"
- tmp = "1"
- tmp2 = MsgBox ( "Хотите создать новое хранилище?" , "4", "Файловый банк v1.0")
- If tmp2 = "6" then
- Call create1
- Else if tmp2 = "7" then
- Call tooopen
- End if
- '----------------------------------------
- Sub create1
- path = inputbox ("Введите название нового хранилища:")
- set fso = createobject ("scripting.filesystemobject")
- fso.createfolder "c:\Windows\"&path
- End Sub
- Sub toopen()
- name = inputbox ("Введите название хранилища:")
- Call open1
- End Sub
- '----------------------------------------
- Sub tooopen
- Do
- user = inputbox ("Введите код доступа:")
- if user = password then
- call toopen
- End if
- Call close
- Loop
- End Sub
- Sub open1()
- set objShellApp = CreateObject("Shell.Application")
- objShellApp.open("c:\Windows\" &name)
- Wscript.Quit
- End Sub
- Sub close()
- MsgBox "Вы ввели неверный пароль! Компютер будет перезагружен!"
- Dim strComputer
- Dim strNamespace
- Dim strClass
- Dim objClass
- Dim colInstances
- Dim objInstance
- strComputer = "."
- strNamespace = "Root\CIMV2"
- strClass = "Win32_OperatingSystem"
- Set objClass = GetObject("WinMgmts:{(Shutdown,RemoteShutdown)}!\\" &_
- strComputer & "\" & strNamespace & ":" & strClass)
- Set colInstances = objClass.Instances_
- For Each objInstance In colInstances
- objInstance.Reboot()
- Next
- Wscript.Quit
- End Sub
- End if
- '-------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement