This repository was archived by the owner on Jan 12, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdash.hta
More file actions
88 lines (76 loc) · 2.94 KB
/
dash.hta
File metadata and controls
88 lines (76 loc) · 2.94 KB
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
<!doctype html>
<html>
<head>
<title>BSG DASH</title>
<hta:application
applicationname="BSGDASH"
border="thick"
borderstyle="normal"
caption="yes"
contextmenu="no"
maximizebutton="no"
minimizebutton="no"
showintaskbar="yes"
singleinstance="yes" />
<style>
body {
font-family: "Segoe UI";
padding: 20px;
}
input[type=text] { width: 300px; }
</style>
<script type="text/vbscript">
Sub RunCommand()
Dim command
command = document.getElementById("commandInput").value
If command <> "" Then
Set shell = CreateObject("WScript.Shell")
shell.Run command, 1, False
End If
End Sub
Sub Window_OnLoad()
window.resizeTo 600, 400
WindowTop = (window.screen.availHeight - 400)
window.moveTo 0, WindowTop
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colOperatingSystems = objWMIService.ExecQuery _
("Select * from Win32_OperatingSystem")
For Each objOperatingSystem in colOperatingSystems
OSCaption = objOperatingSystem.Caption
Next
If InStr(1, OSCaption, "10") Then
document.getElementById("runIcon").src = "https://unplugged.bastionsg.rf.gd/bypsrc/dashsrc/Run_2015.png"
Else
document.getElementById("runIcon").src = "https://unplugged.bastionsg.rf.gd/bypsrc/dashsrc/Run_Windows_2021.png"
End If
End Sub
Sub Cancel()
window.close
End Sub
Sub SetFilePath()
Dim filePath
filePath = document.getElementById("fileInput").value
If filePath <> "" Then
document.getElementById("commandInput").value = Replace(filePath, "C:\fakepath\", "")
End If
End Sub
Sub Document_OnKeyUp()
intKeyCode = Window.Event.Keycode
If intKeyCode = 27 Then Window.Close
End Sub
</script>
</head>
<body onload="Window_OnLoad()" scroll="no">
<p><img id="runIcon" src="" style="width:15%; vertical-align: top; display: inline-block;" />
<span style="display: inline-block; width: 75%;">Type the name of a program, folder, document, or Internet resource, and DASH will open it for you:</span>
</p>
<p>Open: <input type="text" id="commandInput" placeholder="Enter command or browse..." size="60" /></p>
<br>
<input type="file" id="fileInput" style="display:none;" onchange="SetFilePath()" />
<button onclick="RunCommand()">Run</button>
<button onclick="Cancel()">Cancel</button>
<button onclick="document.getElementById('fileInput').click()">Browse</button>
</body>
</html>