cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
cbtg2006
Engaged Sweeper
So I was looking at the easiest way to allow RunAs for different user accounts. Our Lansweeper install is used across multiple domains and also and due to security reasons a single or 'generic' type of administrator account is not an acceptable solution for our environment.

I came across ShellRunAs, which prompts for username and password, if I modify a custom action to use it as follows I am able to enter any credentials I want:

For Screengrab:
{actionpath}shellrunas.exe /accepteula {actionpath}screengrab.exe {computer} /AP

For Remote Control:
{actionpath}shellrunas.exe /accepteula {actionpath}lsremote.exe {computer} /AP

Hopefully this will be of some use to someone else - sorry if this is a re-post.

Update: For anything that requires elevation you may need to use the below method:
-----------

First create an elevate.vbs file in the Actions folder, content as follows:
Set objShell = CreateObject("Shell.Application")
Set objWshShell = WScript.CreateObject("WScript.Shell")

If (WScript.Arguments.Count >= 2) Then
Set wscriptArgs = WScript.Arguments
strApplictaion = wscriptArgs.Item(0)

i=0
For Each arg in wscriptArgs
i=i+1
If NOT(i=1) Then
strArguments = strArguments & " " & arg
End If
Next
objShell.ShellExecute strApplictaion, strArguments,"", "runas"
End If



Then modify the custom actions that include MMC.exe to be as follows:

Services Management (an example but not required for this):
{actionpath}elevate.vbs mmc.exe services.msc /computer:{computer}
1 ACCEPTED SOLUTION
seraphielx
Engaged Sweeper III
Actually they may have updated ShellRunAs and the action posted is no longer working.

For version 5 I got it working by using this

Screenshot
{actionpath}shellrunas.exe /netonly {actionpath}screengrab.exe {smartname} /NP

View solution in original post

1 REPLY 1
seraphielx
Engaged Sweeper III
Actually they may have updated ShellRunAs and the action posted is no longer working.

For version 5 I got it working by using this

Screenshot
{actionpath}shellrunas.exe /netonly {actionpath}screengrab.exe {smartname} /NP