We help IT Professionals succeed at work.

How to get a VB script to run from an Unattend.xml file

brookesm
brookesm asked
on
Hi All,

I am trying to prepare my windows 7 machines for delpoyment using sysprep and unattend.xml file. I have had some issues joining the machines to the domain so have resorted to using a vb script to do it which works really well, the only problem is I want it to run on first logon or on startup. I have an administrator account (local) on the machine which runs the script fine and I have put into my xml file the following:

            <FirstLogonCommands>
                <SynchronousCommand wcm:action="add">
                    <CommandLine>C:\Join_Domain</CommandLine>
                    <Order>1</Order>
                </SynchronousCommand>
            </FirstLogonCommands>

under the "Microsoft-windows-Shell-Setup section, however it doesn't run it. Can anyone tell me where I am going wrong?

Thanks

Natalie
Comment
Watch Question

Commented:
Have you tried launching your vbs from a bat file?
How about adding a shortcut to the file in either the startup folder in either the administrator profile or the default user profile. Then append the script to delete the shortcut after it has run it. Add this in beofre syspreping, then it should be good to go after initial boot.
I recently found a great solution to windows deployment. If you are using a method that requires you to sysprep/capture/deploy, your method is out of date and could be potentially unsafe.

I use what's called the 'Windows Deployment Toolkit 2010'. This toolkit does a PXE boot clean install of Windows, does not require you to capture an image, the dangers of sysprep are gone, and automation and efficiency increase.
There is no need to create an unattend file, it does this for you. After it deploys the OS, it runs a wizard that automatically installs programs and runs scripts that you preset and uploaded to the server. Using this toolkit, I transformed 2 hours of computer customizations to each machine into 15 minutes or less. I highly recommend that you research and implement this toolkit in your working environment.

Simply go to google and search for 'Windows Deployment Toolkit 2010'.

Best of luck,

Kody
I believe that my solution should be the accepted solution, because it is a working solution that I put a lot of thought and detail into.
I believe that my solution should be the accepted solution, because it is a working solution that I put a lot of thought and detail into. My answer on this question is the same as my accepted answers on several others of the same nature.

Author

Commented:
Running it from a bat file worked!!!