none
Windows 7 sysprep randomly generated name

    Question

  • Hello all,

    Is there a way to add a custom prefix to a randomly generated computer name using sysprep in Windows 7. Example: prefix-xxxxxxxxx. I know this was easily done with sysprep in Windows XP. But with Vista and 7, not so much. Thanks in advance for any responses.

    Monday, November 16, 2009 10:33 PM

Answers

  • Thank you for responding.

    What we are trying to do is deploy Windows 7 using Ghost the same way we were deploying XP. We're going to be changing our method of deployment, so this is just a temporary fix for the time being.

    Yes. I have your solution, but it prefixes the automatically generated number with the username of the local account. Ex: username-xxxxxxxxx. I need a customized prefix like: DepartmentName-xxxxxxxxx. I am working with hundreds of PC's here, and entering a PC name for each really isn't an option. 

    I have found one solution:
    http://www.tsaysoft.com/mysysprep2/

    It allows you to use any prefix (specified in the answer file) followed by the serial of the PC. I wish this functionality was built in to Microsoft's version of sysprep.
    Wednesday, November 18, 2009 2:42 PM
  • Well, I believe I may have finally solved this problem. Here is what I did:

    1. We do not use the local administrator account. Instead we create an account with in the admin group, and leave the built-in admin account locked. (This is done when building the reference computer.)

    2. Skip the user account creation using your sysprep answer file. This seems redundant, but in order to do this you must add the user account that you have already created on the image to "Pass 7 oobeSystem". This component is located in:
     "Microsoft-Windows-Shell-Setup_neutral"
     -->User Accounts
     -->Local Accounts

    3. At this point I ran sysprep. When the machine booted, it had used the first 8 characters of the Registered Owner from the answer file as a prefix to the random computer name. The registered owner component is located in the "Microsoft-Windows-Shell-Setup_neutral" which is also added to pass 7.


    Hope this helps. I have only tested it once. Feel free to ask any questions, and I will try to answer them to the best of my ability.


    Friday, January 29, 2010 4:49 PM

All replies

  • Im not sure if you can get it to psuedo randomly generate a name. You can put an asterisk (*) in for Comptuername and it will automatically create one for you, but this will not give you a prefix.

    Reference this document:
    http://technet.microsoft.com/en-us/library/cc749460%28WS.10%29.aspx

    You could always just leave the option blank and that would be asked during the Windows Welcome screens.
    • Proposed as answer by prytzen Tuesday, November 17, 2009 10:14 PM
    Tuesday, November 17, 2009 10:14 PM
  • Thank you for responding.

    What we are trying to do is deploy Windows 7 using Ghost the same way we were deploying XP. We're going to be changing our method of deployment, so this is just a temporary fix for the time being.

    Yes. I have your solution, but it prefixes the automatically generated number with the username of the local account. Ex: username-xxxxxxxxx. I need a customized prefix like: DepartmentName-xxxxxxxxx. I am working with hundreds of PC's here, and entering a PC name for each really isn't an option. 

    I have found one solution:
    http://www.tsaysoft.com/mysysprep2/

    It allows you to use any prefix (specified in the answer file) followed by the serial of the PC. I wish this functionality was built in to Microsoft's version of sysprep.
    Wednesday, November 18, 2009 2:42 PM
  • Hi all,

    We are facing exactly the same auto computer naming problem. In our case I want to name computers due to the IP that they use. I don't want to use another sysprep tool. (like mysysprep) 
    Is there any way to do this by scripting or variables during sysprep?

    Thanks. 

    Okan
    Monday, November 23, 2009 3:18 PM
  • Well, I believe I may have finally solved this problem. Here is what I did:

    1. We do not use the local administrator account. Instead we create an account with in the admin group, and leave the built-in admin account locked. (This is done when building the reference computer.)

    2. Skip the user account creation using your sysprep answer file. This seems redundant, but in order to do this you must add the user account that you have already created on the image to "Pass 7 oobeSystem". This component is located in:
     "Microsoft-Windows-Shell-Setup_neutral"
     -->User Accounts
     -->Local Accounts

    3. At this point I ran sysprep. When the machine booted, it had used the first 8 characters of the Registered Owner from the answer file as a prefix to the random computer name. The registered owner component is located in the "Microsoft-Windows-Shell-Setup_neutral" which is also added to pass 7.


    Hope this helps. I have only tested it once. Feel free to ask any questions, and I will try to answer them to the best of my ability.


    Friday, January 29, 2010 4:49 PM