-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathACCT.bat
156 lines (108 loc) · 2.87 KB
/
ACCT.bat
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
@echo off
:Start
setlocal enabledelayedexpansion
set list= Create Update Delete Exit
set len=0
(for %%a in (%list%) do (
set /a len+=1
))
cls
echo "Which Account?"
set Acc=0
(for %%a in (%list%) do (
set /a Acc+=1
echo !Acc!. %%a
))
set choice=
set /p choice=Enter Your Choice:
if not '%choice%'=='' set choice=%choice:~0,1%
set i=0
(for %%a in (%list%) do (
SET /A i+=1
set topic[!i!]=%%a
))
for /l %%n in (0,1,%len%) do (
if '%choice%'=='%%n' goto !topic[%%n]!
)
:Exit
cls
exit /b 1
:End
pause
echo|set /p=""|clip
cls
GOTO Start
:Create
cls
echo "Enter Account Name"
set /p AccType=Account Name:
echo "Enter Username For The Account"
set /p Usr=Username:
echo "Enter Password For The Account"
set /p Pass=Password:
echo. >> ACCT.bat
echo :%AccType% >> ACCT.bat
echo cls >> ACCT.bat
SET /P AREYOUSURE=Enable Timer? (Y/[N])?
IF /I "%AREYOUSURE%" EQU "Y" GOTO SETTIMER
IF /I "%AREYOUSURE%" EQU "N" GOTO REGULAR
:SETTIMER
SET /P TIMEEXEC=How Much Delay (in seconds)?:
echo echo "COPIED USERNAME" >> ACCT.bat
echo echo ^| set /p="%Usr%" ^| clip >> ACCT.bat
echo timeout %TIMEEXEC% >> ACCT.bat
echo cls >> ACCT.bat
echo echo "COPIED PASSWORD" >> ACCT.bat
echo echo ^| set /p="%Pass%" ^| clip >> ACCT.bat
echo GOTO END >> ACCT.bat
"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" "((Get-Content -path ACCT.bat -Raw) -replace ' Create Update Delete Exit',' %ACCTYPE% Create Update Delete Exit') | Set-Content -Path ACCT.bat"
GOTO End
:REGULAR
echo echo "COPIED USERNAME" >> ACCT.bat
echo echo ^| set /p="%Usr%" ^| clip >> ACCT.bat
echo pause >> ACCT.bat
echo cls >> ACCT.bat
echo echo "COPIED PASSWORD" >> ACCT.bat
echo echo ^| set /p="%Pass%" ^| clip >> ACCT.bat
echo GOTO END >> ACCT.bat
"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" "((Get-Content -path ACCT.bat -Raw) -replace ' Create Update Delete Exit',' %ACCTYPE% Create Update Delete Exit') | Set-Content -Path ACCT.bat"
GOTO End
:Update
cls
echo "Enter Account Name You Want To Edit"
set /p ACCUPD=Account Name:
echo.
echo "Enter New Username"
set /p Usr=Username:
echo "Enter New Password"
set /p Pass=Password:
echo :%ACCUPD% >> ACCT.bat
echo cls >> ACCT.bat
cscript.exe rp1.vbs ACCT.bat ":%ACCUPD%" "
"
cscript.exe rp2.vbs ACCT.bat ":%ACCUPD%" "
"
cscript.exe rp3.vbs ACCT.bat "%ACCUPD%" " "
pause
GOTO Confirmation
:Confirmation
cls
SET /P AREYOUSURE=Enable Timer? (Y/[N])?
IF /I "%AREYOUSURE%" EQU "Y" GOTO SETTIMER
IF /I "%AREYOUSURE%" EQU "N" GOTO REGULAR
GOTO End
:Delete
cls
echo "Enter The Name Of The Account (CASE SENSITIVE)"
set /p ACCDEL=Account Name:
echo.
SET /P DELETENOW=Are You Sure? (Y/[N])?
IF /I "%DELETENOW%" EQU "Y" GOTO DeleteAcc
IF /I "%DELETENOW%" EQU "N" GOTO END
:DeleteAcc
cscript.exe rp1.vbs ACCT.bat ":%ACCDEL%" " "
cscript.exe rp2.vbs ACCT.bat ":%ACCDEL%" " "
cscript.exe rp3.vbs ACCT.bat "%ACCDEL%" " "
echo "Account" | %ACCDEL% | "Deleted"
pause
GOTO End