Jump to content
Sign in to follow this  
muybelgium

AUC elevation of priviledge cause standart output to go to an other Window

Recommended Posts

muybelgium

Hello, 

I want to make an administration script which enable some administrative task.  This script output some usefull logs saying what have been done.  

Problem, when higher priviledges are aimed, a new windows is open and closed immediatly.  So my precious output cannot be read.

Is it possible to make the application outputs to the same windows as the caller while requesting #RequireAdmin or higher priviledges available ?

Thank you for your help.

PS: Please, if you think of turning off this stupid UAC.  I know how to do this.

Share this post


Link to post
Share on other sites
Spider001

try this

Global $keyname = 'HKLMSoftwareMicrosoftWindowsCurrentVersionPoliciesSystem'
Global $valuename0 = 'ConsentPromptBehaviorAdmin'
Global $valuename1 = 'PromptOnSecureDesktop'

original

"REG_DWORD", 5
 "REG_DWORD", 1

change

 "REG_DWORD", 0
 "REG_DWORD", 0

Share this post


Link to post
Share on other sites
water

Using "#RequireAdmin" means that a new process is being started.

It depends on your code what needs to be done to keep the output window open or to write everything to a single window.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
water

BTW: I do not think deactivating a security measure is a good idea. MS ipmplemented them for a very good reason!


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
Spider001

you don't deactivate it with this key's you only disable the warnings after you done what you must done you can set then original again.

well it's almost the same i use it all the time and if you now what you'r doing then you have no problem.

Share this post


Link to post
Share on other sites
water

... if you now what you'r doing then you have no problem.

That's a prerequisite: When working with computers and modifying security measures you should always know what you do! But how many people actually do ;)

  • Like 1

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×