How do I run tc apps as admin from the Startmenu?
Moderators: white, Hacker, petermad, Stefan2
How do I run tc apps as admin from the Startmenu?
In the start menu, there's an option for running an editor like Notepad or NPP++ but with a file so that it opens that text file, but with that editor.
Now, how do I do that, while running the editor As An Administrator?
My goal is to edit the hosts file, and the only way to do that is to Run As An Administrator, but when I do that via the Start menu in the normal way, it's not Ran As An Administrator ...
Now, how do I do that, while running the editor As An Administrator?
My goal is to edit the hosts file, and the only way to do that is to Run As An Administrator, but when I do that via the Start menu in the normal way, it's not Ran As An Administrator ...
Prefix the command field with an asterisk (*), so you get for example This works in TC's starter menu and on the button bar. On the latter, you can also right-click any button (that doesn't use a cm_ command) and select "As Administrator".
Regards
Dalai
Code: Select all
*notepad++.exe
Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
it kinda worked but
Caveats:
1.
So, it turns out that the asterisk needs to be in front of the full path not just the filename, which might be obvious to you but it wasn't immediately obvious to me:
So:
*C\Windows\notepad.exe
not
C\Windows\*notepad.exe
2.
If I use the same thing on the button (*C\Windows\notepad.exe, but not
not C\Windows\notepad.exe) , I don't need to right-click and select "As Administrator".
This is the fastest way of doing it, but it'll take space on the toolbar.
3.
Not sure if the two asterisks, above the 8 and on the NumBlock will both do the trick
In general, thanks, it worked.
1.
So, it turns out that the asterisk needs to be in front of the full path not just the filename, which might be obvious to you but it wasn't immediately obvious to me:
So:
*C\Windows\notepad.exe
not
C\Windows\*notepad.exe
2.
If I use the same thing on the button (*C\Windows\notepad.exe, but not
not C\Windows\notepad.exe) , I don't need to right-click and select "As Administrator".
This is the fastest way of doing it, but it'll take space on the toolbar.
3.
Not sure if the two asterisks, above the 8 and on the NumBlock will both do the trick
In general, thanks, it worked.
Re: it kinda worked but
That's why I wrote "prefix the command line". The whole thing is also described in TC's help, in the section that is opened when pressing F1 in the appropriate dialog/window. Unfortunately, Ghisler forgot to add this to the help section describing the TC start menu...brian wrote:So, it turns out that the asterisk needs to be in front of the full path not just the filename [...]
Yes, I forgot to mention that.If I use the same thing on the button (*C\Windows\notepad.exe, but not
not C\Windows\notepad.exe) , I don't need to right-click and select "As Administrator".
If you're not sure that both keys (or key combinations) will result in the same character: they do.Not sure if the two asterisks, above the 8 and on the NumBlock will both do the trick
Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
brian wrote:it turns out that the asterisk needs to be in front of the full path not just the filename
*C\Windows\notepad.exe
Yes, it seems that this important information is missing in a Help file.Dalai wrote:Unfortunately, Ghisler forgot to add this to the help section describing the TC start menu...
It's interesting that "As Administrator" menu is available for short commands (without path) like cmd, control or explorer.
However, TC won't start control/control.exe and explorer/explorer.exe as Administrator either using the asterisk and full path to their executables or this "As Administrator" context menu item (can be checked by starting a %COMSPEC% from Explorer's address bar). This is also true for RunDll32.exe shell32.dll,Control_RunDLL command, even with full path. Since the elavated cmd.exe also won't start mentioned commands as Administrator, it seems that it should be a normal behaviour.
If anyone still need to start Explorer command as Administrator, some parameter to explorer or explorer.exe (with full path if * used) must be added, like /n or , (also on Windows 7 and newer user has to enable the possibility to start the Explorer as Administrator using Registry). To start elevated Control panel, the command [*%windir%\system32\]explorer.exe ::{21ec2020-3aea-1069-a2dd-08002b30309d} may be used.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
Ukraine's National Bank special bank account:
UA843000010000000047330992708
- gunterotto
- Junior Member
- Posts: 17
- Joined: 2012-05-29, 05:03 UTC
Have these simple rules changed since TC 9.1 and/or W10 Fall Creators Update? I have a simple batch file (that used to work) which basically does Powercfg /batteryreport and moves the log file for me. I now get this error when I call the .bat from Start Menu with an *:
The Power Efficiency Diagnostic library (energy.dll) could not be loaded.
The system cannot find the file specified.
The batch file works fine when run via CMD (Admin) but, as I said, it used to work via TC Start Menu. Not anymore. I also have another batch file which does SFC /scannow and moves the log file; it also used to work and does not anymore. Ideas? Thx.
The Power Efficiency Diagnostic library (energy.dll) could not be loaded.
The system cannot find the file specified.
The batch file works fine when run via CMD (Admin) but, as I said, it used to work via TC Start Menu. Not anymore. I also have another batch file which does SFC /scannow and moves the log file; it also used to work and does not anymore. Ideas? Thx.
2gunterotto
How exactly does your button/start menu entry look like? Which Windows and TC do you use exactly (architecture)?
Regards
Dalai
How exactly does your button/start menu entry look like? Which Windows and TC do you use exactly (architecture)?
Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
- gunterotto
- Junior Member
- Posts: 17
- Joined: 2012-05-29, 05:03 UTC
Thanks for the quick response! My architecture has not changed (Surface Pro 4, 64-bit TC, Windows 10), other than updating to the Fall Creators Update (in Dec) and to TC 9.12 (also Dec). One of those two updates likely caused what used to work, to not work anymore.Dalai wrote:2gunterotto
How exactly does your button/start menu entry look like? Which Windows and TC do you use exactly (architecture)?
The .bat file is a simple run of Powercfg, ditto for SFC. The TC Start Menu entry does not have any parameters or start path, only this Command:
*C:\Users\xxxx\OneDrive\zzzzzzzz\yyyyyy\!CHECK_System_Files.BAT