PC SOFT

PROFESSIONAL NEWSGROUPS
WINDEVWEBDEV and WINDEV Mobile

Home → WINDEV 2024 → Working with Services/ ShellExec functions:  How can I use them as Administrator
Working with Services/ ShellExec functions: How can I use them as Administrator
Started by priv!zn4x5-y8vnFIM-nu11+p1z, Nov., 12 2024 7:12 PM - 1 reply
Posted on November, 12 2024 - 7:12 PM
I am trying to work with Service functions (ServiceStart, ServiceStop) but it appears I do not have permissions to use them. How can I use them as an administrator?

Also, I am trying to run ShellExec and need to do it as an Administrator as well. Is there a way to do that?

Thanks,
Mark
Registered member
60 messages
Posted on November, 14 2024 - 10:42 AM
Hello Mark,
take a look at https://help.windev.com/…

// Start a remote application (advanced use)
AppToStart is Process
AppToStart..Executable = "myapp.exe"
AppToStart..CommandLine = "/SILENT"
AppToStart..ExecutionLogin = "DOMAIN\USER"
AppToStart..ExecutionPassword = "mypassword"

ExeRemoteRun(AppToStart, exeReturnValue, "COMPUTER2")
WHILE AppToStart..ExecutionInProgress = True
Wait(100)
END

Trace(AppToStart..ReturnValue)


--
Hope this helps
Andrea