How to: Make a simple snapin-Start to finish
-
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.
-
Hmmm… So I’ve been trying to deploy/execute vbscript using 7zip SFX – and it runs perfectly (.vbs wrapped in a .7 wrapped in a .exe, set to extract to the temp folder and execute the .vbs either directly or through a .bat file that calls cscript.exe), but after it completes, Windows always complains, saying “This program may not have installed correctly.”
Does anyone have any experience with this? So far all I’ve found is a shotgun approach of disabling the program compatibility message for [I]everything[/I] via group policy, and I’d rather not do that.
-
[S]Maybe this is a dumb question but how do you hide the script?[/S]
Nevermind. I think I figured it out!
[quote=“andyroo54, post: 4164, member: 267”]Just another example for you.
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.
Thanks,[/quote]