-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart_all_hidden.vbs
More file actions
29 lines (23 loc) · 853 Bytes
/
start_all_hidden.vbs
File metadata and controls
29 lines (23 loc) · 853 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
' Start both Scanner Helper and PHP Server hidden
' This is the main startup script
Set WshShell = CreateObject("WScript.Shell")
Set objFSO = CreateObject("Scripting.FileSystemObject")
' Get script directory
strScriptPath = WScript.ScriptFullName
strScriptDir = objFSO.GetParentFolderName(strScriptPath)
' Path to scanner_helper.exe
strExePath = strScriptDir & "\target\release\scanner_helper.exe"
If Not objFSO.FileExists(strExePath) Then
strExePath = strScriptDir & "\scanner_helper.exe"
End If
' 1. Start Scanner Helper (hidden)
If objFSO.FileExists(strExePath) Then
WshShell.Run """" & strExePath & """", 0, False
WScript.Sleep 2000 ' Wait 2 seconds
End If
' 2. Start PHP Server (hidden)
WshShell.CurrentDirectory = strScriptDir
WshShell.Run "php -S localhost:8080", 0, False
' Cleanup
Set WshShell = Nothing
Set objFSO = Nothing