
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-21-2016 08:19 PM
Hi,
I'm trying to deploy a batch file on a handful of computers over WAN. The file executes to stop the Windows Update Service. The batch file needs to run with elevated permissions in order for it to work successfully. After reviewing a number of similar posts, it seems that LanSweeper does not yet support the "Run as administrator" function.
I was wondering if anyone is aware of a workaround that I can add into my deployment steps for the .bat file to run successfully.
Cheers,
CeleroAdmin
I'm trying to deploy a batch file on a handful of computers over WAN. The file executes to stop the Windows Update Service. The batch file needs to run with elevated permissions in order for it to work successfully. After reviewing a number of similar posts, it seems that LanSweeper does not yet support the "Run as administrator" function.
I was wondering if anyone is aware of a workaround that I can add into my deployment steps for the .bat file to run successfully.
Cheers,
CeleroAdmin

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
‎04-26-2016 04:15 PM
When deploying using the scanning credentials, Lansweeper should already use administrative privileges to run the task. In some cases, UAC (User Account Control) needs to be disabled on the target computer as this can cause some issues. You could also use some different methods as mentioned here, but this is not something we can provide support for.
3 REPLIES 3

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-19-2020 12:36 AM
:Prompt to Run as administrator
Set "Variable=0" & if exist "%temp%\getadmin.vbs" del "%temp%\getadmin.vbs"
fsutil dirty query %systemdrive% >nul 2>&1 && goto :(Privileges_got)
If "%1"=="%Variable%" (echo. &echo. Please right-click on the file and select &echo. "Run as administrator". &echo. Press any key to exit. &pause>nul 2>&1& exit)
cmd /u /c echo Set UAC = CreateObject^("Shell.Application"^) : UAC.ShellExecute "%~0", "%Variable%", "", "runas", 1 > "%temp%\getadmin.vbs"&cscript //nologo "%temp%\getadmin.vbs" & exit
:(Privileges_got)
Set "Variable=0" & if exist "%temp%\getadmin.vbs" del "%temp%\getadmin.vbs"
fsutil dirty query %systemdrive% >nul 2>&1 && goto :(Privileges_got)
If "%1"=="%Variable%" (echo. &echo. Please right-click on the file and select &echo. "Run as administrator". &echo. Press any key to exit. &pause>nul 2>&1& exit)
cmd /u /c echo Set UAC = CreateObject^("Shell.Application"^) : UAC.ShellExecute "%~0", "%Variable%", "", "runas", 1 > "%temp%\getadmin.vbs"&cscript //nologo "%temp%\getadmin.vbs" & exit
:(Privileges_got)

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2016 04:15 PM
When deploying using the scanning credentials, Lansweeper should already use administrative privileges to run the task. In some cases, UAC (User Account Control) needs to be disabled on the target computer as this can cause some issues. You could also use some different methods as mentioned here, but this is not something we can provide support for.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2020 04:31 PM
Bart.E wrote:
When deploying using the scanning credentials, Lansweeper should already use administrative privileges to run the task. In some cases, UAC (User Account Control) needs to be disabled on the target computer as this can cause some issues. You could also use some different methods as mentioned here, but this is not something we can provide support for.
Doesn't deployment use the Task Scheduler? There is a checkbox in a scheduled task to run the task elevated. It has been there for a long time. I believe it is called "Run with Highest Privileges". Why not offer that option on the deployment page?
