Jump to content

Script on Windows Login?


Recommended Posts

Hi, I noticed that there is a way in Windows to make a flash drive hold a key to unlock the computer if you cannot remember the password. This got me thinking, is there a way to run a script like this before anybody has logged on?

Just as an example, could you replicate what Windows does by looping through drives for a file, and if it is found tell the user his password?

Is there any place in the Registry that will start up a program before a log-on?

Thank you.

Edit: I am searching online and I read that it might work if made a Service?

Edited by darkjohn20
Link to comment
Share on other sites

Click Start - Run - gpedit.msc

This will open an Group Policy Editor for you local machine.

Take a look at Computerconfiguration* - Windows settings* - Scripts* - Startup* or Shutdown*

Here you can insert your script. It will be run with SYSTEM rights.

* = i don't know if the wording is correct cause i'm currently in front of an german windows.

Link to comment
Share on other sites

I can think of an easy way to do this (I think) but I'm not sure I would want anyone knowing how to do something like this...

The Wheel of Time turns, and Ages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Age that gave it birth comes again.

Link to comment
Share on other sites

  • Developers

Its pretty strait forward:

RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RUN", "MyProgram", "REG_SZ", @ScriptFullPath)

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

I'm pretty sure that runs it after the user has logged on? Am I mistaken?

The Wheel of Time turns, and Ages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Age that gave it birth comes again.

Link to comment
Share on other sites

  • Developers

Jos, what is the difference between this and HKEY_CURRENT_USER?

HKLM runs the script for all users and HKCU only for the user of this hyve.

I'm pretty sure that runs it after the user has logged on? Am I mistaken?

Correct, this will shell the script at logontime. Any needed at boot time will have to be installed as a service.

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

  • Developers

Look at the FQA's stickied at the top of this forum. Iam pretty sure this is one of them.

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

  • Developers

I'm not quite sure what you mean. I looked through the stickied FAQs (I assume that is what you meant) but could not find anything.

Yea, looks like somebody totally screwed up that first post. Wondering why Jon did that. ;)

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

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...