Elevated Program Shortcut without UAC Prompt - Create

Page 48 of 51 FirstFirst ... 384647484950 ... LastLast

  1. Posts : 96
    Windows 7 Professional 64-bit
       #470

    Some weird things


    I've just had some weird experiences with all of this and maybe you can tell me what is going on with it.

    First, I followed this Task Manager - Create Elevated Shortcut tutorial to create a shortcut that launches an elevated Task Manager without the UAC prompt. It works great. But when I put it in my Startup folder, it's completely ignored. I can reboot all day (something I have unfortunately been doing lately, as you can read all about in another thread elsewhere, but which, blessedly, is no longer the case) and it won't launch Task Manager at boot up. However, it is a convenient item I have kept in my Startup folder for reasons I will get to below.

    So then I SLAVISHLY followed your instructions for this tutorial, thus proving that it is a letter perfect description of everything you will see if you follow the instructions. However, I ended up with something that also didn't launch Task Manager at bootup. However squared, if I execute the entry in my Startup folder once I wait long enough to be sure it isn't going to launch on its own, it gives me the UAC prompt. How rude. So I use the other entry in the Startup folder to launch Task Manager. This is the first instance of it being convenient to have kept that entry.

    I must sidetrack for a moment to point out one step in the tutorial, step 11 to be precise, that caused me a bit of a problem for a moment. I suppose I shouldn't admit this in public but I have only one user defined in my system, it is an Administrator, and its password is blank. This is my home computer and nobody else uses it. No eager teenagers wanting to import viruses with their games, no wife wanting to run up exorbitant bills shopping online, nor any other reason to try to secure the system, other than with the lock on the front door of the home. Typing a password all the time would be so annoying. So I don't have one. This caused an error message (which I suppose I should have captured to include in this post, but sorry, I didn't) that prompted me to go into the Local Security Policy application and change the policy "Limit local account use of blank passwords to console logon only" to disabled. This allowed me to save the definition of the scheduled task in Task Scheduler in step 11 of the tutorial. End of sidetrack.

    So I started looking closely at the definition of the started task. Why launch a command window with the program I really want to launch as a parameter of that? So I coalesced the two together. I didn't do step 8, and in step 7 I just entered taskmgr.exe directly in the "Program/script" box. Plus, at step 22, after changing the icon, I also went into Advanced and turned on the Administrator permission. I'm not sure why you don't have this step in the tutorial. Is it really unnecessary? Maybe that explains . . . Oh it does!! You're so smart, Shawn. OK. I've turned off the "Run as Administrator" attribute of the shortcut. Clearly, setting Administrator privileges in step 4 of the tutorial is enough to make it elevate. How interesting . . . I'll have to remember this concept for future reference: an unelevated shortcut can launch an elevated entry defined in the Task Scheduler. Maybe I don't need both shortcuts in my Startup folder after all.

    In any case, there is still a reason for me to post this. You know, when you launch Task Manager once your system is running, you get the little green square over near the system clock in the Notification Area of the Task Bar. So even if the Task Manager itself is obscured by other windows, you can get a coarse idea of whether the CPU is busy doing something. Well, if you launch Task Manager automatically at bootup, it's so early in the process that you don't always get the little green square in the Notification Area. I pretty much never get it. Maybe it depends on the speed of your CPU. You have to close Task Manager & run the entry in the Startup folder manually to make the little green square show up. Kind of defeats the purpose of the whole exercise, doesn't it? So . . . I think you can see what my question is going to be.

    So my thought is to create a .BAT script whose second line invokes schtasks. Its first line would be something that waits for some specified delay. Maybe 10 or 15 seconds, maybe less, like I say, it may depend on the speed of your CPU. And then put a shortcut to that in your Startup folder. I'm looking in the Command Reference . . . There is no DELAY command. That would be too easy . . . Hmm . . . There is a WAITFOR. I wonder if it works to wait for a signal that of course will never come so long as you specify a timeout . . . News soon . . .
      My Computer


  2. Posts : 96
    Windows 7 Professional 64-bit
       #471

    That works like a champ. Here's what I launch from my Startup folder now:

    Code:
    rem In order to get the little green square in the Task Bar Notification Area, we need to wait a bit.
    waitfor /t 20 ThisSignalWillNeverArrive
    rem Now we can launch our Scheduled Task which in turn launches Task Manager.
    schtasks.exe /run /tn "Launch Task Manager"
    I tried it with 15 seconds and it was not quite long enough. The Task Bar appears to do some sort of initialization that takes (relatively speaking) forever and you won't get the little green square until after it's done whatever that is. But like I say, your CPU might get away with a shorter delay or you might need a longer one. You'll just have to experiment.

    Curiously, for the first time EVER, my other plain-Jane shortcut to the Task Manager launched properly during one of my experiments. Go figure. Well, I will keep it, just not in my Startup folder, since it is the one I'll use to launch Task Manager manually for whatever reason might arise, because there's no point in waiting the 20 second delay at some later time.
      My Computer


  3. Posts : 96
    Windows 7 Professional 64-bit
       #472

    I was mistaken about that first time ever comment. That was not the source of the unexpected launch of Task Manager. It was the scheduled task launching Task Manager, and then my script also tried to launch it & it was just a redundant step. So I went into Task Scheduler and updated the definition of the started task so it had no triggers. See, I had defined a trigger that it launch at bootup. No, that's what I'm trying to avoid. I'm trying to get it to launch at bootup after a delay.

    So now it works perfectly.
      My Computer


  4. Posts : 72,050
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #473

      My Computer


  5. Posts : 1
    Windows 7 Ultimate x64
       #474

    Hi Brink,
    I tried to do all steps but the domain users not run anyway. Can you help this issue for me. I test by notepad.exe.
    Thanks.
      My Computer


  6. Posts : 72,050
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #475

    I haven't tested this with domain users, and don't think it will work for them.
      My Computer


  7. Posts : 15
    Windows 7 Professional x64
       #476

    using schtasks and runas from cmd prompt


    Regarding inability for a standard user to run an elevated program, you could use the runas command with the /savecred option

    I have a question about running the schtasks from the cmd prompt. Is there a way to pass parameters or variables to the scheduled task? I saw that in your setup of your tasks, you put the specific program in the parameters. Is it possible to put a variable as the parameters, so that you could potentially only have to create one scheduled task that could be called from the cmd line?

    I am currently using the runas command to launch process explorer from a standard user account. However since UAC is now enabled, the dialog is not shown and process explorer says access denied for some information that is only available to admins, which makes me think that it is skipping the UAC dialog.
      My Computer


  8. Posts : 72,050
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #477

    matteoautomata said:
    Regarding inability for a standard user to run an elevated program, you could use the runas command with the /savecred option

    I have a question about running the schtasks from the cmd prompt. Is there a way to pass parameters or variables to the scheduled task? I saw that in your setup of your tasks, you put the specific program in the parameters. Is it possible to put a variable as the parameters, so that you could potentially only have to create one scheduled task that could be called from the cmd line?

    I am currently using the runas command to launch process explorer from a standard user account. However since UAC is now enabled, the dialog is not shown and process explorer says access denied for some information that is only available to admins, which makes me think that it is skipping the UAC dialog.
    You might see if this may help any to use. :)

    How to Create an Elevated Program Shortcut a Standard User is able to Run in Windows 7
      My Computer


  9. Posts : 15
    Windows 7 Professional x64
       #478

    Thanks I am familiar with with runas command. I created a new separate topic Elevated Program Shortcut without UAC Prompt Any User is able to Run with more details on what I am trying to do
      My Computer


  10. Posts : 8
    Win 7
       #479

    drag and drop


    Very nicely done, thanks a lot.
    But what should i enter in program/script, if i am running portable program, that is not installed.
    Namely, i have a problem with drag and drop in my photoshop6, since i installed win10, dropping the photos in won't work, which is quite frustrating.
    After i tried with code in powershell:
    Get-AppXPackage -AllUsers | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register “$($_.InstallLocation)\AppXManifest.xml”}

    drag and drop worked, but ..... it corrupted all other windows apps, @N#%$%&/ .... so i had to re-install the wins again.

    Photoshop is portable - not installed. Its not checked to run as admin, but still there is a yellow and blue shield on the icon and i can not do darn thing to change it.
    Before i had win7 and no problems with dropping.

    Can somebody help please
      My Computer


 
Page 48 of 51 FirstFirst ... 384647484950 ... LastLast

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

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