telmob Posted December 4, 2012 Share Posted December 4, 2012 Hello again. I'm (still) making a program to prevent new apps to run, based on Software Restriction Policy. However, when SRP is set, the new apps show a native windows popup saying the file was not found. I know i can hide it when it shows, but is there a way to prevent it from showing or even to change its contents in a 'natural' way? Do i need a DLL for this? Link to comment Share on other sites More sharing options...
water Posted December 4, 2012 Share Posted December 4, 2012 Why do you want to prevent the popup? The user tries to start a program he isn't allowed to and I think he should know so he doesn't try it again. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
telmob Posted December 4, 2012 Author Share Posted December 4, 2012 Because i want to replace it with a custom tray popup in a non-intrusive way. So when the user tries to open any file blocked, instead of having a popup saying the file is missing (which is inaccurate) a simple popup will rise saying an application was prevented from running. Link to comment Share on other sites More sharing options...
water Posted December 4, 2012 Share Posted December 4, 2012 We don't use SRP here. Can you please post a screenshot of such a popup so we know how it looks like? My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
telmob Posted December 4, 2012 Author Share Posted December 4, 2012 Well... i made a mistake. This popup is different from other solutions. But still, i'd like to prevent it from showing. Attached. Link to comment Share on other sites More sharing options...
water Posted December 4, 2012 Share Posted December 4, 2012 Get the ControlID of the "OK" button using the Window Info Tool which comes with AutoIt. Then click away the window: $ControlID = xx While 1 $hWindow = WinWait("", "blocked by group policy") ControlClick($hWindow, "", $ControlID) ; Display your message here WEnd My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
telmob Posted December 4, 2012 Author Share Posted December 4, 2012 (edited) Is this the supposed ControlID? [CLASS:Button: INSTANCE:1] I can't use it, keep getting a syntax error. Edited December 4, 2012 by telmob Link to comment Share on other sites More sharing options...
water Posted December 4, 2012 Share Posted December 4, 2012 How do you use it? Can you post your code? My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
telmob Posted December 4, 2012 Author Share Posted December 4, 2012 Here it is: $ControlID = [CLASS:Button: INSTANCE:1] While 1 $hWindow = WinWait("", "blocked by group policy") ControlClick($hWindow, "", $ControlID) ; Display your message here WEnd Also tried using something simillar to ControlClick example in the help file but couldn't use it as well. Link to comment Share on other sites More sharing options...
water Posted December 4, 2012 Share Posted December 4, 2012 Try: $ControlID = "[CLASS:Button; INSTANCE:1]" While 1 $hWindow = WinWait("", "blocked by group policy") ControlClick($hWindow, "", $ControlID) ; Display your message here WEnd My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
telmob Posted December 4, 2012 Author Share Posted December 4, 2012 Not working. The program keeps running and doesn't recognize the window. I think the problem is lying in the window title, which is variable. Not sure though. $ControlID = "[CLASS:Button; INSTANCE:1]" While 1 $hWindow = WinWait("", "This program is blocked by group policy.") ControlClick($hWindow, "", $ControlID) MsgBox("","","App Blocked") WEnd Link to comment Share on other sites More sharing options...
water Posted December 4, 2012 Share Posted December 4, 2012 If you use the Window Info Tool, select the Summary tab and move the crosshair over the window, do you see the text "This program is blocked by group policy." listed under ">>>> Visible Text <<<<"? My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
telmob Posted December 4, 2012 Author Share Posted December 4, 2012 (edited) No, just 'OK'. Edited December 4, 2012 by telmob Link to comment Share on other sites More sharing options...
telmob Posted December 5, 2012 Author Share Posted December 5, 2012 Any way to 'grab' the popup window without from the 'OK'? I don't to grab all the 'OK' windows or it'll grab a bunch Link to comment Share on other sites More sharing options...
telmob Posted December 8, 2012 Author Share Posted December 8, 2012 I'm sorry to be bumping this thread, but i would really like to have this feature in my app. Is there any way i can prevent this native windows popup from showing? 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