How to? Start a program on log on elevated abovenormal

May 24, 2010
855
0
Northlake, Il
This is pretty simple. I want to start the Windows magnify program (C:\Windows\System32\Magnify.exe) on log on with above-normal priority (important) and elevated (not so much). One approach which doesn't work is to place "C:\Program Files\JPSoft\TCMD16x64\TCmd.exe" /C Start /AboveNormal /Elevated /PGM C:\Windows\System32\Magnify.exe in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run. Putting the command in a batch file and executing that doesn't work either. Nor does preceding the "Start" with either "/C" or "/K". I really don't understand what I'm doing wrong here; how do I make this work?
 
May 20, 2008
11,292
95
Syracuse, NY, USA
How does it not work? Does anything at all happen?

A scheduled task (trigger = log on, run with highest privileges) should work and dispense with any UAC prompts.

I'd use TCC instead of TCMD.

When I try this
Code:
g:\tc16\tcmd.exe /c start /elevated /pgm notepad
TCMD starts ... then notepad (with UAC prompt) ... then TCMD hangs around with no tabs open I've config'd it to run with no tabs).

TCC understands "/C" to mean "execute the command, then exit". TCMD processes "/C" (differently from TCC) only when it's last on TCMD's command line (see "starting TakeCommand"). Otherwise, I imagine it just passes it on to TCC.
 
May 24, 2010
855
0
Northlake, Il
Vince, Take Command itself starts OK but the magnify app doesn't run (I only want this to be started once immediately after log on and I also want a Take Command session to be started at log on). And I definitely want the magnify app to run at an above normal priority; in the past I ran it just at the default priority and that just didn't do it in many circumstances (I'm quite dependent on the magnify app and having it not run for ten or more seconds at a time just doesn't cut it). I see no way to start a program in the task scheduler with an increased priority, although I must admit I really don't know what priority programs started by the task scheduler are started with in the first place.
 
Nov 13, 2008
255
3
www.thedave.me
I would guess that using Task Scheduler to start the Take Command session elevated, and then using Take Command to start the magnify app as high priority is your best bet.

I'd also agree with starting TCC rather than TCMD.
 
May 12, 2014
18
0
Kansas
Task scheduler has the "Run with highest privileges" option. But using a logon script would probably work better than trying to use TCC/TCMD to launch magnify.
 
May 20, 2008
11,292
95
Syracuse, NY, USA
This works from the Start\Run dialog.
Code:
g:\tc16\tcc.exe /c start /abovenormal /elevated /pgm magnify
But MAGNIFY.EXE starts with normal priority and you get the UAC prompt.
Later, I can successfully change magnify's priority with the PRIORITY command but ...
(1) this must be done by an elevated TCC
(2) I can't use _STARTPID because TCC doesn't get _STARTPID for a GUI app
A script (big.btm) like this, run elevated, works.
Code:
start magnify.exe
delay 2
priority %@pid[magnify.exe] above
So I suspect the only way you'll get it to work is with a task ...
trigger: logon
command: [path]\tcc.exe
args: /c [path]\big.btm
run with highest privs
If you check "Allow run on demand" you'll be able to test later with SCHTASKS /RUN /TN <taskname>.

Another approach is ...
Make such a task as above with no triggers and use SCHTASKS /RUN /TN <taskname> in your logon script.
 
Similar threads
Thread starter Title Forum Replies Date
S How to? Runs start /w in invisible mode OR run program after exit of another one Support 3
R How to? START program as top window? Support 2
C start /wait /pgm "program name" ^ ketstack n/w Support 3
D Start program without waiting and redirect output Support 6
C start/tab of a GUI program hangs TCMD Support 6
J Take command does not start on Windows 10 Support 3
N for start /b anamoly Support 1
U Can not get/start Take Command gui Support 1
DrusTheAxe START /? is incomplete Support 2
vefatica Start/stop screensaver from TCC? Support 12
S START with title Support 4
vefatica START at 0,0? Support 2
D START /POS versus @WINPOS and @WINSIZE Support 12
vefatica START /elevated and PcaSvc? Support 5
S incorrect message at start Cancel batch job 4START.bat ? (Y/N/A) : Support 1
vefatica START /PGM "name with spaces.URL" fails Support 2
L Peculiarities of how START launches processes Support 15
Peter Murschall v24 IDE/BDEBUGGER won't start Support 9
Dmitry L. Kobyakov WAD Start /pgm "name.htm" works improperly Support 4
Joe Caverly START Dialog usage of %_ variables Support 0
A Fixed [23.0.22]: TCMD crashes shortly after start, TCC keeps running in background Support 6
kb6ojs Want to start TCMD v20 with every Windows 10 bootup Support 3
vefatica START *command Support 5
Per TCC/LE 14 64-bit won't start on Windows 10 Insider Preview 17063 (171213) Support 12
A Fixed (CMD compat) START /D fails to recognize the switch option. Support 3
MikeBaas start /runas - I'd like /netonly Support 2
vefatica Start VIEW with the toolbar showing? Support 5
vefatica Documentation START /AFFINITY Support 0
B how to do in "start" command thing like in tcc.exe Support 1
J directory or folder to start in Support 2
R How to? Not have RT version show on start Support 3
D WAD START /ELEVATED "Title" /PGM "job.btm" Support 6
J How to? Start TCMD with different configurations Support 3
vefatica START /K ... Support 1
vefatica Documentation START /AFFINITY Support 5
vefatica Start TCMD with File Explorer showing? Support 2
Alpengreis WAD Each start/close of TCMD changes my Explorer setting Support 7
WadeHatler Just started getting a message about Cloud Storage every time I start TCC 19 Support 3
Alpengreis Fixed TCMD FileExplorer Start-Directory problem Support 4
vefatica Shortcut/start-up folder nonsense Support 20
fishman@panix.com Can I start TCC in full screen mode? Support 9
R Unable to start any BTM file from Explorer Support 5
fpefpe How to? Stange start up issue Support 1
M Start "/Elevated" failure... Support 3
vefatica START, CMD vs. TCC Support 0
Steve Pitts Difference in exection with and without START Support 24
rjperrella start /tabna leaves blank windows when running batch scripts Support 10
vefatica Start-up directory for new tabs? Support 7
C OT: Registry OPEN verb to start elevated... Support 2
tmaynard Error on Take Command Start after recent update Support 2

Similar threads