Workaround: Disable UAC requests temporary

Workaround: Disable UAC requests temporary

Postby karstenschilder » 2009-03-08 14:00

My intention was to disable secure desktop like it the RemoteAssistance of Microsoft it does, while the PCHelpware software is running.

I found no way to get this without reboot (if someone knows how to do, tell me please, I will make a new "workaround" with it). But I found a way to disable the requests completely during PcHelpware is running.

The solution are following RegKeys:

HKLM Software\Microsoft\Windows\CurrentVersion\Policies\System ConsentPromptBehaviorAdmin
HKLM Software\Microsoft\Windows\CurrentVersion\Policies\System ConsentPromptBehaviorUser

My small programm (see beolow) reads the values of this keys and stores them. After that it sets them both to 0, what disables the requests. It starts the PcHelpware Server, waits for exiting and write back the original values, what restores the settings before starting PcHelpWare

I have tested it successfull with Windows Vista and Windows 7 Beta.

How to integrate:

First you need 7-Zip.

Second download http://www.megaupload.com/?d=IHLLG7Q8 and extract it (attention: The file in the archive is called "PcHelpWare.exe". Don't overwrite your server with it).

Open your PcHelpWare server (7-Zip self extracting archive) in 7-Zip and rename the PcHelpWare.exe contained in the archive into PcHelpWareRun.exe.

Drag and Drop the PcHelpWare.exe out of my archive into your server archive and confirm the question.

All done.

I've created this using Nullsoft installer system.

Souce:

Code: Select all
Name "UAC Request Disabler (Temporary) for PcHelpWare"
OutFile "PcHelpWare.exe"
RequestExecutionLevel admin

SilentInstall silent


Section
  ReadRegDWORD $0 HKLM Software\Microsoft\Windows\CurrentVersion\Policies\System AdminBackup
  IfErrors +3 0
    ReadRegDWORD $1 HKLM Software\Microsoft\Windows\CurrentVersion\Policies\System UserBackup
    Goto Repair

  ReadRegDWORD $0 HKLM Software\Microsoft\Windows\CurrentVersion\Policies\System ConsentPromptBehaviorAdmin
  ReadRegDWORD $1 HKLM Software\Microsoft\Windows\CurrentVersion\Policies\System ConsentPromptBehaviorUser

  IfErrors NoUAC
    WriteRegDWORD HKLM Software\Microsoft\Windows\CurrentVersion\Policies\System AdminBackup $0
    WriteRegDWORD HKLM Software\Microsoft\Windows\CurrentVersion\Policies\System UserBackup $1

    Repair:

    WriteRegDWORD HKLM Software\Microsoft\Windows\CurrentVersion\Policies\System ConsentPromptBehaviorAdmin 0
    WriteRegDWORD HKLM Software\Microsoft\Windows\CurrentVersion\Policies\System ConsentPromptBehaviorUser 0

    ExecWait '"PcHelpWareRun.exe"'

    WriteRegDWORD HKLM Software\Microsoft\Windows\CurrentVersion\Policies\System ConsentPromptBehaviorAdmin $0
    WriteRegDWORD HKLM Software\Microsoft\Windows\CurrentVersion\Policies\System ConsentPromptBehaviorUser $1

    DeleteRegValue HKLM Software\Microsoft\Windows\CurrentVersion\Policies\System AdminBackup
    DeleteRegValue HKLM Software\Microsoft\Windows\CurrentVersion\Policies\System UserBackup

    Goto Ende

NoUAC:
  ExecWait '"PcHelpWareRun.exe"'

Ende:
SectionEnd
Last edited by karstenschilder on 2010-02-15 17:03, edited 2 times in total.
karstenschilder
 
Posts: 5
Joined: 2007-05-06 19:39

Re: Workaround: Disable UAC requests temporary

Postby transambird_2000 » 2009-03-23 13:01

Has anyone else gotten this to work? I tried, but haven't had much success. There are mutiple things named pchelpware.exe. Not sure which one i am supposed to rename and replace. Is it after i create my server or before. Is it in the create server folder or the create server/Server folder?
transambird_2000
8
8
 
Posts: 27
Joined: 2009-03-23 12:55

Re: Workaround: Disable UAC requests temporary

Postby karstenschilder » 2009-03-23 13:35

transambird_2000 wrote:Has anyone else gotten this to work? I tried, but haven't had much success. There are mutiple things named pchelpware.exe. Not sure which one i am supposed to rename and replace. Is it after i create my server or before. Is it in the create server folder or the create server/Server folder?


You have to create the server self extracting archive (this one singe file you get by pressing the create button in viewer).

Then you have to open that file in 7zip.

Then you have to rename the PcHelpware.exe to PcHelpWareRun.exe, that is inside the self extracting archive.

After you renamed that file add the UAC Disabler (filename: PCHelpware.exe).
karstenschilder
 
Posts: 5
Joined: 2007-05-06 19:39

Re: Workaround: Disable UAC requests temporary

Postby transambird_2000 » 2009-03-23 18:32

Thanks, Works great :D Exactly what i was looking for.
transambird_2000
8
8
 
Posts: 27
Joined: 2009-03-23 12:55

Re: Workaround: Disable UAC requests temporary

Postby karstenschilder » 2010-02-15 17:04

As Geocities is down, I uploaded the file to megaupload.com
karstenschilder
 
Posts: 5
Joined: 2007-05-06 19:39

Re: Workaround: Disable UAC requests temporary

Postby lama rama » 2010-02-17 08:36

Nice, Works a treat - thanks :-D
lama rama
8
8
 
Posts: 13
Joined: 2009-02-13 11:09

Re: Workaround: Disable UAC requests temporary

Postby afatac » 2010-02-24 16:07

Image

Many of our users who need remote support do not have administrative rights for their computers (Vista OS). Whenever they start running PHW server, they are blocked by the above window.

Can this solution overcome this problem?
afatac
8
8
 
Posts: 17
Joined: 2007-01-30 10:35

Re: Workaround: Disable UAC requests temporary

Postby afatac » 2010-02-27 08:45

Appreciate if someone can kindly answer my question above....
afatac
8
8
 
Posts: 17
Joined: 2007-01-30 10:35

Re: Workaround: Disable UAC requests temporary

Postby cybrguy » 2011-04-10 19:14

This is very helpful for me. I have been frustrated with prompts I couldn't see, requiring someone to be available on the other side.

Thank you. Too bad it won't work for a standard user, but that is understandable.
cybrguy
8
8
 
Posts: 18
Joined: 2007-02-26 19:03

Re: Workaround: Disable UAC requests temporary

Postby Waddz » 2012-03-19 20:18

Hi karstenschilder,

Can you please re-link your download as Megaupload are having some technical difficulties at the moment :)
Waddz
 
Posts: 6
Joined: 2012-03-19 20:13

Re: Workaround: Disable UAC requests temporary

Postby Oliver » 2012-03-20 19:04

If you send me the file I can also upload it on the forum server, for example.
Oliver

How to Report Bugs Effectively
My homepage | WinDirStat
PGP-keys:
  • Forum or UltraVNC-related: 0xA2DD1DBD, E18B 2E2F 4F3E D143 4ED4 3E2B E172 FB55 A2DD 1DBD
  • Other matters: 0x0E88590F, 38B5 5EBA A470 C0F7 0942 81B8 C779 D829 0E88 590F
User avatar
Oliver
Site-Admin
Site-Admin
 
Posts: 565
Joined: 2004-04-21 23:04
Location: Frankfurt am Main

Re: Workaround: Disable UAC requests temporary

Postby bakerkr » 2013-01-18 10:30

Is the file mentioned in the original post still available? If so where? Thanks, Kevin
bakerkr
8
8
 
Posts: 12
Joined: 2009-07-06 21:39

Re: Workaround: Disable UAC requests temporary

Postby bakerkr » 2013-01-18 11:08

Ok.. i figured this out:

Using the supplied code on the original post, I downloaded and install the program (Nullsoft installer system) and created the attached file.

When I originally created my server I renamed it to connect2kevin.exe, so this is the file I opened using 7Zip (I think you can only modify the completed file).

Inside my file I renamed PchelpWare.exe to PcHelpWareRun.exe and then added (drag and dropped) the PcHelpWare.exe into the archive and saved it.

Worked great!!!

**** Ok I don't know how to add an attachment here... will try and get it to the Moderator.. sorry
bakerkr
8
8
 
Posts: 12
Joined: 2009-07-06 21:39

Re: Workaround: Disable UAC requests temporary

Postby SaliesBuzz » 2013-04-01 16:02

:| Which version of Nullsoft did you use?

I have tried all versions from 2.46 back to 2.43 and they seem to create the PcHelpware.exe using BCJLZMA2:16 as the compression method. The resulting self extracting archive fails with "Unsupported Method" at 97% followed by "Unspecified error".
If I remove the Nullsoft PcHelpware.exe and go back to the original pchelpware.exe, the file extracts and runs OK.
I have followed the instructions above and pasted the script into Notepad and saved the Script which is then called in Nullsoft.
Any Ideas?
SaliesBuzz
SaliesBuzz
 
Posts: 5
Joined: 2013-04-01 08:33

Re: Workaround: Disable UAC requests temporary

Postby Dwedit » 2013-05-21 15:30

Since Megaupload has disappeared off the face of the internet, I'd like to request a re-upload of the tool.
Dwedit
 
Posts: 3
Joined: 2013-05-21 15:13

Re: Workaround: Disable UAC requests temporary

Postby Dwedit » 2013-05-21 16:42

I also made a tiny stub program after reading this thread.
Several lines of C# code:
Code: Select all
        static void Main()
        {
            int consentPromptBehaviorAdmin = (int)Registry.GetValue(@"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System", "ConsentPromptBehaviorAdmin", 2);
            int consentPromptBehaviorUser = (int)Registry.GetValue(@"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System", "ConsentPromptBehaviorUser", 1);

            Registry.SetValue(@"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System", "ConsentPromptBehaviorAdmin", 0, RegistryValueKind.DWord);
            Registry.SetValue(@"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System", "ConsentPromptBehaviorUser", 0, RegistryValueKind.DWord);

            var startInfo = new ProcessStartInfo();
            startInfo.FileName = "pchelpware_run.exe";
            var process = Process.Start(startInfo);
            process.WaitForExit();

            Registry.SetValue(@"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System", "ConsentPromptBehaviorAdmin", consentPromptBehaviorAdmin, RegistryValueKind.DWord);
            Registry.SetValue(@"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System", "ConsentPromptBehaviorUser", consentPromptBehaviorUser, RegistryValueKind.DWord);
        }
Dwedit
 
Posts: 3
Joined: 2013-05-21 15:13


Return to PcHelpWare

Who is online

Users browsing this forum: Google [Bot] and 2 guests