Solved

How-to lock keyboard and mouse with WSH

Posted on 2001-07-26
5
459 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
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…

776 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