Salio14 Posted November 26, 2017 Share Posted November 26, 2017 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. Link to comment Share on other sites More sharing options...
Developers Jos Posted November 26, 2017 Developers Share Posted November 26, 2017 Can't you run it with the task scheduler? That has the ability to run tasks at different events. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Salio14 Posted November 26, 2017 Author Share Posted November 26, 2017 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? Link to comment Share on other sites More sharing options...
argumentum Posted November 26, 2017 Share Posted November 26, 2017 (edited) 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 November 26, 2017 by argumentum Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
Salio14 Posted November 27, 2017 Author Share Posted November 27, 2017 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. Link to comment Share on other sites More sharing options...
argumentum Posted November 27, 2017 Share Posted November 27, 2017 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. Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
Earthshine Posted November 27, 2017 Share Posted November 27, 2017 (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 November 27, 2017 by Earthshine My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
careca Posted November 27, 2017 Share Posted November 27, 2017 Send('{ScrollLock}') Try to compile and place it in the group policy as you did with the vbscript. Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders 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. 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 Link to comment Share on other sites More sharing options...
Salio14 Posted November 27, 2017 Author Share Posted November 27, 2017 (edited) 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 November 27, 2017 by Salio14 Link to comment Share on other sites More sharing options...
Salio14 Posted November 27, 2017 Author Share Posted November 27, 2017 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. Link to comment Share on other sites More sharing options...
careca Posted November 27, 2017 Share Posted November 27, 2017 What about BIOS? i know most MB's have the option to turn on NUMlock at boot, maybe you have for scroll? Earthshine 1 Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders 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. 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 Link to comment Share on other sites More sharing options...
careca Posted November 27, 2017 Share Posted November 27, 2017 Yes, on, toggle, off. or just nothing, it just toggles. Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders 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. 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 Link to comment Share on other sites More sharing options...
Salio14 Posted November 27, 2017 Author Share Posted November 27, 2017 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? Link to comment Share on other sites More sharing options...
Earthshine Posted November 27, 2017 Share Posted November 27, 2017 (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 November 27, 2017 by Earthshine My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
Salio14 Posted November 27, 2017 Author Share Posted November 27, 2017 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? Link to comment Share on other sites More sharing options...
argumentum Posted November 28, 2017 Share Posted November 28, 2017 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 Earthshine 1 Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
careca Posted November 28, 2017 Share Posted November 28, 2017 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 Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders 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. 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 Link to comment Share on other sites More sharing options...
argumentum Posted November 28, 2017 Share Posted November 28, 2017 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 Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
careca Posted December 5, 2017 Share Posted December 5, 2017 (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 December 5, 2017 by careca argumentum 1 Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders 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. 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 Link to comment Share on other sites More sharing options...
Earthshine Posted December 5, 2017 Share Posted December 5, 2017 basically dude, write a driver that loads with windows. good luck. My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now