Jump to content

Recommended Posts

Posted

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 - ICT034

if computername=ICT* then

REG ADD %KEY%\020 /VE /D "Installing some program" /f

REG ADD %KEY%\020 /V 1 /D "V:\someprogram.exe" /f

end if

REM for computer named LRC001 - LRC022

if computername=LRC* then

REG ADD %KEY%\020 /VE /D "Installing some other program" /f

REG ADD %KEY%\020 /V 1 /D "V:\someotherprogram.exe" /f

end if

Before I delve into Google, I was hoping somebody may be able to answer this.

Cheers.


Posted

You could try this.

@echo off

if "%ComputerName:~0,3%"=="MAG" (
 echo Installing apps for MAG001 - MAG099
rem  REG ADD %KEY%\020 /VE /D "Installing some program" /f
rem  REG ADD %KEY%\020 /V 1 /D "V:\someprogram.exe" /f
)

if "%ComputerName:~0,3%"=="ICT" (
 echo Installing apps for ICT001 - ICT034
rem  REG ADD %KEY%\020 /VE /D "Installing some program" /f
rem  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.

Posted

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 beginning

3.) 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

Posted

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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...