Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Elevated Program Shortcut without UAC Prompt - Create

13 Oct 2015   #470
WildWilly

Windows 7 Professional 64-bit
 
 
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 System SpecsSystem Spec
.
13 Oct 2015   #471
WildWilly

Windows 7 Professional 64-bit
 
 

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 System SpecsSystem Spec
14 Oct 2015   #472
WildWilly

Windows 7 Professional 64-bit
 
 

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 System SpecsSystem Spec
14 Oct 2015   #473
Brink

64-bit Windows 10 Pro
 
 

My System SpecsSystem Spec
.

02 Nov 2015   #474
thangmoi

Windows 7 Ultimate x64
 
 

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 System SpecsSystem Spec
02 Nov 2015   #475
Brink

64-bit Windows 10 Pro
 
 

I haven't tested this with domain users, and don't think it will work for them.
My System SpecsSystem Spec
03 Dec 2015   #476
matteoautomata

Windows 7 Professional x64
 
 
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 System SpecsSystem Spec
03 Dec 2015   #477
Brink

64-bit Windows 10 Pro
 
 

Quote   Quote: Originally Posted by matteoautomata View Post
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 System SpecsSystem Spec
03 Dec 2015   #478
matteoautomata

Windows 7 Professional x64
 
 

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 System SpecsSystem Spec
26 Feb 2016   #479
Mina

 
 
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 System SpecsSystem Spec
Reply

 Elevated Program Shortcut without UAC Prompt - Create




Thread Tools




Similar help and support threads
Thread Forum
Elevated Program Shortcut - Create for Standard User
How to Create an Elevated Program Shortcut Any User is able to Run in Vista, Windows 7, and Windows 8 This will show you how to create an elevated program shortcut that allows any user (ex: Standard user) to be able to run a program that runs as administrator without being prompted to enter the...
Tutorials
Elevated Command Prompt Shortcut
How to Create an "Elevated Command Prompt" Shortcut in Windows 7 and Windows 8 This tutorial will show you how to create a shortcut that will open an elevated command prompt with administrator rights in Windows 7 and Windows 8. When you use the elevated command prompt shortcut, you may be...
Tutorials
Task Manager - Create Elevated Shortcut
How to Create an Elevated Task Manager Shortcut in Windows 7 This will show you how to create a elevated Task Manager shortcut that will "run as an administrator" in Windows 7 when opened. It will open as if you clicked Show processes from all users in the default Task Manager. You will...
Tutorials
Setting Priority with "Elevated Shortcut without UAC Prompt Tutorial"
I used the info in Elevated Program Shortcut without UAC Prompt Tutorial and it soon dawned on me that the applications seemed to be taking a long time to run. Than the penny dropped - Scheduled Tasks run at priority 7 by default (which is lower than directly run applications typically run at)...
General Discussion
Creating an Elevated Program Shortcut for Search Everything Program.
I`ve done this successfully for SpeedFan, but I`m having a problem with doing the same for the Search Everything program. I`ve been through the tutorial steps several times now, the task executes successfully,( I checked it with command prompt box) but nothing happens. /c start "SpeedFan"...
Software
Question on "How to Create a Elevated Program Shortcut ..."
The solution (Shawn) in the thread How to Create a Elevated Program Shortcut without a UAC Prompt (https://www.sevenforums.com/tutorials/11949-elevated-program-shortcut-without-uac-prompt-create.html) ends with 24. When you run this new elevated shortcut, you will now no longer have...
System Security


Our Sites

Site Links

About Us

Find 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 14:24.
Twitter Facebook Google+ Seven Forums iOS App Seven Forums Android App