Pregunta

I know that the currently logged on windows user can be detected via WiseScript using:

Get System Information, Retrieve: Windows Logon Name

But purely in WiseScript, is there a way to get the user name executing a running process?

There is an important difference here because you could be logged on as 'Bob', but do a run as on MyDBInterface.exe with 'Sally', and MyDBInterface.exe must ran with Bob's rights.

Note: I know that I can do this with an external C# application that talks back to wise, but rather do it in Wise if there is a built in method.

¿Fue útil?

Solución

You could call the command line tool "tasklist" to get the username of a running process, and output it to a text file. Then use WiseScript to parse the file to get the exact username.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top