Run Once key for every new user on Windows 7

Posted on 2011-10-12
Last Modified: 2012-05-12

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 ?
Question by:Rodders1000
    LVL 21

    Accepted Solution


    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.


    Author Comment

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

    thanks again

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Suggested Solutions

    The "Notification Area" is that area on the righthand side of the Taskbar where your system clock resides, and probably a large number of other icons.  It used to be called, prior to Windows XP, the "system tray."  Programs just love to install an i…
    Article by: Lee
    Windows 7 Ultimate and Enterprise (and 2008 R2) introduced a new feature you may not be aware of - Boot from VHD.   Boot from VHD (or what Microsoft refers to asNative Boot allows you to install Windows to a VHD (Virtual Hard Disk) file that is t…
    The viewer will learn how to back up with the free utility from runtime software, DriveImageXML using Windows 7. Download DriveImageXML from Open folder where it was saved: Start installation by double clicking the install scrip…
    The viewer will learn how to successfully download and install the SARDU utility on Windows 7, without downloading adware.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now