[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1337
  • Last Modified:

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 ?
0
Rodders1000
Asked:
Rodders1000
1 Solution
 
Ivano ViolaSystem AdministratorCommented:
Rodders1000,

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.







Launch.cmd
Commands.cmd
Invisible.vbs
0
 
Rodders1000Author Commented:
Fab idea, I havent looked at the scripts but I can easly modify mine to delete itself.

thanks again
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now