-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathscript-vbs.txt
78 lines (61 loc) · 3.08 KB
/
script-vbs.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
'Script de Logon - www.professorramos.com - Aulas de Windows 2003, 2008, 2008 R2 e 2012 Grátis !!!
'============================================================================
'Impedindo exibição de error para o usuário
On error Resume Next
Err.clear 0
'============================================================================
'Mapeando Unidades de Disco
Set WshNetwork = Wscript.CreateObject("Wscript.Network")
WshNetwork.MapNetworkDrive "P:","\\SRVRAMOS\PUBLICA","true"
WshNetwork.MapNetworkDrive "V:","\\SRVRAMOS\VENDAS","true"
WshNetwork.MapNetworkDrive "J:","\\SRVRAMOS\Compras","true"
'============================================================================
'Mapeando Impressora
Set WshNetwork = Wscript.CreateObject("Wscript.Network")
WshNetwork.AddWindowsPrinterConnection "\\SRVRAMOS\EPSONV4", "EPSONV4"
WshNetwork.AddWindowsPrinterConnection "\\SRVRAMOS\HPLASERJET", "HPLASERJET"
WshNetwork.SetDefaultPrinter "\\SRVRAMOS\EPSONV4", "EPSONV4"
'============================================================================
'CRIA ATALHO DO COMPARTILHAMENTO NO DESKTOP
strAppPath = "P:\"
Set wshShell = CreateObject("WScript.Shell")
objDesktop = wshShell.SpecialFolders("Desktop")
set oShellLink = WshShell.CreateShortcut(objDesktop & "\Publica.lnk")
oShellLink.TargetPath = strAppPath
oShellLink.WindowStyle = "1"
oShellLink.Description = "Publica"
oShellLink.Save
strAppPath = "V:\"
Set wshShell = CreateObject("WScript.Shell")
objDesktop = wshShell.SpecialFolders("Desktop")
set oShellLink = WshShell.CreateShortcut(objDesktop & "\Vendas.lnk")
oShellLink.TargetPath = strAppPath
oShellLink.WindowStyle = "4"
oShellLink.Description = "Vendas"
oShellLink.Save
strAppPath = "J:\"
Set wshShell = CreateObject("WScript.Shell")
objDesktop = wshShell.SpecialFolders("Desktop")
set oShellLink = WshShell.CreateShortcut(objDesktop & "\Compras.lnk")
oShellLink.TargetPath = strAppPath
oShellLink.WindowStyle = "3"
oShellLink.Description = "Compras"
oShellLink.Save
'ENVIA O COMANDO PARA APERTAR A TECLA F5 PARA ATUALIZAR OS ICONES NO DESKTOP
WshShell.SendKeys "{F5}"
'============================================================================
'SINCRONIZA HORARIO ESTAÇÃO x SERVIDOR
Set wshShell = CreateObject("WScript.Shell")
wshShell.Run "NET TIME \\SRVRAMOS /SET /Y", 0, True
'============================================================================
'Boas Vindas Ao Usuario
Set objUser = WScript.CreateObject("WScript.Network")
wuser=objUser.UserName
If Time <= "12:00:00" Then
MsgBox ("Bom Dia "+Wuser+", você acaba de ingressar na rede corporativa PROFESSRRAMOS.COM por favor respeite as políticas de segurança e bom trabalho!")
ElseIf Time >= "12:00:01" And Time <= "18:00:00" Then
MsgBox ("Boa Tarde "+Wuser+", você acaba de ingressar na rede corporativa PROFESSRRAMOS.COM, por favor respeite as políticas de segurança e bom trabalho!")
Else
MsgBox ("Boa Noite "+wuser+", você acaba de ingressar na rede corporativa da PROFESSRRAMOS.COM, por favor respeite as políticas de segurança e bom trabalho!")
End If
Wscript.Quit