Weaver Posted January 14, 2015 Posted January 14, 2015 I have an Autoit script/exe that needs to complete writing the autologon registry settings before windows begins the logon process. How can I make my process complete and/or hold off the windows logon process. I have tried adding it as a service, a group policy script, and as a scheduled task. My results are always inconsistent, sometimes logging in as desired, mostly getting to the logon prompt before the registry settings are completed. Any advice you can provide to get this script completed before windows attempts to draw the login dialog?
goss34 Posted January 14, 2015 Posted January 14, 2015 I have an Autoit script/exe that needs to complete writing the autologon registry settings before windows begins the logon process. How can I make my process complete and/or hold off the windows logon process. I have tried adding it as a service, a group policy script, and as a scheduled task. My results are always inconsistent, sometimes logging in as desired, mostly getting to the logon prompt before the registry settings are completed. Any advice you can provide to get this script completed before windows attempts to draw the login dialog? At what point is the script running? Can you not write the registry keys prior to a system reboot?
Weaver Posted January 14, 2015 Author Posted January 14, 2015 I have done it 2 different ways, both at compiled exe. 1st was as a Task scheduler action at startup. 2nd as a created service. Prior to reboot, the answer is no, because I am working in a diskless pc environment using a static boot drive image.
spudw2k Posted January 14, 2015 Posted January 14, 2015 Prior to reboot, the answer is no, because I am working in a diskless pc environment using a static boot drive image. How are you creating a service and or scheduled task then if this is the case? Are you not modifying the image? Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF
Weaver Posted January 14, 2015 Author Posted January 14, 2015 Indeed, I am creating the image to be streamed. Once built, it is finalized, and then used by many individual diskless pc users.
spudw2k Posted January 15, 2015 Posted January 15, 2015 I'm sure I'm not realizing the whole picture here then. Why can't you bake the AutoLogin reg keys into the image instead of relying on a script to do so? Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF
Weaver Posted January 15, 2015 Author Posted January 15, 2015 The script will setup a unique login based on the each @computername.
taurus905 Posted January 18, 2015 Posted January 18, 2015 I was searching for another way I learned in the past which executes a program one time per user. You make a registry key which tells the operating system what to run. It is not well documented because it was mainly designed for Microsoft developers to use back with Windows 2000, but it was never removed. I will keep looking because I want to use it soon. In the mean time, would this work for your purpose? How to run a logon script one time when a new user logs on: http://support.microsoft.com/kb/284193 taurus905 "Never mistake kindness for weakness."-- Author Unknown --"The highest point to which a weak but experienced mind can rise is detecting the weakness of better men."-- Georg Lichtenberg --Simple Obfuscator (Beta not needed.), Random names for Vars and Funcs
taurus905 Posted January 18, 2015 Posted January 18, 2015 I found what I mentioned above: Active Setup http://en.wikipedia.org/wiki/Active_Setup "Never mistake kindness for weakness."-- Author Unknown --"The highest point to which a weak but experienced mind can rise is detecting the weakness of better men."-- Georg Lichtenberg --Simple Obfuscator (Beta not needed.), Random names for Vars and Funcs
taurus905 Posted January 18, 2015 Posted January 18, 2015 I apologize for posting three times in a row. JLogan3o13 posted an excellent explanation of how to use Active Setup in the following link: You can also search your registry for the keyword "stubpath" to find how it is used on your pc. I really like this method but have not used it yet. taurus905 "Never mistake kindness for weakness."-- Author Unknown --"The highest point to which a weak but experienced mind can rise is detecting the weakness of better men."-- Georg Lichtenberg --Simple Obfuscator (Beta not needed.), Random names for Vars and Funcs
Weaver Posted January 19, 2015 Author Posted January 19, 2015 Thanks much for your posts. I am just beginning to evaluate how they might help me change/define my efforts, and will provide feedback soon. Weaver
jdelaney Posted January 19, 2015 Posted January 19, 2015 Create the task to run @ startup. If the registry values are not set, then set them, and start a reboot. IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
Weaver Posted January 19, 2015 Author Posted January 19, 2015 Your combined thoughts are bringing me closer to clarity. Please allow me to be more specific with my objective. I do apologize in advance if I become wordy. I have multiple users running on diskless pc's using roaming profiles. Anytime a user's machine reboots, it reverts to the state provided by the static image of a 'C' drive. I periodically need to apply patches and/or updates to that image, and then require the users machine to be rebooted. When I require a reboot, I am trying to minimize downtime and repetitive tasks for the users. Autoit allows me to re-open windows and applications to each users preferred state, but requires the user to wait while this process proceeds, and in a streaming setup, the initial start of each application is a slower process than normal. Each streamed machine is uniquely named by the streaming server, and I am able to remotely force a reboot of any or all machines during off hours. My autoit script is able to identify the machine and process a table to make the necessary registry entries for autologon, followed by a screen lock. Each machine would be custom ready for each user when returning to work. My problem is that the logon process usually, but not always, begins before the autologon fields are in place, and therefore waits for the user to manually start their logon process. My desire is to run the script at startup, either as a service or a task, and require the script to complete before the boot process starts the logon screen. tl;dr: I need my autoit script to run this way and only this way, it must run completely and fulfill its payload before windows gets to the point of starting its login mechanism.
Weaver Posted February 2, 2015 Author Posted February 2, 2015 Please close my topic, this topic. My question would be better focused to the Windows world.
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