Mailspring/build/resources/win/elevate.vbs
Ben Gotow 8df4f6d744 feat(win32): Allow N1 to become the system-wide mailto: handler
Summary: This will address the longstanding concern in #417

Test Plan: No new tests

Reviewers: juan, evan

Reviewed By: juan, evan

Maniphest Tasks: T7065

Differential Revision: https://phab.nylas.com/D3322
2016-10-12 16:05:36 -07:00

13 lines
No EOL
334 B
Text

Set Shell = CreateObject("Shell.Application")
Set WShell = WScript.CreateObject("WScript.Shell")
Set ProcEnv = WShell.Environment("PROCESS")
cmd = ProcEnv("CMD")
app = ProcEnv("APP")
args= Right(cmd,(Len(cmd)-Len(app)))
If (WScript.Arguments.Count >= 1) Then
Shell.ShellExecute app, args, "", "runas", 0
Else
WScript.Quit
End If