flesh out windows implementation
parent
eda9bcb839
commit
889f82e2e4
|
@ -4,9 +4,20 @@ IN: elevate.windows
|
||||||
|
|
||||||
<PRIVATE
|
<PRIVATE
|
||||||
! TODO
|
! TODO
|
||||||
M: windows elevated
|
M:: windows elevated ( command replace? win-console? posix-graphical? -- process )
|
||||||
3drop run-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)
|
! no-op (not possible to lower)
|
||||||
M: windows lowered ;
|
M: windows lowered
|
||||||
PRIVATE>
|
PRIVATE>
|
Loading…
Reference in New Issue