Platforms to show: All Mac Windows Linux Cross-Platform

WindowsShellExecuteAsAdminMBS(ParentWindowHandle as integer, File as string, Parameters as string = "", Directory as string = "", ShowCmd as integer = 5) as integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
global method Windows MBS Win Plugin 21.1 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Runs given file as admin.
Example
// run me as admin
Dim r As Integer = WindowsShellExecuteAsAdminMBS(0, app.ExecutableFile.NativePath, "", "", 3)

If r <> 0 Then
MsgBox "error: "+Str(r)
End If

See also WindowsShellExecuteMBS function.
Returns Windows error code, zero on success.

ShowCmd values are shown in documentation WindowsExecuteMBS function.

Blog Entries

Xojo Developer Magazine

The items on this page are in the following plugins: MBS Win Plugin.


The biggest plugin in space...