WildByDesign Posted 18 hours ago Posted 18 hours ago I have an AutoIt script that runs at high integrity level (elevated) that contains it's own function to basically use _WinAPI_ShowWindow to change its GUI window visibility. The changing of the window visibility is done by clicking on its system tray icon. I have another AutoIt script that runs at Medium IL (unelevated). Since it is at a lower integrity level than the first script, I cannot use _WinAPI_ShowWindow within this process to change the visibility of the GUI window in the elevated script. Possibilities: Register a hotkey in the elevated script that would run the function within it. Simulate the hotkey presses in the unelevated script to run the function in the elevated script. Simulate the clicking on the system tray icon (however user may have tray icon hidden) but likely not a good option IPC Maybe more possibilities that I cannot think of? The IPC stuff is an area that I am still very unfamiliar with. Particularly going from Medium IL to High IL (unelevated to elevated). However, I would imagine that IPC is likely the better option. What would be the best way for the unelevated script to run a function from within the elevated script? Keep in mind that the elevated script is running at all times in the background and has a system tray icon. It has a GUI which is basically what hides and shows based on the following function within the elevated script: Func idGUI() ; get GUI window state and show GUI window when clicking on tray icon If Not BitAND(WinGetState($hGUI), $WIN_STATE_VISIBLE) Then _WinAPI_ShowWindow($hGUI, @SW_SHOW) _WinAPI_SetForegroundWindow($hGUI) EndFunc Well, that function shows the GUI. The GUI is hidden to the system tray when the user closes the GUI. Thank you for your time. I appreciate it very much.
Solution Nine Posted 18 hours ago Solution Posted 18 hours ago Look at my Fast and simple WCD IPC. It is working well between processes with different levels of privilege. WildByDesign 1 “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) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
WildByDesign Posted 18 hours ago Author Posted 18 hours ago 16 minutes ago, Nine said: Look at my Fast and simple WCD IPC. Thank you, I will check this out for sure. I wont be able to thoroughly test and integrate this into my script until later in the evening. So I will respond more about whether or not this works well for my situation later in the day.
WildByDesign Posted 8 hours ago Author Posted 8 hours ago (edited) @Nine I was doing some testing with your WCD IPC UDF and I was very impressed with it. It really is quite simple yet such a genius idea and very efficient as well. Testing with your scripts worked perfectly. But it didn't work when I integrated it into my script. Is it possible that it didn't work with my script because my script is already a GUI script? I checked with System Informer and there wasn't a window titled "WCDServer". It would've shown there whether it was hidden or not. EDIT: I figured out the problem. I was using _WinAPI_SetWindowText to set the title for the AutoIt window specifically but it was changing the title from "WCDServer" to the other title that I was using previously. This is something that I can work around. Your UDF is the perfect solution to my problem. Thank you. Edited 7 hours ago by WildByDesign Nine 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