Jump to content

Is pre-image scripting possible?

Recommended Posts

Out of curiosity, is there a way to execute a command or script BEFORE the computer shuts down and boots into Windows PE?

What I would like to do is run a silent uninstall of the Antivirus software before shutting down and going into Windows PE for imaging.  This would eliminate me having to go log into the AV management console and remove the computer manually.  What happens is after I apply a new image to a computer I run a script on first boot to install the antivirus.  The management console doesn't care that it's the same computer name and IP,  it just creates a new entry with a unique identifier during installation.  So now in the management console I have duplicate entries of the same computer name and it uses up two licenses now until I delete the old entry.

Share this post

Link to post
Share on other sites

Hi Steve,

To clarify, the management console that you're referring to above is for the antivirus software, correct? You're not speaking of the SmartDeploy console? I just wanted to make sure there wasn't a secondary issue here with extraneous SmartDeploy licenses being consumed, since that definitely shouldn't happen when you reimage the same computer over and over.

Unfortunately, there's not really a practical option for this from a deployment standpoint. We do allow command-line tasks to be run during the "PREIMAGE" phase in WindowsPE - this occurs right before the image is applied. However, running a software uninstall operation in WindowsPE wouldn't work, as this needs to be done in the full Windows OS. The SmartDeploy client isn't designed to run any additional tasks before the device reboots into WindowsPE - it simply downloads the boot image and then reboots into it.

I would suggest you reach out to your antivirus software vendor - given that they have a management console that allows you to monitor your installations of their software, they may have an option for remote uninstallation as well. Beyond that, I suppose your only other option would be to use Group Policy to run the uninstall command as a scheduled task (to occur immediately), applied to that specific computer - or to uninstall the antivirus manually before initiating deployment.


SmartDeploy Support

        888.7DEPLOY    toll-free





        Learn about our award winning

        Windows deployment solutions



        Twitter: @SmartDeploy

        Facebook: SmartDeploy

        Spiceworks: Spiceworks


Share this post

Link to post
Share on other sites

Yes I was referring to the Antivirus licensing, not Smart Deploy licensing.

Your response is what I figured.  Thank you.

Share this post

Link to post
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