Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

Unattended Files


  • Please log in to reply
9 replies to this topic

#1
crowe80

crowe80

    Newbie

  • Member
  • 39 posts
  • Joined 13-March 12
  • OS:Windows 7 x64
  • Country: Country Flag
I'm struggling with the Unattended.xml file and understanding how it works with Windows 7. I currently save images out on a network share and I'm able to save them and get them off the network when needed, but we are currently on a domain so I need to create an Unattened file to not name a computer the same name, join a domain, etc. So I have created an Unattended file and saved it but from this point I'm not understanding what to do with it. On the PC I want to copy the image of, I saved the file under c:\windows\system32\sysprep I've seen forums where they say to go to an elevated command and type: sysprep /oobe /generalize /unattended:c:\Windows\System32\sysprep\Unattended.xml But it just says "sysprep" is not recognized as an internal or external command.

So I think I understand how to create the .xml file but I"m not sure what to do with it from there?


How to remove advertisement from MSFN

#2
cluberti

cluberti

    Gustatus similis pullus

  • Supervisor
  • 11,253 posts
  • Joined 09-September 01
  • OS:Windows 8.1 x64
  • Country: Country Flag
sysprep is stored in %windir%\system32\sysprep - you must be in that folder to run sysprep to begin with. If you're doing this in a domain for multiple PCs, though, it might make some sense for you to invest some time in learning / setting up MDT in your environment. It handles deployment, applications, drivers, etc.
MCTS Windows Internals, MCITP Server 2008 EA, MCTS MDT/BDD, MCSE/MCSA Server 2003, Server 2012, Windows 8
--------------------
Please read the rules before posting!
Please consider donating to MSFN to keep it up and running!

#3
crowe80

crowe80

    Newbie

  • Member
  • 39 posts
  • Joined 13-March 12
  • OS:Windows 7 x64
  • Country: Country Flag
When I run the command at an elevated prompt it looks like this: C:\windows\System32>sysprep /oobe /generalize /unattended:C:\Windows\System32\Sysprep\Unattended.xml With the unattended file saved at: C:\Windows\System32\Sysprep folder.r

Still getting "\sysprep is not recognized as an internal or external command. operable program or batch file." error

Unfortunately it's not the best way we keep images but currently this is the way I have to do it as we have a helpdesk department and a networking department. The helpdesk currently has the responsibility of doing images but we don't have rights to servers. So I currently just have a PC set up on the domain that has nothing on it but an operating system and thats where I save all the images I create to. Then I create boot up disc for the rest of the helpdesk and when we need a new device built anyone in the helpdesk can put the disc in and retrieve the image out on this lone PC. So just a quick FYI for why it's set up the way it is. I am working with our networking team on getting a server and doing this differently but as for now I need to find a way to make this work the way it is and I'm really hung up on how to get the unattended file to work after I create it. In XP you would just put the answer file in the sysprep folder and run sysprep and it found these settings but I'm not sure how this works in Windows7. I've read and seen a lot on unattended files but mainly it's just how to create one, it doesn't say what to do with it after it's created.

#4
Tripredacus

Tripredacus

    K-Mart-ian Legend

  • Super Moderator
  • 10,006 posts
  • Joined 28-April 06
  • OS:Server 2012
  • Country: Country Flag

Donator

When I run the command at an elevated prompt it looks like this: C:\windows\System32>sysprep /oobe /generalize /unattended:C:\Windows\System32\Sysprep\Unattended.xml With the unattended file saved at: C:\Windows\System32\Sysprep folder.r

Still getting "\sysprep is not recognized as an internal or external command. operable program or batch file." error


Sysprep is in a folder called Sysprep. Try this:

C:\windows\System32\sysprep>sysprep.exe /oobe /generalize /unattended:C:\Windows\System32\Sysprep\Unattended.xml

MSFN RULES | GimageX HTA for PE 3-5 | lol probloms
tpxmsfn1_zps393339c1.jpg

#5
crowe80

crowe80

    Newbie

  • Member
  • 39 posts
  • Joined 13-March 12
  • OS:Windows 7 x64
  • Country: Country Flag
This got me farther but I'm getting a box popping up now that I believe is basically telling me there is a syntax error. It seems to be fine until I type in the /Unattend:C:\Windows\System32\Sysprep\Unattened.xml line.

The box that pops up says:

Sysprep

USAGE:sysprep.exe [/quiet] [/generalize] [/audit | /oobe] [/reboot | /shutdown | /quite] [/unattend:<filename>]

If no command-line arguments are provided, a graphical user interface is used to select the desired mode of sysprep operation.

#6
Tripredacus

Tripredacus

    K-Mart-ian Legend

  • Super Moderator
  • 10,006 posts
  • Joined 28-April 06
  • OS:Server 2012
  • Country: Country Flag

Donator

Yes sorry you are missing the switch to tell sysprep how to exit.

/shutdown
/reboot
/quit

One of those are needed. I usually use /shutdown just so I can make sure that I don't accidently reboot into the image again.
MSFN RULES | GimageX HTA for PE 3-5 | lol probloms
tpxmsfn1_zps393339c1.jpg

#7
crowe80

crowe80

    Newbie

  • Member
  • 39 posts
  • Joined 13-March 12
  • OS:Windows 7 x64
  • Country: Country Flag
Yes I had tried that but still get the error. So I've tried the following with the same error each time:

sysprep.exe /oobe /generalize /shutdown /unattend:C:\Windows\System32\Sysprep\Unattended.xml


sysprep.exe /generalize /oobe /shutdown /unattend:C:\Windows\System32\Sysprep\Unattended.xml


I'm still looking into this but if anyone has suggestions, I will gladly take them.

Edited by crowe80, 23 April 2012 - 11:47 AM.


#8
cluberti

cluberti

    Gustatus similis pullus

  • Supervisor
  • 11,253 posts
  • Joined 09-September 01
  • OS:Windows 8.1 x64
  • Country: Country Flag
You can also run without the /unattend switch - as long as unattend.xml is there in Windowssystem32sysprep when the image comes up next, it'll be used. Make sure the answer file validates without errors in WSIM first though, of curse, before using it :).

Sent from my SGH-i917 using Board Express
MCTS Windows Internals, MCITP Server 2008 EA, MCTS MDT/BDD, MCSE/MCSA Server 2003, Server 2012, Windows 8
--------------------
Please read the rules before posting!
Please consider donating to MSFN to keep it up and running!

#9
crowe80

crowe80

    Newbie

  • Member
  • 39 posts
  • Joined 13-March 12
  • OS:Windows 7 x64
  • Country: Country Flag
I got it working! After I got pointed in the right direction the last part of it was user error!! I named my file "Unattended.xml" but I kept calling it "Unattend.xml" in my command line. Just got in too big of a hurry and was not catching that. Thanks to everyone who helped!

#10
Ryuu924

Ryuu924
  • Member
  • 1 posts
  • Joined 13-September 12
  • OS:none specified
  • Country: Country Flag
I am suffering a similiar issue. I am tryign to prep some windows 7 machines for deployment in a lab. In that lab students will log in using their AD (active Directory) accounts. I would like, when a student to log in, for the computer to create an accoutn that mimics the default (administrator) in format and setup. I was told that sysprep will do this, however I am receiving the same errors that Crowe was, and changing my syntax did not fit it. I have stored my unattended.xml in the sysprep folder and I am making no progress whatsoever. Any thoughts or ideas? if I can offer any more information i will be glad too.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users