Whitelist For UAC?

Page 2 of 5 FirstFirst 1234 ... LastLast

  1. Posts : 7,291
    22H2 64 Bit Pro
       #11

    Try:
    @echo off
    RUNAS taskkill /im Atom.SDK.WindowsService.exe /t /f
    echo
    exit

    I don't get why you want to kill it.
      My Computer


  2. Posts : 903
    Windows 7
       #12

    More generic version to support random commands with arguments.
    Code:
    $whitelist = @{
        "Script 1" = @{
        Command = "cmd.exe"
            Argument = "/c C:\Users\GARLIN\batch.cmd"
        }
        "Kill AtomSDK" = @{
        Command = "taskkill.exe"
            Argument = "/im Atom.SDK.WindowsService.exe /t /f"
        }
    }
    
    $tasksPath = "\UAC Whitelist"
    $shortcutsDir = "$env:USERPROFILE\Desktop"
    
    $user = [System.Security.Principal.WindowsIdentity]::GetCurrent().Name
    $principal = New-ScheduledTaskPrincipal -UserId $user -LogonType Interactive -RunLevel Highest
    
    $whitelist.GetEnumerator() | ForEach-Object {
        $name = $_.Name
        $command = $_.Value.Command
        $argument = $_.Value.Argument
    
        # Create "scheduled" task
        $action = New-ScheduledTaskAction -Execute $command -Argument $argument
        $task = New-ScheduledTask -Action $action -Principal $principal
        Register-ScheduledTask -Force -InputObject $task -TaskPath $tasksPath -TaskName $name
    
        # Create shortcut to run the above task
        $WshShell = New-Object -ComObject WScript.Shell
        $shortcut = $WshShell.CreateShortcut("$($shortcutsDir)\$($name).lnk")
        $shortcut.TargetPath = "C:\Windows\System32\schtasks.exe"
        $shortcut.Arguments = "/RUN /TN `"$($tasksPath)\$($name)`""
        $shortcut.IconLocation = "C:\Windows\System32\cmd.exe,0"
        $shortcut.WorkingDirectory = "C:\Windows\System32"
        $shortcut.Save()
    }
      My Computer


  3. Posts : 540
    Windows 10 (22H2)
    Thread Starter
       #13

    Callender said:
    Try:
    @echo off
    RUNAS taskkill /im Atom.SDK.WindowsService.exe /t /f
    echo
    exit
    no joy (cmd window displays RUNAS Usage help)

    Callender said:
    I don't get why you want to kill it.
    Installed a vpn and (unknown to me) it also installed Atom. So, I assumed this service was required for the vpn as I had never seen it before. Began to notice that when I shutdown the vpn app, atom was not shutting down along with it, which I assumed it should and I decided to create a batch shutdown for the vpn. The batch worked fine until recently when I noticed that the atom taskkill was failing due to 'access denied' error (other topic on this in General forum) .
      My Computer


  4. Posts : 7,291
    22H2 64 Bit Pro
       #14

    You can try preventing it from running:

    Code:
    reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\Atom.SDK.WindowsService.exe" /v Debugger /t REG_SZ /d "%windir%\System32\taskkill.exe" /f
    If that causes problems just delete the registry entry.

    Also I don't know which VPN you're using but I can see posts elsewhere that suggest that this runs if using Pure VPN with wireguard protocol. If that's the case (I know that it might not be) try another configuration. (Protocol).
      My Computer


  5. Posts : 7,291
    22H2 64 Bit Pro
       #15

    Anyway it's possible that the service needs to be running in the background after boot for the VPN to work.
      My Computer


  6. Posts : 540
    Windows 10 (22H2)
    Thread Starter
       #16

    ok - Not a showstopper so I will shelf the issue for now, thanks to all
      My Computer


  7. Posts : 7,291
    22H2 64 Bit Pro
       #17

    One more suggestion. Make sure the shortcut to the batch file's properties are set to run as administrator.

    Whitelist For UAC?-shortcut.jpg
      My Computer


  8. Posts : 540
    Windows 10 (22H2)
    Thread Starter
       #18

    Thanks again -

    Last question. Is it possible to prevent this service from starting at boot? In addition to the taskkill 'no longer working' w/o admin credentials, this task is now starting at boot. I know the vpn uses this service but the app will start it when the app is invoked, thus my assumption and surprise that closing the app did not end the task. I still suspect the latest windows update did something based on the timing of this behavior.
      My Computer


  9. Posts : 7,291
    22H2 64 Bit Pro
       #19

    Set it to manual in services.msc
      My Computer


  10. Posts : 7,291
    22H2 64 Bit Pro
       #20

    If it's a free VPN, post a link. If paid I won't download it.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 07:28.
Find Us




Windows 10 Forums