How to: Make a simple snapin-Start to finish



  • 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!



  • 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.


  • Moderator

    [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 FileZilla

    SLEEP.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

    ::::::::::::::::::::::::
    CLS

    REGEDIT /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]


  • Moderator

    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?


  • Moderator

    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:

    [url]http://www.mostiwant.com/blog/free-download-google-earth-6-2-full-version-offline-standalone-setup-installer/[/url]

    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 Earth

    SLEEP.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,


  • Moderator

    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 OFF

    if 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 BLANK

    SLEEP.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

    ::::::::::::::::::::::::::::::::::


  • Moderator

    [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.



  • 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]



  • This post is deleted!


  • 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?


  • Moderator

    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.


  • Moderator

    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)


  • Developer

    Very well done



  • Good article.


  • Moderator

    this article looks great, I have just deployed FOG on our network and this was going to be the next stage, thanks for sharing!!


  • Moderator

    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]


Log in to reply
 

504
Online

6.3k
Users

13.7k
Topics

129.0k
Posts