Jump to content

tablejumper

Members
  • Posts

    6
  • Joined

  • Last visited

Everything posted by tablejumper

  1. OS: Windows 10 Professional I need to be able to display the computer name and domain\username of a user on their desktop taskbar (not system tray, and not wallpaper) in a large-scale environment. I'd like to script this and deploy via GPO. I'm using the "New Toolbar" option when right-clicking on the taskbar and selecting "Toolbars" and selectin "New toolbar...", and then selecting a folder. The folder's title will become the toolbar itself. However, the folder and its title is generated via the script I wrote which titles out the computer name, domain used, and username logged in upon running the script. So half the work is done. I am trying to use AutoIt to simply open the "New Toolbar - Choose a folder" browse box and selecting the folder to display as a toolbar... but the AutoIt v3 Windows tool cannot ascertain the Title of this browse box or the UI for the taskbar in order to select the folders generated so they may be applied as it should look in the attachment to this post. Here's my script so far, a batch file for generating the folders and their titles correctly: (this will title out the created folder based upon the PC Name, User logged, and Domain used, for every time the script is ran) ======================taskbarinfo=========================== rmdir C:\Apps\"Taskbar Info" /s /q md C:\Apps\"Taskbar Info" md C:\Apps\"Taskbar Info"\ComputerName md C:\Apps\"Taskbar Info"\UserName\ md C:\Apps\"Taskbar Info"\ComputerName\%ComputerName% md C:\Apps\"Taskbar Info"\UserName\%UserName%@%UserDomain% =========================================================== Could someone point out to me the Title of this box so I can use it in the SciTE Script Editor? Once I have the Title, I can run this box and then do the rest of selections easily. Here's what the finished product should look like: Side note: I'm already using BgInfo for wallpaper IT info for each workstation, but I need Computer Name, Domain, and User Name shown where it is always visible; taskbar. If you know of a 3rd party program (and I tried looking for hours) than can simply do this job WITHOUT clicking any buttons, just displaying these 3 details 24/7/365, then I'll happily take up the suggestion. Thank you.
  2. Each item does not need to be parsed however as since the list is alphabetical by default, Adobe Reader XI will show within the first 10 entries, or indexes 0-9. So the loop would have to go through each index number searching for "Adobe Reader XI. I just don't know the function for parsing the text =/
  3. Thanks for the help here, but I can't see in the code where each item in SysListView32 is parsed for the title "Adobe Reader XI" which then should find the required index number to be selected. I can't simply select an item via index number as Adobe Reader XI item is not always index number 2 between multiple computers. So first, the name must be searched via a loop or if or case statement, then index number extrapolated and then plugged into for selection. Then lastly the button pressed. @Earthshine
  4. I'm using SciTE-Lite With just the code I pasted above, I can run it using F5 and the "Set Default Programs" windows pops up, then the 3rd item on the list on the lefthand side is selected. However, I want the specific list item "Adobe Reader XI" to be selected, and not just "Item number 3" listed as Index 2. After that, I just need to script the button press to "Set this program as default" @Earthshine
  5. For months I've been trying to run a script on user login that defaults Adobe Reader 11 as the default viewer for pdf files. The problem is that every time you reboot or login to an account, Windows 10 forces Edge Browser as the default pdf viewer. There is absolutely no fix for this atm. I've tried Group Policy's File Association XML, .bat, .cmd, .vbs, powershell scripts involving reg edits and file type associations using ftype, but no avail. Windows 10 is a mess. The only real way to switch the default pdf viewer during a login session is via the control panel. And so I turn to AutoIt to automate this on every client machine (more than 100) upon their account login to solve this. I'm halfway through the solution with: #include <MsgBoxConstants.au3> #include <GUIListView.au3> Opt("WinTitleMatchMode", 4) run("explorer.exe shell:::{17cd9488-1228-4b2f-88ce-4298e93e0966} -Microsoft.DefaultPrograms\pageDefaultProgram") sleep(4000) $hWnd = ControlGetHandle("Set Default Programs","","SysListView321") ;need a case, if, or loop to go through the first 10 indexes ;and select the index number matching selection text of "Adobe Reader XI" ;example, select 3rd item in the list (index starts with 0) _GUICtrlListView_SetItemSelected($hWnd, 2) ;only the index number matching the required selection text should be selected sleep(1000) ;lines below not working... need to select button "Set this program as default" $hWnd = ControlGetHandle("Set Default Programs","[CLASS:Button; INSTANCE:1]") ControlClick("Button", "&Set this program as default") The script opens up the "Set Default Programs" windows in Control Panel, then handles the selection item box on the left. I'm able to select items based on their index number, however this is not good to use directly it will be different between each computer. Some computers have Adobe Reader 11 as the third, others as the first. Does anyone know what scripting is required to select an item based upon the text it contains? Maybe via a loop, if statement, or case statement which filters the first 10 index numbers and passes a true value or sets the index value to select for the item containing the desired text. That way the correct item is selected. Lastly, I wasn't able to hit the button "Set this program as default". I'm still very new... Thank you so much.
×
×
  • Create New...