dreamtime Posted January 11, 2005 Posted January 11, 2005 With help from others on this forum, I have successfully created an unattended network install system using boot floppy and dos prompts. This has already saved me time - thanks!There is one additional setting that would make everything go even smoother....I have three seperate rooms (I work in a school) that require different sets of software. Is there a way to edit the runonceex.cmd file to include if..then type statements which look to the computer name to decide what to add into the registry....For example...REM for computers named ICT001 - ICT034if computername=ICT* thenREG ADD %KEY%\020 /VE /D "Installing some program" /fREG ADD %KEY%\020 /V 1 /D "V:\someprogram.exe" /fend ifREM for computer named LRC001 - LRC022if computername=LRC* thenREG ADD %KEY%\020 /VE /D "Installing some other program" /fREG ADD %KEY%\020 /V 1 /D "V:\someotherprogram.exe" /fend ifBefore I delve into Google, I was hoping somebody may be able to answer this.Cheers.
Dahi Posted January 11, 2005 Posted January 11, 2005 You could try this.@echo offif "%ComputerName:~0,3%"=="MAG" ( echo Installing apps for MAG001 - MAG099rem REG ADD %KEY%\020 /VE /D "Installing some program" /frem REG ADD %KEY%\020 /V 1 /D "V:\someprogram.exe" /f)if "%ComputerName:~0,3%"=="ICT" ( echo Installing apps for ICT001 - ICT034rem REG ADD %KEY%\020 /VE /D "Installing some program" /frem REG ADD %KEY%\020 /V 1 /D "V:\someprogram.exe" /f)For details about how the ~0:3 stuff works, type "SET /?" at a command prompt.
Martin Zugec Posted January 11, 2005 Posted January 11, 2005 2Dreamtime: this is the solution for schools:1.) create list of computers with MAC adresses and classroom (e.g. PC1xx is form 1st classrom, PC2xx is from second classroom etc.)2.) use set2var and install PC with name from beginning3.) create packages for classrooms and call them by the PC name (e.g. if PC is from 1st classroom (PC1xx is PC name mask), call class1.bat
dreamtime Posted January 11, 2005 Author Posted January 11, 2005 Yep Dahi,That did it!Much appreciated.Soulin, thanks for your solution. It is probably a better system than mine, but the RunOnceEx using if loops will be sufficient for my needs at this time. Cheers.
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