Run Once key for every new user on Windows 7

I have created a base image with all my apps on it and this image is deployed by PXE boot and LANDesk, this is all cool. The image is Windows 7 pro.

What I need is a batch file to run only once when a new user logs onto the machine, this file does some user settings.

Is it just a case of adding the batch file to the run as key in the default user profile ? If so how do I go about doing this ?
Who is Participating?
Ivano ViolaSystem AdministratorCommented:

What I do in my image is add a batch file to the startup folder of the default user. When a new user logs in, the batch file runs then deletes itself. Works well and I haven't had any problems. It all depends what you want the batch file to do. If the commands in the batch file don't need to be changed then this works well.

I've attached the files I use.
Launch.cmd goes into the startup folder of the default user.
Commands.cmd and Invisible.vbs both go into the Cleanup folder I create (C:\Windows\System32\sysprep\Cleanup)
Add you commands into Commands.cmd.
Invisible.vbs runs the commands.cmd in silent mode so the user only sees the window on the task bar.

Hope this helps.

Rodders1000Author Commented:
Fab idea, I havent looked at the scripts but I can easly modify mine to delete itself.

thanks again
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.