How to: Make a simple snapin-Start to finish
-
CONTINUING FROM THE FIRST POST
[B]STEP 6: Making the SFX installer[/B]
Go ahead and launch SFX Maker. On the first screen it will ask you which file you want to include. This is the 7zip archive we made in the last step. So hit the plus icon and navigate to the SFX Adobe folder where archive is.[IMG]http://i1107.photobucket.com/albums/h386/andyroo54/7.jpg[/IMG]
Now move to the “General” Tab at the top. Set the extraction path to a temporary folder. Make sure you choose “hide extraction progress” and “delete the SFX file after extraction”.
[IMG]http://i1107.photobucket.com/albums/h386/andyroo54/8.jpg[/IMG]
Now move to the “Icon” tab. Here you can choose which Icon you want. You can also make your own icons and copy them to the “resources” folder in the SFX Maker directory. To make an .ico file you can use this free program:
[url]http://www.321download.com/LastFreeware/page40.html#IcoFX[/url][IMG]http://i1107.photobucket.com/albums/h386/andyroo54/9.jpg[/IMG]
Now move to the “Execute” Tab. [B]This is important[/B], this is the path to the file that we want the SFX Maker to run after it is extracted on the machine. In this case we want to use this path:
%%T\Install.cmd
This will follow the temporary path where the SFX is extracted to, and run our command to install adobe.[IMG]http://i1107.photobucket.com/albums/h386/andyroo54/10.jpg[/IMG]
Now choose “Make SFX” at the bottom right of the window. That’s it! Make sure you test the SFX thoroughly. If it works then you can upload the Snapin to FOG for deployment.[B] REMEMBER:[/B] The finished SFX will delete itself after being extracted, so make sure you make a copy somewhere or else you will have to repeat step 6.
Select “New snapin” from the snapin Menu.
[IMG]http://i1107.photobucket.com/albums/h386/andyroo54/11.jpg[/IMG]
Now you can add the details and then browse to the location, then click add! All done!
[IMG]http://i1107.photobucket.com/albums/h386/andyroo54/12.jpg[/IMG]
This guide is intended as a loose guide only for people new to FOG and snapins. This is just the way I do it and I haven’t had any problems. You can get as creative as you like with your snapins, you could for example get the .cmd script to check for older versions of Adobe reader and ask it to uninstall them before installing the new version. In this example I used an .exe for Adobe, but you can also use .msi installers, just update the script to use “msiexec” and change the quiet switches. I’ve tried to keep it straight forward and simple. The only limit is your imagination!
Another useful site is App Deploy. Lots of great information for deploying specific software.
[url]http://www.appdeploy.com/[/url]I’m still by no means an expert, but I hope this might help someone in a similar situation to what I was a few months back. Feel free to post comments I will try to answer them if I can.
Thanks and goodluck![quote=“andyroo54, post: 1271, member: 267”]Hi,
When I started I couldn’t find much information on the process. There is a lot of information but I couldn’t find any guides as such for total newbies. So now that I’ve got the hang of it I thought I’d make one for others new to FOG and Snapins. I have attached the guide as a PDF, or you can read below.I hope it is easy to understand, and believe me it gets easier very quickly the more you do.
Thanks for looking.[/quote]
-
this article looks great, I have just deployed FOG on our network and this was going to be the next stage, thanks for sharing!!
-
Good article.
-
Very well done
-
can snapins be deployed at anytime, or only after an image has taken place?r
if its the latter then all software i use is in the updated image anyway, but it would be good to deploy software mid term (without Imaging)
-
You can deploy them anytime. They are very useful, once you have made the package, you can use it to install the program on any machine that has been imaged, whenever you want. You can also use them by running them yourself on machines that haven’t been imaged. I use them all the time in this fashion. I usually only deploy snapins while imaging from FOG, usually once PC’s are out and deployed I will just run the SFX manually by running it from a server file share.
-
Thanks Andyroo54 - another great article. I’ve started building an image per your WIN7/SAD tool doc, next I’ll try the snapin method you outlined above. I don’ suppose you’ve had any luck with snapins for JAVA RTE have you?
-
This post is deleted! -
danuel please read the documentation on the fog user guide. You failed to modify apache to accept larger snapins.
[url=“http://www.fogproject.org/wiki/index.php?title=Managing_FOG#Snap-ins”]www.fogproject.org/wiki/index.php?title=Managing_FOG#Snap-ins[/url]
-
[quote=“Al@akuni, post: 2917, member: 250”]Thanks Andyroo54 - another great article. I’ve started building an image per your WIN7/SAD tool doc, next I’ll try the snapin method you outlined above. I don’ suppose you’ve had any luck with snapins for JAVA RTE have you?[/quote]
No sorry i don’t use Java. With SFX with cmd line scripting I’ve never come across an application I couldn’t install. And the way installers are going they are only going to get easier to execute silently.
-
Hi thought this might help people. If you are using both Windows 7 32 bit and 64 bit, and the installer has two versions (32 and 64) you can use this simple script to determine OS. Because only windows 7 64 bit has this directory:
“C:\Program Files (x86)”
Then the script can check this and know the machine is 64 bit. Maybe it’s not a very technical way of doing it but it works just fine. So below is a script you can use, just copy and paste it into a .cmd file.
:::::::::::::::::::::::::::::::::
@ECHO OFFif not exist “C:\Programdata” goto XP
if exist “C:\Program Files (x86)” goto METHOD2
if exist “C:\Program Files” goto METHOD1::::::::::::::::::::::::::::::::::
CLS:METHOD1
Color 1F
CLS
@ECHO 32 BIT OS DETECTED…INSTALLING BLANKSLEEP.exe 5
START BLANK.EXE
goto :FINISH32
::::::::::::::::::::::::::::::::::
:METHOD2
Color 4F
CLS@ECHO 64 BIT OS DETECTED…INSTALLING BLANK.EXE
SLEEP.exe 5
goto :FINISH64
::::::::::::::::::::::::::::::::::
:XP
Color 9F
CLS@ECHO XP OS DETECTED…INSTALLING BLANK.EXE
SLEEP.exe 5
goto :FINISHXP
::::::::::::::::::::::::::::::::::
:FINISH32
Color 1F
CLS@ECHO Installed BLANK!
SLEEP.exe 5
EXIT
::::::::::::::::::::::::::::::::::
:FINISH64
Color 9F
CLS@ECHO Installed BLANK!
SLEEP.exe 5
EXIT
::::::::::::::::::::::::::::::::::
:FINISHXP
Color 5F
CLS@ECHO Installed BLANK!
SLEEP.exe 5
EXIT
::::::::::::::::::::::::::::::::::
-
Just another example for you.
This is another simple one, being google earth.
All I want it to do is install Google earth for any user. I’ve tested this installer and luckily it works on XP/win 7x32/64.
So first I found an installer. You can download full offline installer version 6.2 here:Then you need to unzip that exe, it will then extract the ‘real’ installer file.
Now use this script and put it in the same directory as the googleearth.exe along with sleep.exe.
You can use the script below, just copy and paste it into a .cmd file.
::::::::::::::::::::::::
@ECHO OFF
Color 1A
@ECHO Installing Google EarthSLEEP.exe 5
START /wait GoogleEarth.exe /S /v/qn /V"/qn ALLUSERS=1
SLEEP.exe 5
CLS
@ECHO Google Earth Installed…SLEEP.exe 5
EXIT
::::::::::::::::::::::::You can also hide the script if you don’t want people to be able to close it, but if you are deploying the SFX from FOG, windows 7 will actually hide the script anyway.
Now follow the earlier instructions to .7z it and make an SFX!
Thanks,
-
thanks for the share, still haven’t got around to trying snapins yet but i’m with the info above this should be quite easy to get working.
START /wait GoogleEarth.exe /S /v/qn /V"/qn ALLUSERS=1
say i wanted to deploy something else is it as simple as changing googleearth.exe to the exe that i want?
-
[quote=“falko, post: 4173, member: 48”]thanks for the share, still haven’t got around to trying snapins yet but i’m with the info above this should be quite easy to get working.
START /wait GoogleEarth.exe /S /v/qn /V"/qn ALLUSERS=1
say i wanted to deploy something else is it as simple as changing googleearth.exe to the exe that i want?[/quote]
It depends on the installer. But yes most are easy.
START /Wait means the installer will start, and the cmd script will wait for the process to finish before moving on in the script.
The /S is a switch to install it silently. /Qn will make it non interactive.
So it varies, also running .msi is a little diff, you have to have msiexec instead of “START”. Read this page for more info:
[url]http://unattended.sourceforge.net/installers.php[/url]
But you will find you don’t have to change much. See this one for FileZilla, it’s basically the same as google earth:
::::::::::::::::::::::::
@ECHO OFF
Color 4F
@ECHO Installing FileZillaSLEEP.exe 5
START /wait FileZilla3.5.3.exe /S /v/qn
SLEEP.exe 5
CLS
@ECHO FileZilla Installed…SLEEP.exe 5
EXIT
::::::::::::::::::::::::But then you might want registry entries after the install, check out the original adobe reader because that contains registry entries.
I just updated Adobe reader because for some strange reason on some machines it wouldn’t printer colour…?? Anyway check out the new adobe reader script:
::::::::::::::::::::::::
@ECHO OFF
Color 4F@ECHO DO NOT CLOSE THIS WINDOW
@ECHO Installing Adobe Reader X 3.1.2…
START /wait Reader.exe /msi EULA_ACCEPT=YES /qn
SLEEP.exe 5
::::::::::::::::::::::::
CLSREGEDIT /S Disable_protected.reg
SLEEP.exe 1
REGEDIT /S Disable_updates.reg
SLEEP.exe 1
REGEDIT /S Units_to_CM.reg
SLEEP.exe 1
REGEDIT /S EULA.reg
CLS
@ECHO INSTALLED ADOBE READER X!
SLEEP.exe 5
EXIT
::::::::::::::::::::::::
If you have any problems I’ll help if I can. A good site resource is Appdeploy.com too. Just recently got renamed to: [url]http://www.itninja.com/[/url]
-
When I follow these directions and test the snap in I get a 7-ZIP SFX archive error message. In the %temp% folder of the target host a folder called 7ZipSfx.000 is created and all the files are extracted as per above. If I click on the install.cmd within this folder adobe reader installs fine, any help is appreciated.
-
AGGGG, silly error on my part. I placed all of the files into a folder and then archived the folder. Once I put all files into the archive, not a folder before hand I deploy and it installs great!
-
[quote=“Axel, post: 4576, member: 686”]AGGGG, silly error on my part. I placed all of the files into a folder and then archived the folder. Once I put all files into the archive, not a folder before hand I deploy and it installs great![/quote]
Hi Axel glad you figured it out!
-
Thanks for sharing! The stuff with 7zip and SFX maker is definitely helpful.
Another thought to add about determining whether or not a computer is running 64 or 32bit, I’ve used these lines (in batch script):
IF %processor_architecture% == x86 (for 32 bit)
IF %processor_architecture% == AMD64 (for 64 bit clients)
IF %processor_architecture% == IA64 (for 64 bit servers)I doubt many people (if any) would ever feel the need to change the Program Files environment variable, though, so I’m sure your check works great too!
-
so, what would it be for an msi file, I made a script and used start and the msi worked fine! was I just lucky? I realized that I needed to use msiexec.exe but forgot and ran the script before hand and it worked!
would I just change start to msiexec /i -
and, what if I want to package several .msi files in to this self executable, and have this script install them one after another, will it wait for each one to finnish, or will I have to use that sleep file.