justpooped Posted May 8, 2012 Share Posted May 8, 2012 Hi All, I am testing out different Sysprep configurations to get the most complete unattended install I possibly can. Right now I am using the FirstLogon setting to kick off a few scripts needed to install, activate, etc.. I also have a script kicking off in setupcomplete.cmd (but I would like to have a script to delete/remove certain directories, sysprep files, etc).. Basically what I'm trying to figure out is where I should be placing my scripts for the most efficient unattended install and if using logon vs firstlogon commands differs from one another.-Justpooped Link to comment Share on other sites More sharing options...
maxXPsoft Posted May 9, 2012 Share Posted May 9, 2012 (edited) FirstLogonCommands run right before GUI loads so it would be a good place to do things you was asking likeIf you have a password set and it stops on that screen setupcomplete.cmd run's right before that, FirstLogonCommands run after you type password. It works without password also only telling you where they fire off <FirstLogonCommands> <SynchronousCommand wcm:action="add"> <Order>1</Order> <Description>Password Expires False</Description> <CommandLine>cmd /C wmic useraccount where "name='MYUSERNAME'" set PasswordExpires=FALSE</CommandLine> </SynchronousCommand> </FirstLogonCommands>Theres also $OEM$\$$\setup\scripts\oobe.cmd which if prersent executes auto@echo offstart /w regedit /s %systemroot%\setup\scripts\OEMInformation.regdel /F /Q %systemroot%\setup\scripts\OEMInformation.regcall %systemroot%\setup\scripts\slp.cmddel /F /Q %systemroot%\setup\scripts\slp.cmd:Cleanupdel /F /Q %systemroot%\setup\scripts\oobe.cmdHow to create $OEM$ Edited May 9, 2012 by maxXPsoft Link to comment Share on other sites More sharing options...
winoutreach5 Posted May 10, 2012 Share Posted May 10, 2012 When creating a unattend.xml file, Windows System Image Manager (WSIM) is usually the first recommendation. WSIM creates and manages unattended Windows Setup answer files in a graphical user interface (GUI). WSIM is a component of the Windows Automated Installation Kit for Windows 7 (Windows AIK). The download link is included in the provided resource. Also, you can find sample unattend files here.To address your concerns specifically, FirstLogon commands specifies the commands to run the first time a user logs on to the computer which means these commands are run only once. The following is an XML example of how to set first logon commands:<FirstLogonCommands> <SynchronousCommand wcm:action="add"> <CommandLine>c:synccommands\command1.exe</CommandLine> <Description>Description_of_command1</Description> <Order>1</Order> </SynchronousCommand> <SynchronousCommand wcm:action="add"> <CommandLine>c:synccommands\command2.exe</CommandLine> <Description>Description_of_command2</Description> <Order>2</Order> </SynchronousCommand></FirstLogonCommands>LogonCommands specifies commands to run asynchronously when the user logs on. Both of these commands are added to the oobeSystem pass of an XML file. And finally, scripts. First off, it is important to know that by nature the sysprep /generalize command removes unique information from your Windows installation such as system-specific data, including the computer security identifier (SID). To have the sysprep folder removed you might want to follow the steps outlined by jsnyder in this TechNet forums thread. JessicaWindows Outreach Team – IT Pro Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now