This article will detail the procedures about create snapin for FOG with 7-Zip SFX, which re-package iTalc installation tarball for deploy iTale master application (IMA). This skill can also apply for deploy other program installation.
Background
I am now handling a computer lab with FOG. All computers are installed with iTalc client for classroom management during lesson. I have create a single OS image for all computers, but there is an exception for teacher's computer: it should install with IMA but not only client. Basically I have 2 choices:
- Create 2 different OS image: 1 for all student computer where the other for teacher computer ONLY.
This will GREATLY increase my work load in order to keep both image sync with latest update, software and setting. This is the most simple but the most silly solution.
- Clone all computer with single image, and MANUALLY install the IMA for teacher computer after cloning.
From some point of view it is suitable because IMA installation require more steps than usual: I will need to copy the private keys for setup VNS connection, and also deploy pre-configured classroom setup so all student computer will appear in IMA. But this is not a good solution, too. I am not able to use schedule cloning in FOG because I will need to preform manual setup later.
So the best solution should be FOG snapin. Create a snapin with silent install, therefore FOG will automatically deploy it to client once it is ready after cloning. We will also able to deploy single snapin to individual computer whenever required. But there exists a down side too: not every installation file support silent install. Therefore I will need to "re-package" the program for my purpose.
Technical detail
This solution will need some basic skill for both 7-Zip and Windows batch scripting. The idea would be:
- Prepare all required (both original and additional) files for installation under a directory.
- Write a simple batch script with "wrap" the original setup.exe with additional parameter and procedure.
- Package the target directory as 7-Zip archive.
- Write a simple 7-Zip SFX configuration file for the following step.
- Create a 7-Zip SFX archive as final product.
Any down side? Yes, for sure. As this is just a simple "wrapper" of original installer, we will still need to preform some manual setup procedure once the snapin is start. Therefore it is not total "automatically". But the benefit is very simple: you will not need to write a complete installer for re-package, and the procedure is easy for master.
I will comment the benefit of this method as: no additional software installation will be missed (the snapin will remind you), and we don't need to prepare the setup file elsewhere (don't need to keep the CD/setup.exe/etc).
Procedure for IMA re-package
First download iTalc installation tarball from SourceForge and unzip it to somewhere, etc, C:\Download\italc-1.0.9.
Next, copy the exported public key as C:\Download\italc-1.0.9\italc_dsa_key.pub, and start the installation as normal. We will now install IMA as normal. Point the exported public key location as . (a single dot, which means current directory). Before installation complete, click "Save installation settings". It will save the setup procedure as C:\Download\italc-1.0.9\installsettings.xml and so we can reuse it within our own batch script.
We need to private keys for IMA, too. I guess you should already have that with a functional iTalc setup. Copy the keys from C:\Program Files\iTALC\keys to C:\Download\italc-1.0.9\keys. We will copy it to new system with batch script.
(Optional, but strongly suggested) Run iTalc IMA in local computer once, setup the "classroom", and add all required student computers into it. Once complete, copy the setup from C:\Documents and Settings\Administrator\Application Data\iTALC to C:\Download\italc-1.0.9 (both globalconfig.xml and personalconfig.xml). Again, we will copy it to new system with batch script.
Let's create the batch installation script now, e.g. C:\Download\italc-1.0.9\keys\setup.bat:
setup installsettings.xml
mkdir "C:\Program Files\iTALC\keys\private\admin\"
copy keys\private\admin\*.* "C:\Program Files\iTALC\keys\private\admin\"
mkdir "C:\Program Files\iTALC\keys\private\supporter\"
copy keys\private\supporter\*.* "C:\Program Files\iTALC\keys\private\supporter\"
mkdir "C:\Program Files\iTALC\keys\private\teacher\"
copy keys\private\teacher\*.* "C:\Program Files\iTALC\keys\private\teacher\"
mkdir "C:\Program Files\iTALC\keys\public\admin\"
copy keys\public\admin\*.* "C:\Program Files\iTALC\keys\public\admin\"
mkdir "C:\Program Files\iTALC\keys\public\supporter\"
copy keys\public\supporter\*.* "C:\Program Files\iTALC\keys\public\supporter\"
mkdir "C:\Program Files\iTALC\keys\public\teacher\"
copy keys\public\teacher\*.* "C:\Program Files\iTALC\keys\public\teacher\"
mkdir "C:\Documents and Settings\Default User\Application Data\iTalc\"
copy globalconfig.xml "C:\Documents and Settings\Default User\Application Data\iTalc\"
copy personalconfig.xml "C:\Documents and Settings\Default User\Application Data\iTalc\"
mkdir "C:\Documents and Settings\Administrator\Application Data\iTalc\"
copy globalconfig.xml "C:\Documents and Settings\Administrator\Application Data\iTalc\"
copy personalconfig.xml "C:\Documents and Settings\Administrator\Application Data\iTalc\"
You directory should look like this.
Run the script once and check the result. The IMA should install with silent mode.
Now package everything with 7-Zip. I do so with the GUI mode, and you may handle this with what you like. Create the 7-Zip archive as C:\Download\italc-1.0.9.7z.
UPDATE (20090907): I just figure out 7-ZIP SFX Maker v2.0 which may simplify the following task. NOTE: We should prepare the target *.7z file in advance so the above step should still useful; from my point of view, the following steps are quite strict forward, too.
Prepare the 7-Zip SFX configure file as C:\Download\italc.txt:
;!@Install@!UTF-8!
Title="italc-1.0.9"
BeginPrompt="Do you want to install the italc-1.0.9?"
RunProgram="setup.bat"
;!@InstallEnd@!
Download 7-Zip extra package and extract it. Copy the 7zSD.sfx to C:\Download.
Now the final step: combine everything with following command:
copy /b 7zSD.sfx + italc.txt + italc-1.0.9.7z italc-1.0.9.exe
Sample output.
Your directory should now look like this.
Again, check the product by double click and run it. It should prompt up a message before start, and then everything should go on smoothly.
The message prompted
And it is now running automatically.
Create snapin in FOG
Once the re-package is ready, we can now create it as FOG snapin. That is very simple:
- Create a new snapin package in FOG,
Create a new snapin
- Link a host with it,
Link the snapin with a host
- And deploy it.
Deploy snapin in host advance task
The FOG client in target computer will cron check with snapin task, download and start it whenever possible. The rest will just as like as what we test the package within local computer. The installer will start and you should take care of it.
In case of *.msi installer, you should use the following parameters:
- Set Snapin Run With: to the path of msiexec.exe (i.e.:
c:\windows\system32\msiexec.exe)
- Set Snapin Run With Arguments: to
/i
- Set Snapin Arguments: to
/qn
Conclusion
This article guide you though how to repackage software with 7-Zip and simple batch script. It is simple enough so you can apply for any other software, even as simple as starting Firefox installer with FOG snapin. You may also preform more additional task with the batch script, e.g. copy default user setup of Firefox to target computer within FOG snapin, too.
References
http://www.fogproject.org/wiki/index.php?title=FOGUserGuide#Snap-ins
http://www.fogproject.org/wiki/index.php?title=Make_Snapins_Using_FOSS
Recent comments
4 days 4 hours ago
4 days 4 hours ago
6 days 42 sec ago
1 week 4 days ago
1 week 4 days ago
1 week 6 days ago
1 week 6 days ago
2 weeks 45 min ago
2 weeks 2 days ago
2 weeks 6 days ago