Solved

How-to lock keyboard and mouse with WSH

Posted on 2001-07-26
5
457 Views
Last Modified: 2008-03-03
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
0
Comment
Question by:cml
5 Comments
 
LVL 43

Accepted Solution

by:
TimCottee earned 200 total points
ID: 6321814
Claude, even if you can lock keyboard and mouse, how will the application receive the sendkeys as these are keyboard inputs. You defeat the object by attempting this. You should look at another way of passing this configuration that cannot be interfered with by the user.
0
 
LVL 4

Expert Comment

by:VincentLawlor
ID: 6321861
Have a look at the Application.Lock method for VB script.

This might do what you want.

Vin.
0
 

Author Comment

by:cml
ID: 6324638

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

0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7161571
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
0
 
LVL 1

Expert Comment

by:Computer101
ID: 7182483
Comment from expert accepted as answer

Computer101
E-E Moderator
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now