Option Explicit

Dim shell, fso, basePath, scriptPath, logPath, command
Set shell = CreateObject("WScript.Shell")
Set fso = CreateObject("Scripting.FileSystemObject")

basePath = fso.GetParentFolderName(WScript.ScriptFullName)
scriptPath = fso.BuildPath(basePath, "Shirone.ps1")
logPath = fso.BuildPath(basePath, "startup.log")
command = "powershell.exe -NoProfile -ExecutionPolicy Bypass -STA -WindowStyle Hidden -Command ""& '" & Replace(scriptPath, "'", "''") & "' *> '" & Replace(logPath, "'", "''") & "'"""

shell.Run command, 0, False
