Archive: How to install using control panel with nsis?


How to install using control panel with nsis?
It is possible to do that with nsis?
To install IIS 6.0 using Control Panel
1.
In Control Panel, double-click Add or Remove Programs.

2.
Click Add/Remove Windows Components.

3.
In the Components list box, click Application Server, and then click Details.

4.
In the Subcomponents of Application Server box, click Internet Information Services (IIS).

5.
Click OK to start the installation of IIS 6.0.


You can do this with sysocmgr (standard windows tool (at least in Win2000 / winXP))
See following for a short example:

; Create install config ini
WriteINIStr "$TEMP\ocm.ini" "Components" "iis_ftp" "on" ; Add iis to install
WriteINIStr "$TEMP\ocm.ini" "InternetServer" "PathFTPRoot" "$PathToFTPRoot"
; Following is to prevent the annoying "Select installation Media" dialog
WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Setup" "SourcePath" "c:"
ExecDos::exec 'reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup" /v "Installation Sources" /d "..." /t REG_MULTI_SZ /f' "" ""
WriteRegStr HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" "SourcePath" "c:"
; Call sysocmgr to install iis
ExecDos::exec 'sysocmgr /i:"$WINDIR\inf\sysoc.inf" /u:"$TEMP\ocm.ini" /r' "" ""
Pop $1
Delete "$TEMP\ocm.ini"
See http://www.appdeploy.com/packages/detail.asp?id=318 for detailed info.

(on windows xp)
Very strange:

If i run without script (windows cd is not required)!
if i run with script (windows cd is required)?!?!?

it is not from this line
;WriteINIStr "$TEMP\ocm.ini" "InternetServer" "PathFTPRoot" "$PathToFTPRoot" !
:igor:

It is from iis details!How to set to install all details from iis?!?


The Windows CD is required to install new components like IIS.
The example assumes that the contents of the XP installation CD is in c:\i386 (which is default for a HP computer with WinXP Pre-installed)


This is to select iis:
WriteINIStr "$TEMP\ocm.ini" "Components" "iis_ftp" "on" ; Add iis to install
but how to add all iis details(iis have some options and they are not select all)?


Ah OK.
Look under "Notes" on the link I provided before.
There you will find all options you can set in the ocm.ini file.