Seite 1 von 1
How postinst scripts work?
Verfasst: 26 Nov 2009, 12:54
von paja
Hi,
I am trying to understand how postinst scripts for windows 7 work. I thought that it is necessary to create XX_name.cmd file in postinst.d directory and it will be executed automatically. But nothing happened. Just for test, I have tried to create directories from existing scripts (add line md c:\test) and nothing happened again. In the next step, I have tried to add a task into unattend.xml, also without any result.
My question is: how can I create and run postinst scripts?
Thank you.
Pavel
Re: How postinst scripts work?
Verfasst: 26 Nov 2009, 15:01
von d.oertel
Hi,
did you read the opsi manual (chapter 7.1.8.4. Directory opsi / custom) ?
regards
d.oertel
Re: How postinst scripts work?
Verfasst: 01 Dez 2009, 16:02
von paja
Yes, I did and the only thing I know is that there is no C:\tmp directory is present on my disk and there are also no registry entries. I thought that the scripts are run automatically but they don't or they do not write any log messages

Re: How postinst scripts work?
Verfasst: 01 Dez 2009, 19:51
von d.oertel
Hi,
I thought that it is necessary to create XX_name.cmd file in postinst.d directory and it will be executed automatically.
This is correct.
If nothing happens - we have to debug the problem:
- These files should be in the custom/postinst.d directory
- Are these scripts readable for the unix group pcpatch ?
- There should be a 'postinst.scripts' file in c:\tmp. Is your script listed there ?
- If you want that your scripts logs to the c:\tmp\postinst.log, look like this is done in our scripts.
does this help ?
d.oertel
Re: How postinst scripts work?
Verfasst: 02 Dez 2009, 09:59
von paja
- These files should be in the custom/postinst.d directory
There is 11_do_it.cmd script, which has the only line "md C:\test2"
- Are these scripts readable for the unix group pcpatch ?
Yes, they have the same owners as the other files in /opt - opsiconfd and pcpatch.
- There should be a 'postinst.scripts' file in c:\tmp. Is your script listed there ?
- If you want that your scripts logs to the c:\tmp\postinst.log, look like this is done in our scripts.
There is no c:\tmp directory on the computer after installation.
Thank you for your time.
Pavel
Re: How postinst scripts work?
Verfasst: 02 Dez 2009, 12:16
von paja
It works! There was some error in unattend.xml file and no error was thrown. I have tried to prepare new unattend.xml and now are all the scripts run properly.
Pavel