Tweaking.com Support Forums

Main Forum => General Computer Support => Topic started by: George on October 30, 2014, 08:37:10 pm

Title: [Solved] Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
Post by: George on October 30, 2014, 08:37:10 pm
SOLVED

It took much more time and effort than expectable, but Shane wouldn't let it go till identified and solved. Many-many thanks and admiration again.


Re-formulation for clarity (November 3):

1. I type any program name, e.g. cmd, notepad, etc. in the search pane.
a. If I double left-click on it, it starts to run.
b. If I right click, then choose the menu item 'Run as Administrator' nothing happens.

2. I go to any program’s, e.g. cmd, notepad, etc.,  exe file in the respective program folder, and right click, then choose the menu item 'Run as Administrator' it starts to run as administrator.

That is, the issue is with merely the shortcut.

I'm not aware of anything else that can go wrong with a shortcut than its registration. Of course, a. anything may exist beyond my rather limited knowledge; b. even if I'm right in that, I have no idea which registration key to change and how.

I hope for one of these kinds of answers:
1. Oh, it's not registration, go to this place in control panel and change this preference; or: download and run this utility, etc., or
2. Yes, it's registry issue, change this registry key this way.
(end of revision)



If I right click a program (cmd, notepad, etc.) from start or start/search {corrected: and choose 'Run as Administrator'} nothing happens. I can run anything as admin directly from the exe files though.

Added later:

I clicked 'open file location', got to AppData/Roaming/Microsoft/Windows/Start Menu/Programs and experienced the same malfunction. When, however, in case of cmd,  clicked 'open file location' again, I got to the System32 folder, and here I found OK;
i.e., the shortcuts to AppData/Roaming/Microsoft/Windows/Start Menu/Programs seem to be the culprit. Possibly their registration? (end of addition)

sfc/scannow or Dism.exe /Online /Cleanup-Image /Restorehealth don't help and I can't find which option to choose from Tweaking's repair.

Thanks a lot.
Title: Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
Post by: jraju on October 31, 2014, 04:51:14 am
Hi, The shortcuts of cmd and notepad would have been corrupted .
             Delete these short cuts and then create short cuts from the location of the exe folders of these programs. You could right click the properties to know the program path. Or type cmd or notepad in the ORB in the Start menu. Go to the file location, and then create new short cut the exe, by right clicking the said exes and then copy . You will receive an alert that short cut could not be made in that folder and say yes to the desktop folder. Now you try to run these, if these runs, then your problem  is solved
Title: Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
Post by: George on October 31, 2014, 08:22:34 pm
All shortcuts work for normal running, none (from start to any program, not only to cmd and notepad) for elevated. Doesn't it mean a single, mutual issue with delegating administrator's rights to these?
Title: Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
Post by: jraju on October 31, 2014, 11:18:01 pm
Hi, Do you mean the short cut for any program does not work on Run as Administrator, but works in normal condition? Do you want to make them only run as Run as admin? Please clearly tell your issue so that solution flows easily.
Title: Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
Post by: George on October 31, 2014, 11:52:06 pm
Hi,

I'm sorry, I left a few key words: 'If I right click a program (cmd, notepad, etc.) from start or start/search and choose 'Run as Administrator' nothing happens.' (it is noted though in the title of the post)

No other issue, e.g. with double left-click for running as normal.

I don't want to make them run as admin only, I just wish to maintain the choice to run as normal, or when need be, run as admin.

I do have this choice at the exe files (as mentioned initially), but it is also offered at the short cuts in start. Nothing but the failure  of this option is my problem. I only want to make the right-menu point 'Run as Administrator' do so when chosen.
Title: Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
Post by: jraju on November 01, 2014, 03:29:29 am
When you double click the program just press Ctrl and Shift, It will run as administrator. Try this. Is this what you want? If you are having problem in the exe, then this will not work even for normal clicks
Title: Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
Post by: Boggin on November 01, 2014, 03:30:23 am
I'm not sure if either of these articles will help, but each has a performance troubleshooting link which normally checks for broken shortcuts which may reinstate the admin option.

http://www.thewindowsclub.com/reset-windows-store-cache

http://www.thewindowsclub.com/windows-8-apps-troubleshooter

If the icon cache has become corrupt, then this article may help http://www.thewindowsclub.com/rebuild-the-icon-cache-windows
Title: Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
Post by: George on November 01, 2014, 09:03:55 pm
Hi jraju, this happens:
At search cmd:

double left click: runs normal
double left click with ctr+shift: nothing
right click, choose run as admin: nothing

'open file location' (AppData/Roaming/Microsoft/Windows/Start Menu/Programs):
double left click: runs normal
double left click with ctr+shift: runs normal
right click, choose run as admin: nothing

In C:\Windows\System32:
double left click: runs normal
double left click with ctr+shift: runs normal
right click, choose run as admin: runs as admin

I would only like this: At search cmd:
double left click: runs normal
right click, choose run as admin: runs as admin


Hi Boggin,

These articles contain several links, I couldn't find any reference to shortcuts or admin rights though. Which should I try?
Title: Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
Post by: jraju on November 01, 2014, 11:43:32 pm
pl try this
ctrl shift and enter
Title: Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
Post by: George on November 01, 2014, 11:52:48 pm
'open file location' takes me to AppData/Roaming/Microsoft/Windows/Start Menu/Programs.
If, in case of cmd, I click 'open file location' again, I get to the System32 folder, where my problematic point works well. Couldn't we repair the shortcuts to  ....Start Menu/Programs?
Title: Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
Post by: jraju on November 02, 2014, 12:16:54 am
Hi, Did you try crl shift and enter. Just place the cursor on the program icon and then do this. This should work. It has worked for me
Title: Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
Post by: Boggin on November 02, 2014, 01:44:48 am
I'd misunderstood your opening post in thinking it was desktop icons that weren't working but this article explains how to run programs as an admin in Win 8 http://www.intowindows.com/run-program-as-administrator-in-windows-8/ which also suggests CTRL+SHIFT+ENTER for which you may also need to be in Metro.
Title: Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
Post by: George on November 02, 2014, 05:30:35 am
CTRL+SHIFT+ENTER opens the programs as normal, just like simple double click.
Anyway, I can run anything as administrator from the exe files, if no idea to get the right-menu item alive, let's leave it.
Thank you both.
Title: Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
Post by: Boggin on November 02, 2014, 08:49:34 am
CTRL+SHIFT+ENTER opens the programs as normal, just like simple double click.
Anyway, I can run anything as administrator from the exe files, if no idea to get the right-menu item alive, let's leave it.
Thank you both.

Did you read the article I'd linked ?
Title: Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
Post by: George on November 02, 2014, 07:30:03 pm
I had read the article you, Boggin linked. That is about how to run a program as administrator in Windows 8 when everything is working fine.  I can get the right-menu containing 'Run as Administrator' both from start and at the respective exe files. This is supposed to work the same in both cases. In my case it does at the exe, does not from the start menu. My issue is how to make it run in the latter case.

What you quoted from me is, of course, not what is in the article. That's my problem, my system malfunctions.
Title: Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
Post by: jraju on November 02, 2014, 08:58:36 pm
Hi, The "Run as admin" is a property of the executable, not the shortcut. You should add the required manifest that makes Windows prompt for elevation.
                  If you would like to have it in short cut also, you have to make change in the registry. Do you want it?
Title: Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
Post by: George on November 02, 2014, 09:04:51 pm
Yep, jrjau, my uneducated guess from the first instance was that this is a registry issue. The shortcut should be registered to contain this function but for some reason it's been lost. If you know how to fix it, please tell me. (As I mentioned, it's for all shortcuts, not for cmd only.)
Title: Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
Post by: Boggin on November 03, 2014, 01:18:05 am
Have you tried running sfc /scannow in Safe Mode ?
Title: Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
Post by: jraju on November 03, 2014, 02:25:14 am
Hi, Boggins, George wants the available exes aside from windows protected exe, to open as admin only from the shortcut.
                       
Title: Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
Post by: Boggin on November 03, 2014, 03:17:32 am
Hi, Boggins, George wants the available exes aside from windows protected exe, to open as admin only from the shortcut.
                     

Ah, thought he just wanted the option to run as an admin.

The Safe Mode sfc /scannow could still reinstate whatever is causing the problem.
Title: Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
Post by: George on November 03, 2014, 05:38:03 am
I presumed the problem was simple, only the solution could be sophisticated. In case I'm wrong:

1. I type any program name, e.g. cmd, notepad, etc. in the search pane.
a. If I double left-click on it, it starts to run.
b. If I right click, then choose the menu item 'Run as Administrator' nothing happens.

2. I go to any program's, e.g. cmd, notepad, etc.,  exe file in the respective program folder, and right click, then choose the menu item 'Run as Administrator' it starts to run as administrator.

That is, the issue is with merely the shortcut.

I'm not aware of anything else that can go wrong with a shortcut than its registration. Of course, a. anything may exist beyond my rather limited knowledge; b. even if I'm right in that, I have no idea which registration key to change and how.

I hope for one of these kinds of answers:
1. Oh, it's not registration, go to this place in control panel and change this preference; or: download and run this utility, etc., or
2. Yes, it's registry issue, change this register key this way.
Title: Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
Post by: Boggin on November 03, 2014, 09:12:38 am
Creating a new admin account may do it, but if not then you're probably looking at least a Refresh http://www.thewindowsclub.com/lost-administrative-rights-in-windows
Title: Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
Post by: George on November 03, 2014, 06:29:40 pm

2. I go to any program's, e.g. cmd, notepad, etc.,  exe file in the respective program folder, and right click, then choose the menu item 'Run as Administrator' it starts to run as administrator.

That is, the issue is with merely the shortcut.


I did not loose administrator's rights.

Anyway, I can run anything as administrator from the exe files, if no idea to get the right-menu item alive, let's leave it.
Thank you.
Title: Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
Post by: jraju on November 03, 2014, 07:13:50 pm
Hi, George,
                       Shall I suggest that you could easily run the programs only on administation? I presume that you do not want to run as standard some of the programs.
                           If you want to assign admin right to particular programs, then you could well to go to the properties of the short cut of the program, by right clicking it, and then go to advanced mode and click Run as Administrator box, Now you will see a blue window admin symbol in the short cut of the program. Likewise, you could select the shortcuts of those programs and do the same. Is this what you want? This may be the solution, but there is no  shortcut for applying all the programs as admin.
Title: Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
Post by: George on November 03, 2014, 07:23:54 pm
Hi jraju,

The shortcuts to run any program from the start menu either as normal or admin is a simple service in windows. I lost the half of it, hoped to get it back easily. If not, I can go to the exe files, when I want to run them as admin, and do so there. A bit inconvenient but no big deal. Let's leave it at that.
Thank you.
Title: Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
Post by: Boggin on November 04, 2014, 02:35:50 am
Hi, George,
                       Shall I suggest that you could easily run the programs only on administation? I presume that you do not want to run as standard some of the programs.
                           If you want to assign admin right to particular programs, then you could well to go to the properties of the short cut of the program, by right clicking it, and then go to advanced mode and click Run as Administrator box, Now you will see a blue window admin symbol in the short cut of the program. Likewise, you could select the shortcuts of those programs and do the same. Is this what you want? This may be the solution, but there is no  shortcut for applying all the programs as admin.

You can't run Windows programs permanently as a admin - only as a one off which is probably for security reasons.

The only one that you can leave on permanently is the hidden admin account and is why MS advise disabling when done because of that reason.

Having to dig out the .exe to run programs as an admin would annoy the hell out of me and I would have run the Refresh option by now as I like things to run as intended.
Title: Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
Post by: jraju on November 04, 2014, 02:56:44 am
Hi, I only mean other programs. Because, it is restricted by microsoft. Please in else where in replies to this thread, i specifically pointed. I will try registry edit in due course.
Title: Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
Post by: Boggin on November 04, 2014, 03:07:36 am
Hi, I only mean other programs. Because, it is restricted by microsoft. Please in else where in replies to this thread, i specifically pointed. I will try registry edit in due course.

Don't forget to create a restore point or export that file/folder before making any changes.
Title: Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
Post by: Shane on November 04, 2014, 11:40:22 am
I am back to work now, sorry for the long delay as I had to take care of the family.

Just answered a lot of posts and this thread is 2 pages long so I just scanned through it, so sorry if I ask a question that is already answered.

But first thing is what level do you have the UAC set at currently? If the dial all the way down? If not what one is it set at?

Shane
Title: Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
Post by: George on November 04, 2014, 07:18:26 pm
Hi Shane, great to have you back. No need for apology, you're doing a massive favor nurturing us, outsiders here. "Alas" you also have others to take care of.

The UAC is at the second notch from the top 'Don't notify me when I make changes to Windows settings'.
Title: Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
Post by: Shane on November 04, 2014, 10:47:49 pm
Thanks :-)

It is good to be back working. Been a long past 8 days.

Ok as for the UAC, A while back I made a bat file for a user where he added the bat file to the right click send to menu, and he could send a file to the bat file and it would put a check on the compatibility page for it to always run it as an administrator.

That information is stored in the registry, so we should check there as if there is a registry key that is set for say all shortcut .lnk files that could explain what is happening, windows is following what ever rule is set in the registry and not asking for the administrator permissions. But when you run a exe directly it does.

So this ws the bat file code here
Code: [Select]
@echo off
setlocal enableDelayedExpansion
:::::::::::::::::::::::::::::::::::::::::
:: Automatically check & get admin rights
:::::::::::::::::::::::::::::::::::::::::

:checkPrivileges
NET FILE 1>NUL 2>NUL
if '%errorlevel%' == '0' ( goto gotPrivileges ) else ( goto getPrivileges )

:getPrivileges
ECHO.
ECHO **************************************
ECHO Invoking UAC for Privilege Escalation
ECHO **************************************

setlocal DisableDelayedExpansion
set "batchPath=%~0"
setlocal EnableDelayedExpansion
ECHO Set UAC = CreateObject^("Shell.Application"^) > "%temp%\OEgetPrivileges.vbs"
ECHO UAC.ShellExecute "!batchPath!", "%*", "", "runas", 1 >> "%temp%\OEgetPrivileges.vbs"
"%temp%\OEgetPrivileges.vbs"
exit /B

:gotPrivileges
::::::::::::::::::::::::::::
:START
::::::::::::::::::::::::::::

@echo off
setlocal ENABLEDELAYEDEXPANSION
rem Take the cmd-line, remove all until the first parameter
set "params=!cmdcmdline:~0,-1!"
set "params=!params:*" =!"
set count=0

rem Split the parameters on spaces but respect the quotes
for %%G IN (!params!) do (
  set /a count+=1
  set "item_!count!=%%~G"
  rem echo !count! %%~G
)

rem list the parameters
for /L %%n in (1,1,!count!) DO (
set "strexe=!item_%%n!"
set "strexe=!strexe:~-3!"

IF /I ["!strexe!"] EQU ["exe"] reg add "HKCU\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags" /f
IF /I ["!strexe!"] EQU ["exe"] reg add "HKCU\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /f
IF /I ["!strexe!"] EQU ["exe"] reg add "HKCU\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /v "!item_%%n!" /t REG_SZ /d "RUNASADMIN" /f

IF /I ["!strexe!"] EQU [".ex"] reg add "HKCU\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags" /f
IF /I ["!strexe!"] EQU [".ex"] reg add "HKCU\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /f
IF /I ["!strexe!"] EQU [".ex"] reg add "HKCU\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /v "!item_%%n!e" /t REG_SZ /d "RUNASADMIN" /f

)

exit

In that code you will see the registry location where the info is set.
IF /I ["!strexe!"] EQU ["exe"] reg add "HKCU\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags" /f
IF /I ["!strexe!"] EQU ["exe"] reg add "HKCU\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /f
IF /I ["!strexe!"] EQU ["exe"] reg add "HKCU\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /v "!item_%%n!" /t REG_SZ /d "RUNASADMIN" /f

Go to that location in the registry and let me know if you have anything there, if you do, export it out to a file and post it for me so I can look it over. :wink:

Shane
Title: Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
Post by: George on November 04, 2014, 11:11:04 pm
I'm sorry, I must be even dumber than I look.

'In that code you will see the registry location where the info is set.' I can't, where is it?  :shocked:

'Go to that location in the registry and let me know if you have anything there, if you do, export it out to a file and post it for me so I can look it over.'  I can only back up the whole registry, how to export out a part of it?  :confused:
Title: Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
Post by: Shane on November 04, 2014, 11:14:02 pm
No worries :-)

Quote
HKCU\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags

So HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags
Right click on the section and you will have a export option.

Go ahead and check another location as well, HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags
And export that out as well.

HKEY_CURRENT_USER is the current logged in user registry location while HKEY_LOCAL_MACHINE is the system wide registry location. So I like to check both locations.

Shane
Title: Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
Post by: George on November 04, 2014, 11:31:48 pm
Thanks a lot  :cheesy:

Please find enclosed the two exported files.
Title: Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
Post by: Shane on November 04, 2014, 11:35:46 pm
Great :-)

I am pulling a late night working on the windows repair toolbox, so I will be on for a while. While I look these over I want you to do one more test for me. This test will tell me if the problem is on the system side or current profile.

Create a new user account on the system and log into that account and see if you have the same problem. If you do then I know it is on the system side, if it works on the new account then I know it is on the current user side :wink:

Shane
Title: Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
Post by: George on November 04, 2014, 11:59:12 pm
In a new admin account I experienced just the same.
Title: Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
Post by: Shane on November 05, 2014, 12:00:58 am
Ok good, that tells me where to look.

I am currently putting together a reg file to have you try, I am tracking down all the default keys needed and used for the uac, and if this reg file does the trick then I think it is time to add a repair uac to the windows repair program :-)

I will have the reg file for you here shortly, I will have you do a registry backup first to be safe, then apply the reg file and reboot. Be back in a few.

Shane
Title: Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
Post by: Shane on November 05, 2014, 12:03:48 am
OK here is what I got so far, lets see how it does, if it doesnt fix it I will keep looking to see if there is more registry keys.

Do a registry backup just to be safe, apply this reg file and then reboot.

Shane
Title: Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
Post by: George on November 05, 2014, 12:16:30 am
I'm sorry it wants more  :sad:
No change by this
Title: Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
Post by: Shane on November 05, 2014, 12:17:43 am
OK, now I am curious.

Send me an email, shane at tweaking.com and I will teamviewer in and take a look with you :-)

Shane
Title: Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
Post by: George on November 05, 2014, 12:23:27 am
I've sent it. If not in your inbox, please check the spam.
Title: Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
Post by: Shane on November 05, 2014, 12:24:21 am
Got it and replied, talk to you soon :-)

Shane
Title: Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
Post by: George on November 05, 2014, 02:09:28 am
So, it seemed a simple problem, a faulty registry key, but it lay far from that. Thank you so very much Shane to have moved all stones till finding and fixing it.  :cheesy:
Title: Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
Post by: Shane on November 05, 2014, 02:24:27 am
Glad to help.

For others who have the same problem, it wasnt a UAC problem. It turned out to be one of the context menu handlers (He had a lot of them!) that was installed by a 3rd party program (Context menu handler is a menu item when you right click on a file or shortcut). I removed them all and it started working just fine. Given how many there was we didnt take the time to try one at a time to find out which did it.

Shane
Title: Re: [Solved] Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
Post by: Boggin on November 05, 2014, 08:13:28 am
Good job Shane - perhaps either you or George should delete the post with George's e-mail should he get spammed.
Title: Re: [Solved] Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
Post by: George on November 05, 2014, 07:06:10 pm
Thank you Boggin for the warning.

Thank you Shane for doing it.
Title: Re: [Solved] Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
Post by: Boggin on November 06, 2014, 08:26:14 am
Thank you Boggin for the warning.

Thank you Shane for doing it.

It's best not to post personal details in an open forum and Shane will have been able to get your e-mail address from your e-mail.