Link to home
Start Free TrialLog in
Avatar of cml
cml

asked on

How-to lock keyboard and mouse with WSH

How can we lock the keyboard and the mouse (or prevent all user input) while executing some operations with WSH (windows scripting host : VBScript or JavaScript) ?

Context:

I have to start an application in WSH and use the sendKey fonction to automate its configuration. I don't want the user to be able to interfere with the process.
The WSH will run under Win2k professional.
I will preferably do it without having to install any third party components.

Thank you,
Claude
ASKER CERTIFIED SOLUTION
Avatar of TimCottee
TimCottee
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of VincentLawlor
VincentLawlor

Have a look at the Application.Lock method for VB script.

This might do what you want.

Vin.
Avatar of cml

ASKER


Someone could trap all mouse and keyboard events, and drop all events except those you generate your self.

Avatar of DanRollins
Hi cml,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept TimCottee's comment(s) as an answer.

cml, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
Comment from expert accepted as answer

Computer101
E-E Moderator