
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-29-2012 01:01 PM
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:
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}
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}
Solved! Go to Solution.
Labels:
- Labels:
-
General Discussion
1 ACCEPTED SOLUTION

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-25-2013 08:42 PM
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
For version 5 I got it working by using this
Screenshot
{actionpath}shellrunas.exe /netonly {actionpath}screengrab.exe {smartname} /NP
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-25-2013 08:42 PM
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
For version 5 I got it working by using this
Screenshot
{actionpath}shellrunas.exe /netonly {actionpath}screengrab.exe {smartname} /NP
