@LJedi Hi there, snapins will make your life a lot easier. Once you get the hang of them (and they’re really not that hard) you’ll wonder how you managed without them. The pure joy to be had from deploying a new application to a group of 10’s or 100’s of machines in a couple of clicks and then just getting on with your day is pretty awesome
I tend to forget things so I’ve created myself an idiots guide to most things I come across in FOG-land, snapins being no exception. I’ll outline the bits and pieces I’ve picked up, some of which you may already know.Jbobs answer was pretty succinct. I’m just going to dumb it down a little.
While Jbobs description of snapins as files which get executed remotely is spot on, the real benefit of using snapins is in conjunction with silent switches so the installation happens without your users seeing anything going on. This avoids them having to call the Helpdesk because “some weird screen just popped up on my 'puter!”
First off default FOG installation has a limit set on the size of snapins which can be uploaded to the server. This is configured in the php config file which in CentOS can be found at /etc/php.ini. You want to edit this file and locate these 3 sections and amend from 128M or 100M to 1900M
memory_limit = 1900M
Save the file and restart httpd service to have the changes kick in
service httpd restart
As far as actually creating snapins - the 2 biggest gotchas I found are:
- snapin names can’t have spaces
- uploaded files must be unique
When naming the snapin in the UI either use CamelCase or throw in an underscore to split words up.
The actual executable eg setup.exe is uploaded to FOG server in /opt/fog/snapins directory, not the name you give it in the web UI. The server won’t permit files of the same name in one directory. So if you have multiple versions of an installer for instance or need to create an uninstall snapin, make sure to rename the executable or MSI file so it’s unique. I add a version number or append _install, _uninstall depending on the situation.
I have had greatest success with MSI files. To create a snapin from an MSI file you need to add in the following details.
Snapin name - No spaces
Snapin run with - c:\windows\system32\msiexec.exe
Snapin run with argument use either /i or /x
/i = install
/x = uninstall
Snapin file - upload in .MSI format. If doing an uninstaller as well, amend the file name prior to upload so its different on server.
Snapin arguments - /qn - this is the the “no UI” switch for the MSI installer
Some EXE files which come with well documented silent install switches also work well but you sometimes have to hunt high and low to find the switches or use a bit of trial and error,
We use screenpresso screen capture tool at work and that has decently documented switches. Screenshot of this here. Note that screenpresso downloads always show as just screenpresso.exe - due to dupe file name mentioned earlier I rename this based on version before uploading to FOG.
I’ve never had much joy with deploying .bat or .cmd files via FOG snapin but will be giving that a go again shortly based on Jbobs comment earlier. What I’ve used instead is create the .bat as normal then use BatToExe converter to convert to exe then just add a name and upload the .exe to FOG - all silent switches go in the .bat file so nothing needs added to FOG.
TeraTerm is one such application I’ve deployed in this manner using this code. We have preconfigured keyboard, window and font settings using the keyboard.cnf and teraterm.ini files.
:: script to copy teraterm.exe and config files to temp folder and install from there
:: the /y switch tells xcopy to overwrite file at destination if it already exists.
xcopy /y "\\server-share\TeraTerm\teraterm-4.89.exe" %TEMP%
xcopy /y "\\server-share\TeraTerm\KEYBOARD.CNF" %TEMP%
xcopy /y "\\server-share\TeraTerm\TERATERM.ini" %TEMP%
:: install teraterm using the keyboard.cnf and teraterm.ini files specified
:: lastly move the copied teraterm.ini and keyboard.cnf files into program files directory
xcopy /y %TEMP%\KEYBOARD.CNF "C:\Program Files (x86)\TeraTerm\"
xcopy /y %TEMP%\TERATERM.ini "C:\Program Files (x86)\TeraTerm\"
Save as a bat file, run through BatToExe to output as .exe and upload to FOG and bam - done. Though you may not even need to save as a .exe. I shall test that myself tomorrow.
Give it a go on a test machine and see how you get on - any questions feel free to ask.
Other much more learned and savvy folks will no doubt chime in with even better suggestions or pointers should you need them.