Jump to content
Salio14

Autoit script at Windows 10 startup (before logon)

Recommended Posts

Salio14

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.

Share this post


Link to post
Share on other sites
Salio14

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?

Share this post


Link to post
Share on other sites
argumentum
2 hours ago, Salio14 said:

Do you think I may have better fortune with an Autoit script?

I'm curious here. Could you post your VBS code ?, also your keyboard name/model

Edited by argumentum

Share this post


Link to post
Share on other sites
Salio14

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.

 

 

 

 

 

 

Share this post


Link to post
Share on other sites
argumentum
1 hour ago, Salio14 said:

Cooler Master Devastator II

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.

Share this post


Link to post
Share on other sites
Earthshine

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

 

Share this post


Link to post
Share on other sites
careca
Send('{ScrollLock}')

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


Spoiler

Paster - Main function is to paste text, but has more functions. (No longer mantained, switched to String Trigger)

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Firefox Profile Backup - Backup/restore previously saved profile.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Share this post


Link to post
Share on other sites
Salio14
55 minutes ago, 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.

 

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

Share this post


Link to post
Share on other sites
Salio14

 

7 minutes ago, 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}")

 

1 minute ago, careca said:
Send('{ScrollLock}')

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

Thank you guys, I'll try that.

Share this post


Link to post
Share on other sites
careca

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

  • Like 1

Spoiler

Paster - Main function is to paste text, but has more functions. (No longer mantained, switched to String Trigger)

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Firefox Profile Backup - Backup/restore previously saved profile.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Share this post


Link to post
Share on other sites
careca

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


Spoiler

Paster - Main function is to paste text, but has more functions. (No longer mantained, switched to String Trigger)

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Firefox Profile Backup - Backup/restore previously saved profile.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Share this post


Link to post
Share on other sites
Salio14
20 minutes ago, careca said:

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

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

24 minutes ago, careca said:
Send('{ScrollLock}')

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

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?

Share this post


Link to post
Share on other sites
Earthshine

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

 

Share this post


Link to post
Share on other sites
Salio14
3 hours ago, 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/

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?

Share this post


Link to post
Share on other sites
argumentum
4 hours ago, Salio14 said:

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

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 ;) 

  • Like 1

Share this post


Link to post
Share on other sites
careca
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

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.


Spoiler

Paster - Main function is to paste text, but has more functions. (No longer mantained, switched to String Trigger)

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Firefox Profile Backup - Backup/restore previously saved profile.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Share this post


Link to post
Share on other sites
argumentum
5 hours ago, careca said:

I do not see how the scroll lock can influence a password

it has to do with the lights on a gaming keyboard and not the password

Share this post


Link to post
Share on other sites
careca

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
  • Like 1

Spoiler

Paster - Main function is to paste text, but has more functions. (No longer mantained, switched to String Trigger)

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Firefox Profile Backup - Backup/restore previously saved profile.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Share this post


Link to post
Share on other sites
Earthshine

basically dude, write a driver that loads with windows. good luck.


My resources are limited. You must ask the right questions

 

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

×