run as administrator

May 20, 2008
11,400
99
Syracuse, NY, USA
One way ... put the EXE name in the target of the shortcut. Then you'll have the "run as admin" option. For example,

Code:
Target: g:\tc22\tcc.exe [/k | /c] [path\]file.btm
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,461
88
Albuquerque, NM
prospero.unm.edu
That's odd. It works as expected for me. Windows 7 x86:

AdminShortcut.PNG
 
Aug 23, 2010
637
9
When I create a shortcut to a *.BTM file, I go into advanced, but it does not let me select "run as administrator". Is there a way around this?
Which page you are trying to change it on? There's two places in shortcut, where you could do it.
On the "Shortcut" tab - to change shortcut properties.
On the "Compatibility" tab - to change properties OF THE PROGRAM ITSELF. This is not possible for documents for obvious reasons.
 
May 20, 2008
11,400
99
Syracuse, NY, USA
That's odd. It works as expected for me. Windows 7 x86:
Not here, also Win 7 x86.
1522532854966.png


I have these. What do you have Charles?
Code:
g:\tc22> regdir /v /d HKCR\.btm
HKCR\.btm
   : REG_SZ : TCC.Batch
  Content Type : REG_SZ : text/plain
  PerceivedType : REG_SZ : text

g:\tc22> regdir /v /d HKCR\tcc.batch
HKCR\tcc.batch
  SHELL
    OPEN
      COMMAND
         : REG_SZ : "G:\tc22\tcc.exe" /c "%1" %*
  shellex
    DropHandler
       : REG_SZ : {86C86720-42A0-1069-A2E8-08002B30309D}
 
Aug 23, 2010
637
9
Code:
regdir /v /d HKCR\.btm
HKCR\.btm
   : REG_SZ : takecommand.script
regdir /v /d HKCR\takecommand.script
HKCR\takecommand.script
   : REG_SZ : JPSoft TakeCommand script (console)
  Shell
    Open
      Command
         : REG_EXPAND_SZ : "C:\Programs\TCC-RT\tcc.exe" /S /C "%1" %*
Win7 Pro SP1 64-bit.
 
Code:
c:\users\jlc\utils>ver

TCC  22.00.40 x64   Windows 7 [Version 6.1.7601]

c:\users\jlc\utils>regdir /v /d HKCR\.btm
HKCR\.btm
   : REG_SZ : TCCRT.Batch

c:\users\jlc\utils>regdir /v /d HKCR\tcc.batch
HKCR\tcc.batch
  SHELL
    OPEN
      COMMAND
         : REG_SZ : "C:\Program Files\JPSoft\TCMD22\tcc.exe" /c "%1" %*

c:\users\jlc\utils>regdir /v /d HKCR\tccrt.batch
HKCR\tccrt.batch
  SHELL
    OPEN
      COMMAND
         : REG_SZ : "C:\Program Files\JPSoft\TCC_RT_22\tcc.exe" /c "%1" %*
 
May 20, 2008
11,400
99
Syracuse, NY, USA
After I added the "Runas" subkey (plus its contents, see below) "Run as administrator" became available in the shortcut's properties.
Code:
v:\> regdir /v /d HKCR\tcc.batch
HKCR\tcc.batch
   : REG_SZ : TCC BTM File
  SHELL
    OPEN
      COMMAND
         : REG_SZ : "G:\tc22\tcc.exe" /c "%1" %*
    Runas
      command
         : REG_SZ : "G:\tc22\tcc.exe" /c "%1" %*
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,461
88
Albuquerque, NM
prospero.unm.edu
Not here, also Win 7 x86.
View attachment 1909

I have these. What do you have Charles?
Code:
g:\tc22> regdir /v /d HKCR\.btm
HKCR\.btm
   : REG_SZ : TCC.Batch
  Content Type : REG_SZ : text/plain
  PerceivedType : REG_SZ : text

g:\tc22> regdir /v /d HKCR\tcc.batch
HKCR\tcc.batch
  SHELL
    OPEN
      COMMAND
         : REG_SZ : "G:\tc22\tcc.exe" /c "%1" %*
  shellex
    DropHandler
       : REG_SZ : {86C86720-42A0-1069-A2E8-08002B30309D}

Code:
C:\>assoc .btm
.btm=btmfile

C:\>regdir /v /d HKCR\btmfile
HKCR\btmfile
   : REG_SZ : Take Command Batch File
  shell
    Debug
       : REG_SZ : Debu&g
      command
         : REG_SZ : "C:\Bin\TCmd19\TCC.EXE" /c bdebugger "%1" %*
        JP shell version : REG_SZ : C:\Bin\TCmd19\TCC.EXE 19.02
    edit
       : REG_SZ : &Edit
      command
         : REG_EXPAND_SZ : %SystemRoot%\System32\NOTEPAD.EXE %1
    open
      command
         : REG_SZ : "C:\Bin\TCmd19\TCC.EXE" /c "%1" %*
    print
       : REG_SZ : &Print
      command
         : REG_EXPAND_SZ : %SystemRoot%\System32\NOTEPAD.EXE /p %1
    Run in Take Command 19
       : REG_SZ : Run in Take Command 19.02 ta&b
      command
         : REG_SZ : "C:\Bin\TCmd19\tcmd.exe" /t "C:\Bin\TCmd19\TCC.EXE" /k "%1"
    Run in TCC 19
       : REG_SZ : Run in &TCC 19.02
      command
         : REG_SZ : "C:\Bin\TCmd19\TCC.EXE" /c "%1" %*
    Run in TCCLE 13
       : REG_SZ : Run in &TCCLE 13.06
      command
         : REG_SZ : "C:\Bin\TCCLE\TCC.EXE" /c "%1" %*
    runas
      command
         : REG_SZ : "C:\Bin\TCmd19\TCC.EXE" /c "%1" %*

C:\>

I guess it's been awhile since I've updated my associations!
 
May 20, 2008
11,400
99
Syracuse, NY, USA
It's the existence of a SHELL\RUNAS key which lets you choose "Run as administrator" in a shortcut to a .BTM. See my previous post.

And you have that key, Charles D. So you could "Run as administrator".
 
Apr 2, 2011
1,441
10
54
North Carolina, USA
Looks like those verbs are from RegTweaks.btm - but I am still unclear about the line the following line:

JP shell version : REG_SZ : C:\Bin\TCmd19\TCC.EXE 19.02
 
May 20, 2008
11,400
99
Syracuse, NY, USA
This command, run elevated by the TCC you want to handle BTMs, works here.

Code:
reg add HKCR\%@assoc[.btm]\SHELL\RUNAS\COMMAND /ve /d "\"%_cmdspec\" /c \"%%1\" %%*"

Here's what it does (before/after).

1522684913408.png
 
Apr 2, 2011
1,441
10
54
North Carolina, USA
Thank you Charles. What is the line number and contents from RegTweaks that generates that line please? The one I have is:

Date/time: 1/5/2016@11:04pm
Size: 25.2 KB (25,852 bytes)

Is that your latest version?
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,461
88
Albuquerque, NM
prospero.unm.edu
Thank you Charles. What is the line number and contents from RegTweaks that generates that line please? The one I have is:

Date/time: 1/5/2016@11:04pm
Size: 25.2 KB (25,852 bytes)

Is that your latest version?

The version I'm looking at is dated 2016-01-26. Don't know whether I ever distributed this one or not.

Which line are you asking about, the "JP shell version" line, or the RunAs line? The former is created by a subroutine called add_debug_verb. RunAs is created just before the Edit and Print verbs.
 
Apr 2, 2011
1,441
10
54
North Carolina, USA
The output from a PDIR of regtweaks. is yours different? If it is - be great to have the updated copy...

Vince, I have it as "prospero.unm.edu\RegTweaks.btm" - i have attached mine at the BTM..... the TXT is for Charles.
 

Attachments

  • RegTweaks.txt
    646 bytes · Views: 114
  • RegTweaks.btm
    25.2 KB · Views: 190
Apr 2, 2011
1,441
10
54
North Carolina, USA
Also from RegTweaks. Purely for use by RegTweaks, to avoid replacing a newer version of the debugger with an older version.

Would you elaborate on this please? you are just setting the value - not testing it ....... at least in my version
 
Apr 2, 2011
1,441
10
54
North Carolina, USA
Thank you. After sorting the FTP listing by date - why are so many files timed as 12:00:00 AM? Looks like you did a lot of trimming on the new RegTweaks... have to look at it more closely
 
Apr 2, 2011
1,441
10
54
North Carolina, USA
Whatever caused it - all files on or before [9/19/2017 12:00:00 AM], no middle files, then files on or after [10/12/2017 10:57:00 AM] are all not midnight or noon. Do you kmnow if you did something different between those dates?
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,461
88
Albuquerque, NM
prospero.unm.edu
Whatever caused it - all files on or before [9/19/2017 12:00:00 AM], no middle files, then files on or after [10/12/2017 10:57:00 AM] are all not midnight or noon. Do you kmnow if you did something different between those dates?

Older files were bulk-copied from an earlier version of Prospero, using CoreFTP or some other free FTP software -- I really don't remember the details. Newer files were uploaded individually, as available, by a TCC batch file.
 
Aug 23, 2010
637
9
Joe Caverly and AnrDaemon ... is "Run as administrator" available in your BTM's properties?
Nice find. Indeed, I have no "run as administrator" on the BTM links. Somehow it did not appear to me, that all the .lnk I was inspecting were direct links to tcc-rt.exe, not to the corresponding BTM.
 
Similar threads
Thread starter Title Forum Replies Date
C How to? run a batch file in administrator mode while debugging in take command software Support 1
Joe Caverly Run As Administrator in TCMD16 Support 3
S Run as Administrator question Support 3
p.f.moore Run as administrator from TCC Support 2
vefatica What limit have I run into? Support 9
S How to? Runs start /w in invisible mode OR run program after exit of another one Support 3
Jay Sage Command Will Not Run Using Short Name of Path Support 5
Peter Murschall BDEBUGGER "Run to Cursor" - where is it ? Support 1
Jay Sage Problem with Context Menu Copy+Paste+Run Key Assignment Support 7
D What does the file "..\Everything\Run history.csv" store? Support 5
dcantor How to? Can 32-bit TCC be run on a system with 64-bit TCMD and TCC installed? Support 6
G tcedit ist not run in tc 24 file explorer Support 10
A Windows 10 This app can't run on your PC Support 2
P Run as Admin tab in non-elevated Take Command session? Support 9
rps Documentation "Copy+Paste+run" question Support 2
Peter Murschall IDE/BDEBUUGER in TCC 22 didn't run Support 7
fpefpe How to? which will run? Support 1
C How to? run a BTM in elevated, inv tcc tab window Support 9
M How to? Run the control panel from a TCC session... Support 2
M How to? Run TCC from Windows Install DVD... Support 2
B Batch file won't run if there is already an instance of TC 17 running Support 9
P MS VS2013 vsdevcmd.bat fails to run with tcmd 17 x64 Support 10
redwdc btm won't run in ver. 17 but works in ver. 16 Support 11
Joe Caverly How to? Run DOS .exe's the same way Wine does... Support 3
tmaynard How to? Any way to run a command in a new tab at startup? Support 18
vefatica Why isn't TCSTART.BTM run? Support 8
M Installed but can't run Take Command 16.0 Support 5
D Run all .CMD batch files with CMD.EXE Support 16
F Sending "Y" to chkdsk to run on C at next reboot Support 25
T tcc /c "[...]" fails when run from third party terminal Support 11
B Select and run lines from Command Input panel? Support 1
Jay Sage Specified INI File Refuses to Run Support 3
A How to? Run a TCC command from external program Support 2
C How to? create a JPSoft BTM menu to run custom custom batch files Support 2
vefatica Coruption after which BTMs won't run Support 7
M How to? Run a command (alias, actually) on a "timed" basis... Support 13
Joe Caverly Copy Paste Run Support 12
S Fixed TCC.EXE 13.03.47 won't run Support 4
Stefano Piccardi run as limited user Support 2
M How to? Windows 7 - run TCC as admin w/o UAC intercept Support 4
E TCC requires elevation to run Support 2
Jay Sage How to Run Non-Elevated From Elevated TCC Support 1
L How can I run tcmd in terminal window only? Support 13
Joe Caverly TCMD12 Beta Expired, TCMD11 will not run Support 7
vefatica Help from IDE fails after a non-debug run Support 5
B TCC doesn't run using another user Support 2
A How to Run the 4NT 8.02 .INI Key Version Support 3
K double click to run btm? Support 2
D TCC won't run telnet on Windows 7 RC1 Support 5
D Can I use TC to run Cygwin? Support 4

Similar threads