RestrictedUser Posted June 9, 2019 Share Posted June 9, 2019 (edited) Hi AutoIt Scriptwriters! How can i set login information while running and existed service? Is there any UDF or API Function for Log On tab of this Area? I want to set "This account" and Enter my favorite user Without doing MouseClick and Macro Edited June 9, 2019 by Colduction Link to comment Share on other sites More sharing options...
water Posted June 9, 2019 Share Posted June 9, 2019 Never used it myself, but this Service UDF might solve your issue. RestrictedUser 1 My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
TheXman Posted June 9, 2019 Share Posted June 9, 2019 You can use the SC.exe command. If the service already exists, then the "SC Config ..." command will allow you to modify the account name and password. Type "SC Config" in a CMD console or Google the SC command for more information. RestrictedUser and Earthshine 1 1 CryptoNG UDF: Cryptography API: Next Gen jq UDF: Powerful and Flexible JSON Processor | jqPlayground: An Interactive JSON Processor Xml2Json UDF: Transform XML to JSON | HttpApi UDF: HTTP Server API | Roku Remote: Example Script About Me How To Ask Good Questions On Technical And Scientific Forums (Detailed) | How to Ask Good Technical Questions (Brief) "Any fool can know. The point is to understand." -Albert Einstein "If you think you're a big fish, it's probably because you only swim in small ponds." ~TheXman Link to comment Share on other sites More sharing options...
Earthshine Posted June 9, 2019 Share Posted June 9, 2019 yes, SC is awesome. built right into windows. you can create or modify using it as mentioned above. I second that suggestion. RestrictedUser 1 My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
RestrictedUser Posted June 9, 2019 Author Share Posted June 9, 2019 1 hour ago, TheXman said: You can use the SC.exe command. I knew this, but i should find API for speedy work I'm waiting for your best choices and reply Link to comment Share on other sites More sharing options...
RestrictedUser Posted June 9, 2019 Author Share Posted June 9, 2019 1 hour ago, water said: this Service UDF might solve your issue. Hmm, that was old topic but thanks bro! Is there any Windows API for doing this action? I want make my script speedy, Speed and Time is important for me Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted June 10, 2019 Moderators Share Posted June 10, 2019 18 hours ago, Colduction said: I want make my script speedy SC is quite speedy, and it is a part of Windows for a reason. Why would you not use it? Earthshine 1 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Earthshine Posted June 10, 2019 Share Posted June 10, 2019 that is what I was going to say... beaten to it. SC is really quick and super easy to use. My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
RestrictedUser Posted June 11, 2019 Author Share Posted June 11, 2019 (edited) 23 hours ago, JLogan3o13 said: Why would you not use it? Because i want set over 100 services in less time Is there any thing faster than SC? Edited June 11, 2019 by Colduction Link to comment Share on other sites More sharing options...
Developers Jos Posted June 11, 2019 Developers Share Posted June 11, 2019 17 minutes ago, Colduction said: Because i want set over 100 services in less time because? 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. Link to comment Share on other sites More sharing options...
Earthshine Posted June 11, 2019 Share Posted June 11, 2019 who runs over 100 services? My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted June 11, 2019 Moderators Share Posted June 11, 2019 10 hours ago, Colduction said: Is there any thing faster than SC? C++ - oh, wait, that is what SC.exe is written in... Straight machine code - good luck with that. Earthshine 1 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
spudw2k Posted June 12, 2019 Share Posted June 12, 2019 (edited) I think the performance using DLL API calls compared to using sc.exe will be negligible. If you'd really prefer to do the API calls yourself, the Service UDF has three of the DLL calls you'll need--OpenSCManager, OpenService and CloseServiceHandle--but I don't see a function in the UDF for ChangeServiceConfig, so you'l have to create that one. You can look at my example here for another DLL call (ChangeServiceConfig2) to give you an idea on how to "code" it, and this MSDN example is a good resource. Let us know where you get stuck. Edited June 12, 2019 by spudw2k added more important info Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
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