Automating Software Install - One Step?

RyanJ
Beiträge: 2
Registriert: 04 Mär 2009, 05:06

Automating Software Install - One Step?

Beitragvon RyanJ » 04 Mär 2009, 05:13

Hello,

I've read through the various manuals but can't quite seem to figure out what I need to do to make this happen (if it's even possible).

I'd like to get OPSI to automatically install a set of utilities after the OS installation/first boot. I noticed that it automatically installs the preLoginLoader service, but I can't seem to find how to get it to do this with another set of utilities (at least, not without several extra clicks - I'd like it to be COMPLETELY automatic).

For example, I'd like it to:

1) Install OS
2) Install Service Pack for OS (I know this can be done using slipstreaming - I'm just curious from a learning perspective how to do it using scripting in this case)
3) Install office software
4) Join a domain

All without intervention except the adding of the MAC address to the database and then booting the system and letting it go.

Really, showing step 2 of that would be fine, as all others would just be modifications of the same procedure.

Thanks in advance for your help.

Ryan

Benutzeravatar
j.schneider
uib-Team
Beiträge: 1432
Registriert: 29 Mai 2008, 15:14

Re: Automating Software Install - One Step?

Beitragvon j.schneider » 04 Mär 2009, 09:50

Hi,

you only have to edit the file /var/lib/opsi/config/templates/pcproto.ini
This file is the template for new clients.
For example, if you set:

Code: Alles auswählen

firefox = not_installed:setup
python = not_installed:setup

in this file and create a new client, you will notice that these products are automatically set to setup in the products-tab of the newly created client.
If you start the os installation now, all products with action "setup" (or installation status "installed") will get installed after the os install finishes.

Greetings,
Jan Schneider

RyanJ
Beiträge: 2
Registriert: 04 Mär 2009, 05:06

Re: Automating Software Install - One Step?

Beitragvon RyanJ » 07 Mär 2009, 02:16

Thanks for this, it solved my problem.

I am, however, having another... I'll post in a separate post.

Ryan

wardenik
Beiträge: 65
Registriert: 27 Okt 2008, 12:22

Re: Automating Software Install - One Step?

Beitragvon wardenik » 09 Mär 2009, 11:40

RyanJ hat geschrieben:Hello,
1) Install OS
2) Install Service Pack for OS (I know this can be done using slipstreaming - I'm just curious from a learning perspective how to do it using scripting in this case)
3) Install office software
4) Join a domain


2. If you want to get a full upgrade of the OS after the installation, please read a bit on: http://www.wsus.info/. I have actually prepared a working script that updates WinXP after preinstallation. Please check my website at http://www.warden.pl as well, I will post a howto soon about it :-)
3. Installing Office is done using standard MSI package installation commands, please read KB articles that I put in my previous opsi article http://www.warden.pl/2008/11/12/networked-unattended-winxp-installation/
4. Joining a domain is as simple as putting
%ScriptPath%\netdom.exe join %PCName% /Domain:CELLS /UserD:admin /PasswordD:adminpasswd
in any winst script, but you have to get the netdom.exe utility.

wardenik
Beiträge: 65
Registriert: 27 Okt 2008, 12:22

Re: Automating Software Install - One Step?

Beitragvon wardenik » 09 Mär 2009, 12:18

j.schneider hat geschrieben:Hi,

you only have to edit the file /var/lib/opsi/config/templates/pcproto.ini
This file is the template for new clients.
For example, if you set:

Code: Alles auswählen

firefox = not_installed:setup
python = not_installed:setup

in this file and create a new client, you will notice that these products are automatically set to setup in the products-tab of the newly created client.
If you start the os installation now, all products with action "setup" (or installation status "installed") will get installed after the os install finishes.


Wow, this is great, just one question, is it possible to use this also for already existing clients?
I mean, if I want to _reinstall_ a client with a default set of applications.
Would I have to delete and readd the client again?
I can imagine that copying /var/lib/opsi/config/templates/pcproto.ini to <clientname>.ini would solve that issue, but maybe it is possible somehow from the interface itself?

Benutzeravatar
tobias
Beiträge: 1287
Registriert: 20 Aug 2008, 12:36
Wohnort: Braunschweig
Kontaktdaten:

Re: Automating Software Install - One Step?

Beitragvon tobias » 09 Mär 2009, 12:31

hi,

if you reinstall a client with Windows, all products which are already installed on the client (in the Software list Installed) will be reinstalled too.


Tobi
Veröffentliche deine WINST Scripte im OPSI Wiki und leiste so einen wertvollen Beitrag für die Community !!!
https://forum.opsi.org/wiki/

wardenik
Beiträge: 65
Registriert: 27 Okt 2008, 12:22

Re: Automating Software Install - One Step?

Beitragvon wardenik » 09 Mär 2009, 14:37

ah, as simple as that, and I haven't tested that :P
thanks!

Benutzeravatar
wolfbardo
uib-Team
Beiträge: 1202
Registriert: 01 Jul 2008, 12:10

Re: Automating Software Install - One Step?

Beitragvon wolfbardo » 09 Mär 2009, 15:17

Hi wardenik,

wardenik hat geschrieben:ah, as simple as that,


its a feature described in http://download.uib.de/opsi3.3/doku/ops ... v33-en.pdf

5.1.6. Installation of OS and opsi-preLoginLoader
distinction between "reinstallation-mode" and "standard-mode"

ok, there is a small typo mismatch in the doc with "on" vs. "installed", should be

Code: Alles auswählen

"Therefore, regarding the configuration status of each software packet, each packet which is marked as action status ”setup” or installation status ”installed” within the configuration of that client will be installed."


regards
Bardo Wolf


opsi remote-workshops

https://uib.de/de/support-schulung/schulung/

Basis
08.-11.02. 2021
15.-18.03. 2021

Einführung in die Software-Paketierung
20./21.01 2021

opsi support by uib gmbh

http://www.uib.de

cgiesers
Beiträge: 29
Registriert: 22 Feb 2017, 02:11

Re: Automating Software Install - One Step?

Beitragvon cgiesers » 28 Mär 2019, 17:48

In case anyone else stumbles (via google) over this entry: IT DOES NOT WORK!
Link is broken and the entry is incomplete (properties and sections missing) and results into a "broken" OPSI.

The solution is listed here: https://forum.uib.de/viewtopic.php?t=2348

Regards
- Christof

ckruijntjens
Beiträge: 38
Registriert: 01 Mai 2018, 11:02

Re: Automating Software Install - One Step?

Beitragvon ckruijntjens » 18 Apr 2019, 09:13

I tried this solution and it broke my opsi installation.

Even when i empty the file pcproto.ini. When i start a new installation yust before the os selection it errors out.

I recovered with a backup however is there a safer way to do this?