Create Elevated Shortcut without UAC prompt in Windows 10  

Page 23 of 23 FirstFirst ... 13212223

  1. Posts : 64,465
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #220

    LaUs3r said:
    Hi, somehow I cannot get it work to run netsh.exe as a standard user.

    My goal:
    switch between 2 NICs in my PC - 1 using a VPN connection, the other is connected directly (for gaming). I am currently switching using 2 batch files with the runas /user:administrator command where I have the issue that the script is executed sometimes with a delay of 20-30secs

    My steps:
    1) As Admin user
    - I created a Win10 task "Switch_WAN_to_VPN" following the guide with the following parameters:
    • general: use the following user account: standard user (not admin)
    • action: cmd.exe /c start "Switch_WAN_to_VPN" "%windir%\system32\netsh.exe" "interface set interface REGULAR enable"

    - I tested the task and it works (for the test I put in the general tab the admin account under which the tasks should run)

    2) As standard user
    - I created a shortcut schtasks /run /tn "Switch_WAN_to_VPN"
    - The tasks seems to be executed, but the NICs are not changed.

    In order to fix it, I performed the following steps:
    (1) I changed the user account under which the tasks should be executed from "standard user" to "admin user".
    Then of course I cannot execute the task anymore as standard user (error: access denied) and I need again to use the runas /user:administrator command which gives me the delay.

    (2) I changed the command slightly adapting the ":
    "%windir%\system32\netsh.exe" "interface set interface REGULAR enable"
    "%windir%\system32\netsh.exe interface set interface REGULAR enable"


    Any advice?
    Hello,

    This will not work for a standard user.

    You could try the method below, but I believe it no longer works in Windows 10 and Windows 11.

    Elevated Program Shortcut - Create for Standard User | Tutorials
      My Computers


  2. Posts : 4
    Windows 10
       #221

    thx for the quick reply and link to the other post. that's exactly the way I am doing it now (having the downside of the delayed execution sometimes)....

    well, there are worse things in life :)
      My Computer


  3. Posts : 1
    windows 10
       #222

    Add extra parameter to the shortcut


    I need to run USBDeview with extra parameter like this.
    "C:\Program Files\usbdeview-x64\USBDeview.exe" /RunAsAdmin /enable "USB\VID_1038&PID_1122\5&24b08b94&0&7"
      My Computer


  4. Posts : 14,225
    Windows 10 Home x64 Version 22H2 Build 19045.2728
       #223

    Vathanak said:
    I need to run USBDeview with extra parameter like this.
    "C:\Program Files\usbdeview-x64\USBDeview.exe" /RunAsAdmin /enable "USB\VID_1038&PID_1122\5&24b08b94&0&7"
    Then use the tutorial's Option 2 to set this up. Step 8 shows you how to split your syntax between command & arguments.
    Not that I understand why you'd need to enable that device so often that setting this up for it is worthwhile.

    All the best,
    Denis



    Welcome to TenForums.

    It's really worth making time to browse through the Tutorial index - there's a shortcut to it at the top of every page.
    - At the foot of the Tutorial index is a shortcut to download it as a spreadsheet.
    - I download a new copy each month.
    - By downloading it as a spreadsheet I can benefit from Excel's excellent filtering capabilities when I search for topics of interest.
    - Tutorials are also listed by category at Tutorials - there's also a shortcut to that at the top of every page.
    - Both tutorial lists are searchable.
    - You can also search for TenForumsTutorials in many general search engines, such as Google, by adding site:tenforums.com/tutorials after your search term. For example,
    taskbar toolbars site:tenforums.com/tutorials

    You can search TenForums using the search box in the top-right corner of all TenForums webpages or using Advanced Search - TenForums
    - You can also search TenForums threads in many general search engines, such as Google, by adding site:tenforums.com after your search term. For example,
    Search for drivers by HardwareID site:tenforums.com
    - [This is what the search box in the top-right corner of TenForums webpages does automatically]
      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 11:00.
Find Us




Windows 10 Forums