RestrictedUser Posted March 7, 2019 Posted March 7, 2019 (edited) Hello AutoIt scriptwriters I want to run script as System Account or Administrator Account on non-access users I had set my server a password when non-access user wants to luanch or install exe files But i want to make my script start automatically on all users even non-access users without asking password for luanching my AutoIt exe script at startup Edited March 7, 2019 by Colduction
Subz Posted March 7, 2019 Posted March 7, 2019 Configure Task Scheduler to run your script on logon as System account or use a GPO Startup Script.
RestrictedUser Posted March 7, 2019 Author Posted March 7, 2019 49 minutes ago, Subz said: Configure Task Scheduler to run your script on logon as System account or use a GPO Startup Script. I know, but i want do these steps by script How can i?
BrewManNH Posted March 7, 2019 Posted March 7, 2019 Compile the script and run it through the task scheduler. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator
Juvigy Posted March 8, 2019 Posted March 8, 2019 Why not just use RunAs ? And put the script in the startup folder....
benched42 Posted March 8, 2019 Posted March 8, 2019 You can do that if you know the Administrator or System password. However, even if you obfuscate the password it could be obtained by a clever user. Who lied and told you life would EVER be fair?
RestrictedUser Posted March 8, 2019 Author Posted March 8, 2019 39 minutes ago, benched42 said: You can do that if you know the Administrator or System password. However, even if you obfuscate the password it could be obtained by a clever user. Yeah, i know the password, but how to do that?
RestrictedUser Posted March 8, 2019 Author Posted March 8, 2019 22 hours ago, BrewManNH said: Compile the script and run it through the task scheduler. No, because some of my users delete these schedules =(
BrewManNH Posted March 8, 2019 Posted March 8, 2019 Do you have access to Group Policy? If you do, you can run it at log on through GP. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator
RestrictedUser Posted March 9, 2019 Author Posted March 9, 2019 9 hours ago, BrewManNH said: Do you have access to Group Policy? If you do, you can run it at log on through GP. Yeah, i have access, but i want to do these by AutoIt Script
BrewManNH Posted March 9, 2019 Posted March 9, 2019 Run the script compiled during log in or boot up or how ever you want the script to run. You can use a batch file to run the executable from within GP. RestrictedUser 1 If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator
benched42 Posted March 12, 2019 Posted March 12, 2019 On 3/8/2019 at 3:39 PM, Colduction said: Yeah, i know the password, but how to do that? Well I tried that at one time by building the admin password one character at a time using the CHR() function. For a password of "Password1" the code I wrote initially was very rudimentary: $theAdminPassword = Chr(80) & Chr(97) & Chr(115) & Chr(115) & Chr(119) & Chr(111) & Chr(114) & Chr(100) & Chr(49) Doesn't do a lot to stop a clever and determined user, but does obfuscate it somewhat. Another way is to put the numbers into a text file and read them line by line to build the admin password. Then you can easily change admin passwords without rewriting code. I wrote something like this later as we changed our admin password: $fHandle = FileOpen({some UNC path to a public file on the network}, 0) $theAdminPassword = "" While 1 FileReadLine($fHandle, $theChar) If @error ExitLoop Endif $theAdminPassword = $theAdminPassword & Chr($theChar) WEnd FileClose($fHandle) RestrictedUser 1 Who lied and told you life would EVER be fair?
caramen Posted March 12, 2019 Posted March 12, 2019 (edited) From what i know in my windows knowledge you can configure an executable to have administration rigth anyway without prompt. You just have to set it one time like that : I apologise for the "circles" 😂😂. Rigth click on the executable and "properties" Left click on "advanced" This is working with all exe & shordcut Edited March 12, 2019 by caramen My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki
Developers Jos Posted March 12, 2019 Developers Posted March 12, 2019 39 minutes ago, caramen said: From what i know in my windows knowledge you can configure an executable to have administration rigth anyway without prompt. Nah... UAC will come up when enabled and rightly so or else we are back in the win95 days with all its security risks. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
caramen Posted March 12, 2019 Posted March 12, 2019 (edited) Yeah anywhere the shield is seen you will have an UAC prompt(I have UAC disabled that's why i have no shield). But it's only when you remove the prompt i guess not when you run the item. I dont know issue with that. If you can learn me that . Edited March 12, 2019 by caramen My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki
RestrictedUser Posted March 12, 2019 Author Posted March 12, 2019 25 minutes ago, caramen said: Yeah anywhere the shield is seen you will have an UAC prompt(I have UAC disabled that's why i have no shield). But it's only when you remove the prompt i guess not when you run the item. I dont know issue with that. If you can learn me that . maybe should use AsInvoker 🤕
AdamUL Posted March 12, 2019 Posted March 12, 2019 To not get the UAC prompt for Admins, without completely turning off UAC. You would want to set the ConsentPromptBehaviorAdmin to 0, which is $UAC_ELEVATE_WITHOUT_PROMPTING. I wrote a UDF for this. This function call would need to be in a different script, run as admin, to set the setting. After that, your scripts with #RequireAdmin or a compiled script with the manifest set to requireAdministrator will run without the UAC prompt. As mentioned in the UDF: "Use this option only in the most constrained environments." #RequireAdmin #include <UAC.au3> _UAC_SetConsentPromptBehaviorAdmin($UAC_ELEVATE_WITHOUT_PROMPTING) Adam RestrictedUser 1
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now