flesh out windows implementation
parent
eda9bcb839
commit
889f82e2e4
|
@ -4,9 +4,20 @@ IN: elevate.windows
|
|||
|
||||
<PRIVATE
|
||||
! TODO
|
||||
M: windows elevated
|
||||
3drop run-process ;
|
||||
M:: windows elevated ( command replace? win-console? posix-graphical? -- process )
|
||||
already-root? [
|
||||
<process> command >>command
|
||||
] [
|
||||
! hwnd lpOperation
|
||||
f "runas"
|
||||
command dup string? [ " " split ] when
|
||||
! lpFile lpParameters lpDirectory nShowCmd
|
||||
[ first ] [ rest ] bi f win-console? 1 0 ?
|
||||
! call shell function
|
||||
ShellExecuteW :> retval retval n>win32-error-check
|
||||
retval replace? [ exit ] [ ] if
|
||||
] if ;
|
||||
|
||||
! no-op (not possible to lower)
|
||||
M: windows lowered ;
|
||||
M: windows lowered
|
||||
PRIVATE>
|
Loading…
Reference in New Issue