-
Notifications
You must be signed in to change notification settings - Fork 3
/
winmark disabler.vbs
60 lines (51 loc) · 2.31 KB
/
winmark disabler.vbs
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
'▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁
'
' Name: winmark-disabler.vbs
'
' Author: Ömer Doğan
' Version: 1.1.0
' Github: https://github.com/owerdogan
'
' Description: Basic Windows watermark remover.
'
'▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁
set wshell = createobject("wscript.Shell")
set fso=createobject("scripting.filesystemobject")
title = "Winmark Disbaler v1.1.0"
abortmsg = "Watermarks will be removed at next boot. (Restart aborted)"
temp = wshell.expandenvironmentstrings("%TEMP%")
winmark = temp+"\winmark.bat"
set wmbat = fso.createtextfile(winmark,true)
function regvalueexists (key)
on error resume next
regvalueexists = true
err.clear
wshell.regread(key)
if err <> 0 then regvalueexists = false
err.clear
end function
if wscript.arguments.length = 0 then
set shellapp = createobject("shell.application")
shellapp.shellexecute "wscript.exe", chr(34) & _
wscript.scriptfullName & chr(34) & " uac", "", "runas", 1
else
msgbox "Welcome to Winmark!" & vbcrlf & vbcrlf & _
"If your system has a ""Activate Windows"" or ""System does not meet requirements"" watermark, it will be removed. Also this action can help remove other watermarks." & vbcrlf & vbcrlf & _
"You can star the project on github to support it." & vbcrlf & _
"Github: https://github.com/owerdogan/winmark-disabler", 0+vbinformation, title
wmbat.write "Reg.exe add ""HKLM\SYSTEM\CurrentControlset\Services\svsvc"" /v ""Start"" /t REG_DWoRD /d ""4"" /f" & vbcrlf
if regvalueexists("HKCU\Control Panel\UnsupportedHardwareNotificationCache\") then
wmbat.write "Reg.exe add ""HKCU\Control Panel\UnsupportedHardwareNotificationCache"" /v ""SV2"" /t REG_DWoRD /d ""0"" /f" '& vbcrlf
end if
wmbat.close
wshell.run chr(34) & temp + "\winmark.bat" & chr(34), 0
wscript.sleep 100
fso.deletefile temp + "\winmark.bat"
choice = _
msgbox("Your system must be restarted for the watermark removal to take effect.. Would you like to restart now?", 4+VBQuestion, title)
if choice = vbyes then
wshell.run "%comspec% /c shutdown /r /t 0", , true
else
msgbox abortmsg, 48, title
end if
end if