Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

run as administrator

Jun
127
2
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?
 
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
 
That's odd. It works as expected for me. Windows 7 x86:

AdminShortcut.PNG
 
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.
 
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}
 
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" %*
 
Joe Caverly and AnrDaemon ... is "Run as administrator" available in your BTM's properties?
 
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" %*
 
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!
 
Code:
    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
[/QUOTE]

Why the line that starts "JP Shell version : " ??
 
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".
 
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
 
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
 
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.

I set it for the right-click menu. Had no idea it also affected the operation of shortcuts!
 
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

Also from RegTweaks. Purely for use by RegTweaks, to avoid replacing a newer version of the debugger with an older version.
 
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?
 
Where's RegTweaks.btm? I've never used it. I got the RUNAS idea from the "batfile" entries.
 
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.
 
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: 272
  • RegTweaks.btm
    25.2 KB · Views: 371
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
 
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
 
Thank you. After sorting the FTP listing by date - why are so many files timed as 12:00:00 AM?

I really don't know. It may be CoreFTP doing that. Files uploaded by TCC have more reasonable time stamps.
 
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?
 
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.
 
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

Back
Top