Jump to content

Disable mouse and keyboard not working for Windows 10


Recommended Posts

Hello all. I created a script to uninstall Symantec from our environment and I placed the "BlockInput(1)" command in the beginning of the script so that end users would not be able to move the mouse or keyboard to disrupt the mouse clicks.

During testing we found that this worked for our Windows 7 machines, but for our windows 10 machines the mouse disable did not work can anyone shed some light on why this is? 

Here is my code:

image.png.32e6a025563be53fa96519057c735c84.png

 

Edited by stayready40
Link to comment
Share on other sites

Hey hello there! :)

 

Maybe you can try :

BlockInput($BI_DISABLE)
BlockInput($BI_ENABLE)

 

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to comment
Share on other sites

can't you silent uninstall it from the command line? easier to automate. they won't know it's going on

looks like you can

 

https://support.symantec.com/en_US/article.TECH105827.html

 

standard msi stuff. find it's product code (guid) and use it in the command line for msiexec

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Link to comment
Share on other sites

14 minutes ago, Earthshine said:

can't you silent uninstall it from the command line? easier to automate. they won't know it's going on

looks like you can

 

https://support.symantec.com/en_US/article.TECH105827.html

 

standard msi stuff. find it's product code (guid) and use it in the command line for msiexec

Thanks for youe response I am aware of this process from symantec but we have had issues with the symantec uninstalls killing the NIC's on several different machines and those machines having to be reimaged to fix the issue , but we dont have this issue when we uninstall from cleanwipe. 

Link to comment
Share on other sites

What do you tryed to solve that issue mate ?

I dont give you the answer when i know it to learn you how to script with autoIT

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to comment
Share on other sites

You probably need to run it as admin for it to work in Win10. If that's not possible, then don't use MouseClick, use ControlClick.

Also, in the future, unless you're doing image editing, don't post screenshots of your code, use the "<>" button in the reply editor and post the actual textual code.

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 Gude
How 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

34 minutes ago, BrewManNH said:

You probably need to run it as admin for it to work in Win10. If that's not possible, then don't use MouseClick, use ControlClick.

Also, in the future, unless you're doing image editing, don't post screenshots of your code, use the "<>" button in the reply editor and post the actual textual code.

Sry it's not the problem. No need rights to BlockInputs :)

I mean the problem is the error message actualy

Edited by caramen

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to comment
Share on other sites

I got the answer. Just let him find the solution about the error message. I am sure he can figure out what is going wrong. By using something everyone use when learning a Function/Command

Edit: Just click on the blue blockInput :) and Read "Constants are defined in "AutoItConstants.au3".

BlockInput

 

Edited by caramen

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to comment
Share on other sites

2 minutes ago, caramen said:

Sry it's not the problem. No need rights to BlockInputs

Do you pull this information out of thin air? Have you TRIED IT? I just did, on Windows 10, and it won't work unless you use #RequireAdmin.

1 minute ago, caramen said:

I got the answer. Just let him find the solution about the error message.

Your suggestion is just telling him what he's already done, except you used the variables instead of the values he used. The error message is because you didn't give him enough information in your post. Although he could have found out the reason for the error on his own, and not asked.

Your information doesn't fix the problem, because $BI_DISABLE is equal to 1, which he already used. It's a rights issue.

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 Gude
How 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

Mate,

I can BlockInput in my park without #RequireAdmin. 

On Windows 10 yeah.

 

Operating System    "BlockInput()" Results
Windows XP  User input is blocked and AutoIt can simulate mouse and keyboard input.
Windows Vista and above     User input is blocked and AutoIt can simulate mouse and keyboard if #RequireAdmin is used.

I have to check why I can blockinput.

Edited by caramen

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to comment
Share on other sites

Without disabling UAC, or are you logged in as an administrator?

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 Gude
How 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

I got consent behaviur prompt at 5 and the EnableLUA to 1

 

Classic config. It is working. I teamViewer it for you if ya want :lol:

 

Btw... He got the #RequireAdmin already :D

Edited by caramen

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to comment
Share on other sites

 

#RequireAdmin

#include <AutoItConstants.au3>



BlockInput($BI_DISABLE) ; Disable user input from the mouse and keyboard.

Sleep ( 15000 ) ;Sleep 15 sec to try moving mouse.

BlockInput($BI_ENABLE) ; Enable user input from the mouse and keyboard.

 

 

Edited by caramen

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to comment
Share on other sites

58 minutes ago, BrewManNH said:

You probably need to run it as admin for it to work in Win10. If that's not possible, then don't use MouseClick, use ControlClick.

Also, in the future, unless you're doing image editing, don't post screenshots of your code, use the "<>" button in the reply editor and post the actual textual code.

Thanks I wasnt sure how I should post the code. And yes we are running the script as Admin's it works fine for Windows 7 its just 10 that it isnt working.

Link to comment
Share on other sites

1 hour ago, BrewManNH said:

Your suggestion is just telling him what he's already done, except you used the variables instead of the values he used. The error message is because you didn't give him enough information in your post. Although he could have found out the reason for the error on his own, and not asked.

Yes I figured out the error message before and just used the variable and the error message went away and I tried using the search feature on the forum before creating a post also.

Link to comment
Share on other sites

12 hours ago, stayready40 said:

Thanks guys I was able to figure it out and it's all working correctly now.

?? 

So what was the problem ?

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to comment
Share on other sites

  • 2 months later...

There are people who are complaining that their mouse is unable to respond. Specifically they stressed upon the USB devices. Here we have mentioned a few methods to solve this problem for you but in case you want to go for more methods then you can visit this website https://appuals.com/fix-usb-mouse-keyboard-not-working-windows-10/

Method 1: Running ChkDsk ). Here we try to find any problematic issues in the PC. There is a huge possibility that the place where your device drivers are located has some issues.  You can do it by pressing windows search bar that and write Command Prompt. Then right-click on the app and choose Run as administrator. Go for the following instruction CHKDSK E: /f. E is the name of the disk driver which will follow by the “/f” instruction. This process will take some time and find the errors, after that you can enter this instruction sfc /scannow. In case windows find any error it will inform you but if it does not then go for DISM /Online /Cleanup-Image /RestoreHealth. At the end restart your system.

Method 2: Changing BIOS Settings). You can open your BIOS and try to disable the USB2 Legacy Support. Restart your PC and check in case this resolves the error. In case it doesn’t, you can also send BIOS to Optimized Default again. Your PC will ask for a password and the time you enter it, BIOS settings will be new again. Method 3 Checking PS/2 Mouse/Keyboard). In case your system has PS/2 ports, then you can plug in a PS/2 mouse and see is it solves this issue. You can also switch off your machine, plug in the PS/2 device and turn on your system. Now switch your USB Keyboard or Mouse and check in case the computer finds it, if not then restart your PC and keep the USB Mouse plugged in.

Edited by kammses9
Some more points need to add.
Link to comment
Share on other sites

Chkdsk for mouse and keyboard ?^^  :D:D:D

 

Man wtf lol ?

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...