XP Startup Script - On Screen Keyboard - Can't get it to work

D

DavidEMS

I'm setting up an XP Pro computer for users who cannot use a keyboard. I need
the onscreen-keyboard (osk.exe) to load at startup BEFORE login, so the users
can login with userid and passwords.

I created a gpedit startup script. The script works perfectly and the
onscreen keyboard shows up when I execute the script AFTER login, but NOT as
a startup script.

I included code that logs to a file whenever the script is executed, and it
is logging and executing at startup. But the onscreen keyboard is not showing
up.

Set objShell = CreateObject("WScript.Shell")
objShell.Run ("c:\windows\system32\osk.exe")
'log when the startup script was run
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile("C:\ScriptLog.txt", 8, 1)
objFile.Write(now() & " Startup Script was run" & vbCrLf )
objFile.Close

Any thoughts?
 
P

Pegasus \(MVP\)

DavidEMS said:
I'm setting up an XP Pro computer for users who cannot use a keyboard. I
need
the onscreen-keyboard (osk.exe) to load at startup BEFORE login, so the
users
can login with userid and passwords.

I created a gpedit startup script. The script works perfectly and the
onscreen keyboard shows up when I execute the script AFTER login, but NOT
as
a startup script.

I included code that logs to a file whenever the script is executed, and
it
is logging and executing at startup. But the onscreen keyboard is not
showing
up.

Set objShell = CreateObject("WScript.Shell")
objShell.Run ("c:\windows\system32\osk.exe")
'log when the startup script was run
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile("C:\ScriptLog.txt", 8, 1)
objFile.Write(now() & " Startup Script was run" & vbCrLf )
objFile.Close

Any thoughts?

Logon scripts and policies only become effective ***after*** logon, not
before. Perhaps this $20.00 program will do the trick:
Touch-It Virtual Keyboard 4.4
http://wareseeker.com/download/touch-it-virtual-keyboard-4.4.rar/446981
 
D

DavidEMS

Thanks for your answer, and I'll look into the 3rd party software. However,
I'm using the windows startup/shutdown scripts and not the logon scripts.
gpedit | Computer Configuration | Windows Setting |Scripts
(Startup/Shutdown) | Startup
 
P

Pegasus \(MVP\)

DavidEMS said:
Thanks for your answer, and I'll look into the 3rd party software.
However,
I'm using the windows startup/shutdown scripts and not the logon scripts.
gpedit | Computer Configuration | Windows Setting |Scripts
(Startup/Shutdown) | Startup

Startup/Shutdown scripts execute under the System account. I don't think
such processes are visible to a foreground session.
 
D

DavidEMS

After trial and error, I discovered that I can get it to work (sort of) if I
include a MsgBox after the call to osk.exe. Now I get both the MsgBox and
then onscreen keyboard. If I close the MsgBox the onScreen Keyboard goes
away. If I don't close the MsgBox I can use the keyboard to login. Both go
away after login.

It's very odd. I wonder why a MsgBox makes a difference? It must be forcing
the script into the foreground.

so... the script is the same but I added a line at the end:
iRC = MsgBox ("Use the onScreenKeyboard", vbOKOnly, "Don't Close this Box")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top