Author Topic: [Solved] Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)  (Read 42565 times)

0 Members and 1 Guest are viewing this topic.

Offline Boggin

  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Jul 2014
  • Posts: 10182
  • Location: UK
  • Karma: 122
    • View Profile
Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
« Reply #25 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.

Offline jraju

  • Hero Member
  • *****
  • Join Date: Feb 2013
  • Posts: 2323
  • Location: india
  • Karma: 17
    • View Profile
Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
« Reply #26 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.
The Bottom line is "Check your hardware first if it supports the task you try".

Offline Boggin

  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Jul 2014
  • Posts: 10182
  • Location: UK
  • Karma: 122
    • View Profile
Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
« Reply #27 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.

Offline Shane

  • Administrator
  • Hero Member
  • *****
  • Join Date: Sep 2011
  • Posts: 9281
  • Location: USA
  • Karma: 137
  • "Knowledge should be shared not hidden."
    • View Profile
Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
« Reply #28 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

Offline George

  • Jr. Member
  • **
  • Join Date: Sep 2013
  • Posts: 75
  • Karma: 0
    • View Profile
Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
« Reply #29 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'.

Offline Shane

  • Administrator
  • Hero Member
  • *****
  • Join Date: Sep 2011
  • Posts: 9281
  • Location: USA
  • Karma: 137
  • "Knowledge should be shared not hidden."
    • View Profile
Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
« Reply #30 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

Offline George

  • Jr. Member
  • **
  • Join Date: Sep 2013
  • Posts: 75
  • Karma: 0
    • View Profile
Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
« Reply #31 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:

Offline Shane

  • Administrator
  • Hero Member
  • *****
  • Join Date: Sep 2011
  • Posts: 9281
  • Location: USA
  • Karma: 137
  • "Knowledge should be shared not hidden."
    • View Profile
Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
« Reply #32 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

Offline George

  • Jr. Member
  • **
  • Join Date: Sep 2013
  • Posts: 75
  • Karma: 0
    • View Profile
Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
« Reply #33 on: November 04, 2014, 11:31:48 pm »
Thanks a lot  :cheesy:

Please find enclosed the two exported files.

Offline Shane

  • Administrator
  • Hero Member
  • *****
  • Join Date: Sep 2011
  • Posts: 9281
  • Location: USA
  • Karma: 137
  • "Knowledge should be shared not hidden."
    • View Profile
Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
« Reply #34 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

Offline George

  • Jr. Member
  • **
  • Join Date: Sep 2013
  • Posts: 75
  • Karma: 0
    • View Profile
Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
« Reply #35 on: November 04, 2014, 11:59:12 pm »
In a new admin account I experienced just the same.

Offline Shane

  • Administrator
  • Hero Member
  • *****
  • Join Date: Sep 2011
  • Posts: 9281
  • Location: USA
  • Karma: 137
  • "Knowledge should be shared not hidden."
    • View Profile
Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
« Reply #36 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

Offline Shane

  • Administrator
  • Hero Member
  • *****
  • Join Date: Sep 2011
  • Posts: 9281
  • Location: USA
  • Karma: 137
  • "Knowledge should be shared not hidden."
    • View Profile
Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
« Reply #37 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

Offline George

  • Jr. Member
  • **
  • Join Date: Sep 2013
  • Posts: 75
  • Karma: 0
    • View Profile
Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
« Reply #38 on: November 05, 2014, 12:16:30 am »
I'm sorry it wants more  :sad:
No change by this

Offline Shane

  • Administrator
  • Hero Member
  • *****
  • Join Date: Sep 2011
  • Posts: 9281
  • Location: USA
  • Karma: 137
  • "Knowledge should be shared not hidden."
    • View Profile
Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
« Reply #39 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

Offline George

  • Jr. Member
  • **
  • Join Date: Sep 2013
  • Posts: 75
  • Karma: 0
    • View Profile
Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
« Reply #40 on: November 05, 2014, 12:23:27 am »
I've sent it. If not in your inbox, please check the spam.
« Last Edit: November 06, 2014, 06:28:46 pm by George »

Offline Shane

  • Administrator
  • Hero Member
  • *****
  • Join Date: Sep 2011
  • Posts: 9281
  • Location: USA
  • Karma: 137
  • "Knowledge should be shared not hidden."
    • View Profile
Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
« Reply #41 on: November 05, 2014, 12:24:21 am »
Got it and replied, talk to you soon :-)

Shane

Offline George

  • Jr. Member
  • **
  • Join Date: Sep 2013
  • Posts: 75
  • Karma: 0
    • View Profile
Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
« Reply #42 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:

Offline Shane

  • Administrator
  • Hero Member
  • *****
  • Join Date: Sep 2011
  • Posts: 9281
  • Location: USA
  • Karma: 137
  • "Knowledge should be shared not hidden."
    • View Profile
Re: Shortcuts from start to 'Run as administrator' don't work (Win 8.1 x64)
« Reply #43 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

Offline Boggin

  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Jul 2014
  • Posts: 10182
  • Location: UK
  • Karma: 122
    • View Profile
Good job Shane - perhaps either you or George should delete the post with George's e-mail should he get spammed.

Offline George

  • Jr. Member
  • **
  • Join Date: Sep 2013
  • Posts: 75
  • Karma: 0
    • View Profile
Thank you Boggin for the warning.

Thank you Shane for doing it.

Offline Boggin

  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Jul 2014
  • Posts: 10182
  • Location: UK
  • Karma: 122
    • View Profile
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.