Jump to content

Recommended Posts

Posted

Hi! First of all, I must admit that I have almost no knowledge about editing scripts in general, let alone with Autoit. I've got a LED keyboard which turn itself on by pressing the scrollock key. I'd like to have the key automatically pressed before in Windows 10 (build 15063) before logon. I already tried to create a VBScript, putting it both in scheduled tasks (where I selected the "at system startup" trigger) and in local policy Group editor (as a startup script in the computer configuration section), but in both cases it doesn't work, whilst it executes if set to start at logon (i.e. after having inserted the password and started a session). Having run out of internal Windows resources I was wondering whether it is possible to create with Autoit a startup script of this kind that will work under the desired circumstances (at startup before logging in). Thanks in advance.

Posted

Hi Jos, thanks for the reply. Do you mean creating a specific task for my VBScript in Windows Task Scheduler? If so, unfortunately, as I've written above that method doesn't work selecting the "at system startup" trigger; the only way the task executes is by choosing the "at log on" event, but in this case it runs only after a user has inserted the password and logged in. Do you think I may have better fortune with an Autoit script?

Posted

Thank you for the reply, argumentum. This is the VBScript:

 

Set wshShell =CreateObject("Wscript.Shell")

wshshell.sendkeys "{SCROLLLOCK}"

 

The keyboard is a Cooler Master Devastator II.

 

 

 

 

 

 

Posted
  On 11/27/2017 at 3:36 PM, Salio14 said:

Cooler Master Devastator II

Expand  

I did go to http://www.coolermaster.com/peripheral/keyboards/devastator-ii/ and they have no usefull information, just a sales pitch.
As far as having what you want to, https://winaero.com/blog/enable-numlock-logon-screen-windows-10/ may give you an idea ( I have not tried it ), as https://support.microsoft.com/en-us/help/314879/how-to-set-the-num-lock-state-at-logon-in-windows-xp don't work on Win10 ( if you tried it ).

The no access to the keyboard, before login, in Win 10 may be a security measure, no clue.

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Posted (edited)

maybe the driver doesn't respond until after logon or has not loaded yet

 

autoit can do this, right?

Send("{SCROLLLOCK toggle}") or

Send("{SCROLLLOCK on}")

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Posted
Send('{ScrollLock}')

Try to compile and place it in the group policy as you did with the vbscript.

  Reveal hidden contents

IUIAutomation - Topic with framework and examples

Au3Record.exe

Posted (edited)
  On 11/27/2017 at 5:32 PM, argumentum said:

I did go to http://www.coolermaster.com/peripheral/keyboards/devastator-ii/ and they have no usefull information, just a sales pitch.
As far as having what you want to, https://winaero.com/blog/enable-numlock-logon-screen-windows-10/ may give you an idea ( I have not tried it ), as https://support.microsoft.com/en-us/help/314879/how-to-set-the-num-lock-state-at-logon-in-windows-xp don't work on Win10 ( if you tried it ).

The no access to the keyboard, before login, in Win 10 may be a security measure, no clue.

Expand  

 

Thank you for the indications. I tried the registry solution, but unfortunately it doesn't work with anyone of the number sequences associated to the scrollock key (4, 80000004, 2147483652). One thing I noticed is that when I put the Vbscript under "startup script" in local policy group it runs exactly as a logon script, executing only after I've logged in. I strongly suspect there are some issues with permissions and security but I have absolutely no idea how to determine that. Do you think that an Autoit script could help or I may incur in the same issues? 

 

 

 

 

Edited by Salio14
Posted

 

  On 11/27/2017 at 6:16 PM, Earthshine said:

maybe the driver doesn't respond until after logon or has not loaded yet

 

autoit can do this, right?

Send("{SCROLLLOCK toggle}") or

Send("{SCROLLLOCK on}")

Expand  

 

  On 11/27/2017 at 6:22 PM, careca said:
Send('{ScrollLock}')

Try to compile and place it in the group policy as you did with the vbscript.

Expand  

Thank you guys, I'll try that.

Posted

What about BIOS? i know most MB's have the option to turn on NUMlock at boot, maybe you have for scroll?

  Reveal hidden contents

IUIAutomation - Topic with framework and examples

Au3Record.exe

Posted

Yes, on, toggle, off. or just nothing, it just toggles.

  Reveal hidden contents

IUIAutomation - Topic with framework and examples

Au3Record.exe

Posted
  On 11/27/2017 at 6:25 PM, careca said:

What about BIOS? i know most MB's have the option to turn on NUMlock at boot, maybe you have for scroll?

Expand  

Yes, my Mobo's BIOS has this option for Numlock, but unfortunately there isn't anything similar for scroll.

  On 11/27/2017 at 6:22 PM, careca said:
Send('{ScrollLock}')

Try to compile and place it in the group policy as you did with the vbscript.

Expand  

I don't know if i followed the correct procedure (as I said I'm a complete newbie). I created a document in Notepad with the Send ('{Scrollock}') function as text, then i changed the extension of it from .txt into .au3. I compiled the script  with Aut2Exe and put the resulting EXE file in the group policy. The behaviour is exactly the same of the VBscript: the EXE runs only after having logged in, even though it's located under the "startup script" section. Did i do something wrong?

Posted (edited)

you would have to run as a service no doubt to start before login. why doesn't running after logging do it for you? What is the need to have that always on, even when nobody is logged on?

 

also, are you sure you tried this? use HKEY_USERS to set all users defaults

https://www.askvg.com/force-capslock-numlock-and-scrolllock-keys-behavior-using-windows-registry/

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Posted
  On 11/27/2017 at 7:07 PM, Earthshine said:

you would have to run as a service no doubt to start before login. why doesn't running after logging do it for you? What is the need to have that always on, even when nobody is logged on?

 

also, are you sure you tried this? use HKEY_USERS to set all users defaults

https://www.askvg.com/force-capslock-numlock-and-scrolllock-keys-behavior-using-windows-registry/

Expand  

Thanks, Earthshine. Having the script functional only after login implies that I manually press the scroll lock key to turn on the keyboard, in order to insert the password: of course this is definitely not an issue, but if there is a way to make the process completely automatic I'd be really glad to follow it.    

I've already tried to edit the registry, as argumentum also suggested above, but unfortunately the procedure doesn't work for me. 

May I ask you what you exactly intend by running the .EXE as service? Is it something I can do recurring to Autoit and/or internal Windows features? Or do I need specific softwares instead?

Posted
  On 11/27/2017 at 11:31 PM, Salio14 said:

what you exactly intend by running the .EXE as service?

Expand  

Well, you have insufficient experience in AutoIt to write a Send(), writing a service is out of you league right now.
I don't wanna put words into @Earthshine's mouth, but he can cook a run once ( a function ) and idle the rest of the time service ;) 

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Posted
  Quote

Thanks, Earthshine. Having the script functional only after login implies that I manually press the scroll lock key to turn on the keyboard, in order to insert the password

Expand  

I do not see how the scroll lock can influence a password, I never use that key, but anyway, i suggest you change the pass, then all your problems are solved.

  Reveal hidden contents

IUIAutomation - Topic with framework and examples

Au3Record.exe

Posted (edited)

Im kind of a hack myself, so i think i would rewire the KB internally in such a way that scroll lock becomes num lock, then activate in bios num lock ON at boot. Huh but im not sure it would work, now that i think about it.

Anyway what kind of KB only turns on when you press scroll lock? that's weird.

Edited by careca
  Reveal hidden contents

IUIAutomation - Topic with framework and examples

Au3Record.exe

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...