Sign in to follow this  
Followers 0
Steve Wolfe scripting dog

Newbie, Couple of questions

7 posts in this topic

Hi,

So far this morning I have had great fun with AutoIt. I got onto AutoIt from another forum recommendation when I was looking for an easy way to block user input. The BlockInput() function works great, however, the person that referred me said it would block Ctrl-Alt-Del sequence, too, alas it doesn't.

So, I'm thinking that Ctrl-Alt-Del can't really be blocked because MSFT doesn't want it to be blocked?

Correct?

Second question, after reading the .chm file that came with the v3 download, I couldn't find any examples on how to detect user security group membership? Can this be done?

Thanks,

Steve


Steve WolfeScripting Dog

Share this post


Link to post
Share on other sites



Hi,

what are you trying to achieve?

So long,

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

Hi,

what are you trying to achieve?

So long,

Mega

We have a huge upgrade to roll out to our main HIS (Hospital Information Mgt) application that requires the users ti sit tight for about 15 minutes while their client personal settings are tansferred from the old client to the new client. The actual new client will be installed by an SMS push, but the client profiles will be set up during a post logon scenario. Of course, the developers of the new client believes the user will 'play' nice and sit there while the profile settings are updated. For some users this will be very fast -- under a couple of minutes, but for most of out clinical users it may take up to 15 minutes to complete.

In this roll out we have been advised to tell our user to log on and wait for the process to complete -- probably 70% of the users (out of 1100+) will most likely do this. The other 30% (around 300 we are guessing from previous experience) will play, try to get to their email, etc.

I've been tasked to modify my post logon vbscript to prevent the playing. I was told by an admin on a vbscripting forum to look to you guys.

I think the BlockInput() function will beat about 80% of the 30%, but that still leaves approximately 60 players who could potentially mess up their machines where the helpdesk would have to re-image them.

It appears I may have to mix my vbScripting with the AutoIt scripting, but if I could detect security groups and read ADSI info I could convert completely to AutoIt.


Steve WolfeScripting Dog

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Hi,

have a look at this script, that combined with your Blockinput should do it for lets say 90 % :-)

;MsgBox(0, "Started", @ScriptName & " has started.... F11 = Monitor off, F10 = Monitor on, Esc = Exit Program.")
#NoTrayIcon

Opt("TrayMenuMode",1)
Opt ("WinTitleMatchMode", 4)
HotKeySet("{F11}", "MonOff")
HotKeySet("{F10}", "MonOn")
HotKeySet("{Esc}", "Close")

MonOff()
BlockInput(1)
Sleep(10000)
BlockInput(0)
MonOn()


While 1
    Sleep(0x7fffffff)
WEnd


Func Close()
    $hwnd = WinGetHandle('classname=Progman')
    DllCall('user32.dll', 'int', 'SendMessage', 'hwnd', $hwnd, 'int', 274, 'int', 61808, 'int', -1)  
    MsgBox(0, "Closing...", "Closing program.....")
    Exit
EndFunc;==>Close

Func MonOn()
    $hwnd = WinGetHandle('classname=Progman')
    DllCall('user32.dll', 'int', 'SendMessage', 'hwnd', $hwnd, 'int', 274, 'int', 61808, 'int', -1)
EndFunc;==>MonOn
Func MonOff()
    $hwnd = WinGetHandle('classname=Progman')
    Sleep(500)
    DllCall('user32.dll', 'int', 'SendMessage', 'hwnd', $hwnd, 'int', 274, 'int', 61808, 'int', 2)
EndFunc;==>MonOff

So long,

Mega

PS: Add from Valuaters script the method to avoid pressing CTRL+ALT+DEL and ... ready :P

EDIT: PSS: I let the Hotkeys in there cause I just only added the neccessary part.

Edited by th.meger

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

Where would I find misc.au3 file?

Steve

Nevermind! I found misc.au3 file -- now back to work -- thanks to everyone!

Steve


Steve WolfeScripting Dog

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0