AasimPathan Posted February 18, 2019 Share Posted February 18, 2019 Hello everyone, Sorry if the following is a noob question, I am new to AutoIT and was wondering if anyone can guide me in the right direction of automating something across all computers on my network. We use a default profile in our environment including custom File Explorer 'View' option like Details view with (Name, Date Modified, Size, File Type & Path of the file instead of Folder) but in Windows 10 the search does not conform to this standard and is always reset to content view, for some reason or the other when user logs off or the computer restarts. so I would like to use AutoIT to configure these options, I used the AutoIT Recorder to record steps to set the settings and when played back the configuration steps are performed on the same computer but when I try the same on another computer the clicks happen somewhere else entirely and does not work. I am guessing this is due to different monitor sizes etc. So can anyone guide me in the right direction, how do I create the script that does the configuration of View Options on all computers. On a separate note I'd like to know how to do the following. Ctrl+Shift+R >Launch a program Ctrl+Shift+W> launch a explorer shortcut e.g. C:\Windows\ Thanks in advance. Aasim Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted February 18, 2019 Share Posted February 18, 2019 (edited) Hi @AasimPathan, and welcome to the AutoIt forums Maybe, a combination of this, Win* functions, and Send(), could be a possible solution EDIT: This might be helpful too Edited February 18, 2019 by FrancescoDiMuro Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
AasimPathan Posted February 18, 2019 Author Share Posted February 18, 2019 14 minutes ago, FrancescoDiMuro said: Hi @AasimPathan, and welcome to the AutoIt forums Maybe, a combination of this, Win* functions, and Send(), could be a possible solution EDIT: This might be helpful too Hi, Thank you for your response, I've gone through both the links. I think the combinations and shortcuts mentioned to launch View Options would be of great help but I don't think that what I am after, You see to change the View Option that I am looking for I need to go into More and in 'Chose Details' Tab and select 'Path' from the list and unselect folder from that list. Then "Size All Columns to Fit" Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted February 18, 2019 Share Posted February 18, 2019 @AasimPathanThis pearl from @LarsJ could be helpful too Earthshine 1 Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
Dwalfware Posted February 18, 2019 Share Posted February 18, 2019 "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\HideFileExt" Group Policy editor, check what the key is if not then Run on login Link to comment Share on other sites More sharing options...
Dwalfware Posted February 18, 2019 Share Posted February 18, 2019 9 hours ago, Dwalfware said: "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\HideFileExt" Group Policy editor, check what the key is if not then Run on login I like this options, export reg, make changes, open reg export run diff tool , might help but can also kill it so sandox it in a vm or something. https://superuser.com/questions/253249/windows-registry-entries-for-default-explorer-view Link to comment Share on other sites More sharing options...
AasimPathan Posted February 19, 2019 Author Share Posted February 19, 2019 Hi everyone, thank you for responding I am going to post the solution I applied to conform to our standards. Instead of using Mouse clicks I used Keyboard Shortcuts. and it has been working fine. But I sort of have a different issue that I need help with in the same script. You see I've used a MsgBox that says that it will apply the formatting and the user will get 2 options either OK or Cancel. But for some reason, whether the user presses Ok or cancel it still runs the entire script. I want the script to end if pressed cancelled, I know there is a simple solution for this but for some reason i cannot figure it out for the past 1 hour. ;Script created by Aasim Pathan ;Date 2019-02-18 ;Version: 1.0 ;Reference: ; https://www.autoitscript.com/autoit3/docs/functions/Send.htm ; https://www.autoitscript.com/autoit3/docs/functions/Sleep.htm ; https://www.autoitscript.com/autoit3/docs/functions/MsgBox.htm #include <MsgBoxConstants.au3> ApplySearchViewStandards() Func ApplySearchViewStandards() MsgBox($MB_OKCANCEL, "Conform Search Standard in Explorer", "This will apply search standard to your current search view, Please ensure that you are currently in a search result window before clicking on OK,Please do not move your mouse or press any key on the keyboard till the process is complete. Click OK to continue or Cancel to Exit!") Send("{ALT}V") Sleep(1000) Send("L") Sleep(1000) Send("{UP}{RIGHT}{ENTER}") Sleep(1000) Send("{ALT}VA") Sleep(1000) Send("{DOWN}{DOWN}{DOWN}{SPACE}") Sleep(1000) Send("{ALT}VA") Sleep(1000) Send("{UP}{SPACE}") Sleep(1000) Send("path") Sleep(1000) Send("{SPACE}{ENTER}") Sleep(1000) Send("{ALT}VSF") MsgBox(1 , "Conform Search Standard in Explorer", "Explorer formatting applied, Please press OK to exit.") EndFunc Any help would be appreciated. Link to comment Share on other sites More sharing options...
Nine Posted February 19, 2019 Share Posted February 19, 2019 Read help file, it described how to manage the response from the user. You need to define a variable like : Local $UserResponse = MsgBox (.....) “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
careca Posted February 19, 2019 Share Posted February 19, 2019 On 2/18/2019 at 12:43 PM, Dwalfware said: I like this options, export reg, make changes, open reg export run diff tool , might help but can also kill it so sandox it in a vm or something. https://superuser.com/questions/253249/windows-registry-entries-for-default-explorer-view Yes but it seems like the options that the user wants are not stored in registry. I used a registry "live scan tool" Procmon, and change some columns in the folder, got nothing useful. Maybe the only way is by actual interaction with the menus and such. 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...
AasimPathan Posted February 20, 2019 Author Share Posted February 20, 2019 23 hours ago, Nine said: Read help file, it described how to manage the response from the user. You need to define a variable like : Local $UserResponse = MsgBox (.....) Sorry can you provide me an example of this I cannot understand the usecase Link to comment Share on other sites More sharing options...
careca Posted February 20, 2019 Share Posted February 20, 2019 It means you have to give the messagebox a variable. Then the variable will hold the result value, so then the code knows if you pressed one or the other button. $iMsgBoxAnswer = MsgBox(8245, "Startup", "Startup failed! " & @CRLF & "Error Returned: " & @error & @CRLF & "Do you want to retry?") Select Case $iMsgBoxAnswer = 4 ;Retry Init() Case $iMsgBoxAnswer = 7 ;No Exit EndSelect AasimPathan 1 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...
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