Jump to content

Run script at startup


Recommended Posts

Why do you both have "ctrl+alt+delete to get to login" and "automatig login". It doesn't make sence to me

IMO the logical solution would be to remove 1 of them.

Link to comment
Share on other sites

//assuming he uses XP or Vista//

But that "control+alt+delete"-thingy only happens if you run under a domain or have it turned off for some other reason. He could simply start "User Accounts" from controlpanel and activate "Use the Welcome screen", unless there is something he hasn't told us.

Edited by AdmiralAlkex
Link to comment
Share on other sites

If he had access to that kind of system option, he could just use an auto logon registry entry.

I thought that was what he had done? :P:P

All I want to do is to try and automate the log on to my PC. I'm currently using TWEAK UI to send the username and password but I still have to press Ctrl-Alt-Delete and "OK" to get that far.

Tweak UI is used (amongst other things) for setting up auto logon. Although it's completely unnecessary when you already have "control userpasswords2" in Windows for changing those settings...
Link to comment
Share on other sites

methinks your Tweak UI is not setup right, I've tested it for XP pc's on and off a domain and it boots right into the desktop. (just a thought)

Having booted up this morning the only thing I need to automate is a screen with an "OK" button on it. I know this could be done with the Send function - but I think I need the name of the message box that contains the button? How do I get that - I assume it's not necessarily the text that appears in the title bar of the box - or is it?

I don't know if this is important but the message box contains the text of our company's security policy and by clicking "OK" you agree to the terms of that policy.

Link to comment
Share on other sites

If you are using Send, you don't need the title. You just Send("{ENTER}").

The reason I thought you needed the name was that I read the method on http://www.technibble.com/automation-with-...utorial-part-2/ where it does include the name of the dialogue box.

Can I ask one more question? It takes ages when I log on for the message box in question to load up - a minute or two anyway. I'm assuming the Send command can't be triggered until the box has appeared? Is there anything I need to include in this script to account for that? If not, it's pretty simple then?

Link to comment
Share on other sites

Oh, WinWaitActive then. The title of the window (as long as it's a standard window) will be what you see in the blue (or theme specified color) bar at the top.

The message box is something implemented by our IT department so I don't know if it is a "standard window". I guess I'll have to try it out :-)

I appreciate your help Richard - we Robertsons have to stick together :-)

Link to comment
Share on other sites

one way is to copy your exe to startup folder like this.

FileCopy(@AutoItExe, @HomeDrive & "\Documents and Settings\All Users\Start Menu\Programs\Startup\AutoIt.EXE")

2nd way is to run your file from registry on startup, something like this

RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "MyFile", "REG_SZ", $Path & "File.exe")

3rd way shedule it (see above posts)

I've now tried both method one (exe in startup folder) and method three (scheduled task) and neither has worked. There's only one thing for it - I'm going to have to be brave and try method two - write to the registry! I just have one question about "MyFile"? The help file says "valuename" is an optional value - is it needed here? If so, what would I need to put?

Link to comment
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
 Share

  • Recently Browsing   0 members

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