• How to make the Windows registry open in the foreground?

    From Marion@21:1/5 to All on Wed Feb 5 11:06:09 2025
    XPost: alt.comp.os.windows-11, alt.msdos.batch.nt

    As an offshoot of this recent helpful tip from "T" today...
    *Tip: how to disable the UAC from the command line*
    <https://www.novabbs.com/computers/article-flat.php?id=84799&group=alt.comp.os.windows-10#84799>

    I have a question which would help others more easily bypass the UAC
    for specific commands that they wish to run, that they do all day, every
    day (and hence, the intervening UAC popup becomes bothersome).

    What is the Windows trick I need to add to this example, which is, to my knowledge, the absolute simplest possible example of running a command
    which normally pops up the UAC without it actually popping up that UAC?

    Example: regedit.exe
    Use model: Win+R > regit
    Action: Up pops the registry editor WITHOUT the UAC popup in between

    Setup:
    1. Decide the command that you want to run without the UAC popups, e.g.,
    C:\Windows\regedit.exe
    2. Edit the Windows task scheduler to add a new task for that command
    (Let's assume you want to name the command "regit" for this example.)
    Win+R > taskschd.msc
    Name = task regit (Name it anything, as long as it's not already used)
    [x]Run with highest privileges
    Actions = Start a program
    Program: C:\Windows\regedit.exe
    3. Create a shortcut whose target is that specific scheduled task
    Name = C:\path\to\regit.lnk
    TARGET=C:\Windows\System32\schtasks.exe /run /TN "task regedit"
    4. Optionally, create a taskbar runbox command named of the same name
    HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths
    regit.exe===C:\path\to\regit.lnk

    To run that command without the UAC popping up:
    Win+R > regit

    Result: Up pops the registry editor WITHOUT an intervening UAC prompt!
    Note: I never type "Win+R" because I have a runbox pinned to the taskbar.

    Improvement: Whenever I run that command, the registry opens in the
    background, as a tasbar icon, but under all windows. No big deal... but...

    Q: Does anyone know how to make it open in the foreground instead?
    A: ?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From R.Wieser@21:1/5 to All on Thu Feb 6 16:32:02 2025
    XPost: alt.comp.os.windows-11, alt.msdos.batch.nt

    Arlen,

    Q: Does anyone know how to make it open in the foreground instead?

    Have you ever thought about *why* that that Windows task scheduler trick
    works ? IOW, If someone knows the answer you would /most likely/ get the
    UAC prompt back. :-(

    I would suggest you take a peek the link "T" posted, and try to create a solution with that.

    Remark:
    when you do than make sure that when your script ends you put back the situation as you found it. People who have disabled the UAC won't think its funny when you just enable it afterwards.

    Regards,
    Rudy Wieser

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)