gnoremac Posted May 14, 2004 Share Posted May 14, 2004 I am not sure if it is possible but can I somehow get the unattend file to grab a computername from a file or place other then in the file itself? I am tring to make a script that will ask a few questions then do a total unattended install. At the moment the install stops to ask for the computername but if it could look in a set directory for a file that I have set before initiatiing the install that would be great. I am using a winPE disk and doing the install from a network share. Any help would be great....thanks Link to comment Share on other sites More sharing options...
maui Posted May 14, 2004 Share Posted May 14, 2004 Hi, I'm currently busy with a small program which will add a few features to the unattended installs, i call it 'useradd' at the moment, and it's first meaning was to easy create users and groups with an unattended install. I will checkout if it's possible to add the computer's name (and workgroup) with it, maybe even hanging the computer in a domain? It's not 100% finished yet (the productkey option doesnot work).It's very easy you just make an ini file and put it on floppy, the inifile looks like this:[WINDOWS]PRODUCTKEY=type here the wanted product key ! XP Volume licensing only !!ADMINPASSWORD=type here the wanted administrator password[GROUPS];GroupName=Group DescriptionMyFirstGroup=This is my first groupMySecondGroup=This is my second group[uSERS];username=password[,fullname,description]MyFirstUser=MyPassWord,My First User, This Is My First UserMySecondUser=MyPassWord,My Second User, This Is My Second User[GROUPUSERS];groupname=user1,user2,user3,...MyFirstGroup=MyFirstUser,MySecondUserMySecondGroup=MySecondUserYou then put the useradd.exe in the $oem folder, and refer to it from the cmdlines.txt file, like this:[COMMANDS]"useradd.exe" The program will check all available drives for a x:\users.ini and process the options found on it. Users and Groups allready work, even the Administrator Passworrd. I will check this weekend for the computername etc. Link to comment Share on other sites More sharing options...
maui Posted May 16, 2004 Share Posted May 16, 2004 Ok, it's in (computername), i'm gonna find out for the description also.You can find it on: http://home.hccnet.nl/mvanrijnen/pages/useradd Link to comment Share on other sites More sharing options...
[BM]Crusher Posted May 16, 2004 Share Posted May 16, 2004 This topic has been done before hereBasically, if you know the MAC address of each computer's primary network card, you can use the following batch file:ECHO.ECHO Setting Computer NameECHO Please wait...for /f "tokens=1" %%i IN ('compname /d ?m') do set MAC=%%iIF %MAC% == 123456789012 compname /c SCRAPHEAPIF %MAC% == ABCDEFGHIJKL compname /c SANDBOXIF %MAC% == 11AA22BB33CC compname /c STELLARI hope this helpsIf you only want to set the computer name for just the one computer (meaning the disk will always set the computer name you want) just add the setting into your winnt.sif! and if you want it to set up user accounts, it can be done very easily with a short batch file run from cmdlines.txtaddusers.cmdnet user "Username 1" a_password /addnet localgroup Administrators "Username 1" /addnet user "Username 2" another_password /addnet localgroup Administrators "Username 2" /addor if you want you can have it ask you what user name to addset /p username=Enter a username: set /p password=Enter a password: net user "%username%" %password% /addnet localgroup Administrators "%username%" /addSetting computer name via batch file:set /p comp=Enter the Computer Name you want: compname /c %comp% Link to comment Share on other sites More sharing options...
maui Posted May 17, 2004 Share Posted May 17, 2004 Ok, but now you have al kinds of things on your unattended cd. I plan to use my little tool so i need only 1 unattended CD, and put all kinds of simple configuration options on a file on floppy disk. So if i have to install a computer, just have to edit the 'users.ini', and boot the CD. I will take a look to automate computernaming (random or bases on MAC). Maybe i'll put in a naming service, so you can have a db on the backend, the installation connects with the db and give's the computer the name as specified in the db. So the sysadmin can set this things from his chair. Identification would be done bases on MAC then. Link to comment Share on other sites More sharing options...
enuffsaid Posted May 17, 2004 Share Posted May 17, 2004 removed Link to comment Share on other sites More sharing options...
gnoremac Posted May 17, 2004 Author Share Posted May 17, 2004 The T12 time is after a computer is added to a domain so some funky computer name will be added and then changed when the util is ran. That would mess up my AD big time....I will give it a shot though... Link to comment Share on other sites More sharing options...
mbouchard Posted May 17, 2004 Share Posted May 17, 2004 gnoremac,How are you kicking off the setup? Via DOS boot disk? WinPE? or booting to the WinXP CD? etcMike Link to comment Share on other sites More sharing options...
gnoremac Posted May 17, 2004 Author Share Posted May 17, 2004 WinPE and a network distribution via an unattend batch file.... 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