Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How-to lock keyboard and mouse with WSH

Posted on 2001-07-26
5
Medium Priority
?
469 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 43

Accepted Solution

by:
TimCottee earned 800 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

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…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

618 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