StMaSi Posted June 25, 2018 Share Posted June 25, 2018 Good afternoon, all. How would I go about using the RUN function to launch 'start ms-settings:'? Everything I tried leads to some form of macro error after compilation. Thanks in advance. Link to comment Share on other sites More sharing options...
BrewManNH Posted June 25, 2018 Share Posted June 25, 2018 Run(@ComSpec & " /c start ms-settings:") BlackLumiere and StMaSi 2 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 Link to comment Share on other sites More sharing options...
StMaSi Posted June 26, 2018 Author Share Posted June 26, 2018 That worked perfectly! That's about the only combination I didn't try...adding the '/c' as part of the string. Thank you very much!!! Link to comment Share on other sites More sharing options...
StMaSi Posted June 26, 2018 Author Share Posted June 26, 2018 Dang. Spoke too soon. Yes, the script launches and functions properly if I'm launching it on a local desktop, but when I attempt to launch the script on a remote desktop, via PSExec, it appears to run in the background, but never completes. Is there any way to make a compiled AutoIT script function properly, via PSExec, on a remote desktop, without running in the user's current session? The script deals with launching the aforementioned tool, then using the send function to send keystrokes to various sections of said window. Thanks again. Link to comment Share on other sites More sharing options...
BrewManNH Posted June 26, 2018 Share Posted June 26, 2018 Use the command line on the remote PC, sending keystrokes to a remote PC isn't going to work well. 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 Link to comment Share on other sites More sharing options...
StMaSi Posted June 26, 2018 Author Share Posted June 26, 2018 Command line? I didn't realize it was possible to use the "Set Default Programs" features from the command line (thinking that's what you meant). When I launch it from the command line, then I'm trying to send to the window, but of course I can't target it if I can't see it, right? Anyhow, this is what I'm up against when the "Set Default Programs" applet launches locally... - I select the application in question - The applet indicates the application in question has 7 out of 10 defaults - I click the "Set this program as default" option in order to restore all default file and protocol associations After that, everything is restored and working perfectly. Is there a way I can accomplish all that from the command line? I tried using assoc and ftype, but the only way I can get this to work properly and consistently every single time is to utilize the "Set Default Programs" applet. Thanks again. Link to comment Share on other sites More sharing options...
BrewManNH Posted June 26, 2018 Share Posted June 26, 2018 Here's a simple way to associate a file type with an extension from the command line. ftype foofile=%SystemRoot%\system32\NOTEPAD.EXE %1 assco .foo=foofile the first command, ftype, creates a new filetype called foofile and the command used to open that filetype, the second command, assoc, associates files with the .foo extension with the filetype foofile. This has to be done using admin credentials or it will fail. 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 Link to comment Share on other sites More sharing options...
StMaSi Posted June 26, 2018 Author Share Posted June 26, 2018 I can see this as being processed because the icons are flashing really quick (like being refreshed), but the icons don't change. When I double-click the icons, the old app is still opening the files, not the new one just specified. Thanks. Link to comment Share on other sites More sharing options...
BrewManNH Posted June 26, 2018 Share Posted June 26, 2018 That's not AutoIt code, that's the commands you need to execute in the command window (@Comspec). 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 Link to comment Share on other sites More sharing options...
careca Posted July 16, 2018 Share Posted July 16, 2018 No longer works for latest win 10 update, is what i read somewhere. Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe Link to comment Share on other sites More sharing options...
BrewManNH Posted July 16, 2018 Share Posted July 16, 2018 16 hours ago, careca said: No longer works for latest win 10 update, is what i read somewhere. yes it does, you just have to run it as an administrator now unfortunately. 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 Link to comment Share on other sites More sharing options...
lee321987 Posted December 16, 2023 Share Posted December 16, 2023 These two also work: ShellExecute("ms-settings:display") Run("explorer ms-settings:display") Link to comment Share on other sites More sharing options...
argumentum Posted December 16, 2023 Share Posted December 16, 2023 (edited) might as well have a list: https://ss64.com/nt/syntax-settings.html ..or two: https://learn.microsoft.com/en-us/windows/uwp/launch-resume/launch-settings-app Edited December 16, 2023 by argumentum more lee321987 1 Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. 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