Jump to content

RunOnce before logging in


Recommended Posts

I am trying to run a simple task before logging in.

I want to delete the Documents and Settings\Administrator profile. (so it gets recreated next time the account is logged in).

I've read about

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServicesOnce

I tried loading a test command, with no success- There was no RunServicesOnce so I created it.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunServicesOnce]

"001"="c:\\test.cmd"

c:\test.cmd

@echo off
ECHO "Hello world" > c:\test.txt

So I'm a bit stumped...

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
  • Recently Browsing   0 members

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