Create Elevated Shortcut without UAC prompt in Windows 10  

Page 23 of 25 FirstFirst ... 132122232425 LastLast

  1. Posts : 68,995
    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 : 16,955
    Windows 10 Home x64 Version 22H2 Build 19045.4170
       #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


  5. Posts : 43,010
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #224

    Option 1- steps 1-2 - found someone probably tripping up on the 'obvious'.. but unstated.

    The downloaded file is .......bat.log
    - so the user has to delete '.log' .. could this step be added please? Tks!
      My Computers


  6. Posts : 68,995
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #225

    dalchina said:
    Option 1- steps 1-2 - found someone probably tripping up on the 'obvious'.. but unstated.

    The downloaded file is .......bat.log
    - so the user has to delete '.log' .. could this step be added please? Tks!
    Hey mate,

    It's just the Create_an_elevated_shortcut.bat file for me that downloads. It doesn't have a .log extension on it.
      My Computers


  7. Posts : 43,010
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #226

    Hi Shawn, thanks, now that's just weird- you're right when I look at it carefully that .....bat is the file that is to be downloaded, but the actual file that appears (on my desktop) has .log appended. Which leaves me wondering what does that? (I'm using Firefox).

    Tried Edge- Edge doesn't append .log ....
      My Computers


  8. Posts : 68,995
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #227

    dalchina said:
    Hi Shawn, thanks, now that's just weird- you're right when I look at it carefully that .....bat is the file that is to be downloaded, but the actual file that appears (on my desktop) has .log appended. Which leaves me wondering what does that? (I'm using Firefox).
    Not sure unless a possible extension in Firefox modified it, or mistakenly changed it in the download prompt.
      My Computers


  9. Posts : 43,010
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #228

    FF in Safe Mode does this too..
      My Computers


  10. Posts : 7,607
    Windows 10 Home 20H2
       #229

    FF on Linux does not as shown below:

    Create Elevated Shortcut without UAC prompt in Windows 10-firefox-linux.jpg
      My Computer


 

Tutorial Categories

Create Elevated Shortcut without UAC prompt in Windows 10 Tutorial Index Network & Sharing Instalation and Upgrade Browsers and Email General Tips Gaming Customization Apps and Features Virtualization BSOD System Security User Accounts Hardware and Drivers Updates and Activation Backup and Restore Performance and Maintenance Mixed Reality Phone


  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 17:07.
Find Us




Windows 10 Forums