-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPublishApp.hta
More file actions
42 lines (35 loc) · 919 Bytes
/
PublishApp.hta
File metadata and controls
42 lines (35 loc) · 919 Bytes
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
<html>
<head>
<title>ShareBridge Publisher</title>
<HTA:APPLICATION
APPLICATIONNAME="ShareBridgePublisher"
BORDER="none"
CAPTION="no"
SHOWINTASKBAR="no"
SINGLEINSTANCE="yes"
SYSMENU="no"
WINDOWSTATE="minimize"
/>
<script language="VBScript">
On Error Resume Next
Dim sh, fso, thisPath, root, bat
Set sh = CreateObject("WScript.Shell")
Set fso = CreateObject("Scripting.FileSystemObject")
thisPath = document.location.pathname
thisPath = Replace(thisPath, "file:///", "")
thisPath = Replace(thisPath, "/", "\")
thisPath = Replace(thisPath, "%20", " ")
root = fso.GetParentFolderName(thisPath)
bat = root & "\publish.bat"
If Not fso.FileExists(bat) Then
MsgBox "publish.bat was not found in:" & vbCrLf & root, 16, "ShareBridge Publisher"
window.close
End If
window.resizeTo 0,0
window.moveTo -10000,-10000
sh.Run """" & bat & """", 0, False
window.close
</script>
</head>
<body></body>
</html>