How to: Make a simple snapin-Start to finish
-
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] -
[SIZE=3][FONT=Times New Roman][COLOR=#000000] Snapin for Java, Adober Reader and Flash[/COLOR][/FONT][/SIZE]
[SIZE=3][COLOR=#000000][FONT=Calibri]I found this way simpler for myself so I thought I would share it the first part I got from this web site [/FONT][/COLOR][/SIZE][SIZE=3][COLOR=#000000][FONT=Calibri][url]http://d4rkcell.com/archives/929[/url] I tested it with Java 7 update 9 and it works flawlessly, also Adobe Reader XI and Flash 11.5.502.110[/FONT][/COLOR][/SIZE]
[FONT=Calibri][SIZE=3][COLOR=#000000] 1.Launch jre-****-i586.exe by double clicking it. When you see the “Welcome to Java” screen DO NOT click install. Leave the window open and open a windows explorer window.[/COLOR][/SIZE][/FONT][FONT=Calibri][SIZE=3][COLOR=#000000] 2.Browse to C:\Users<USERNAME> where <USERNAME> is the username of the user you are logged in as. in my examples I will use C:\Users\usrsetup. The path you need to get to in this case will be C:\Users\usrsetup\AppData\LocalLow\Sun\Java.[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000] 3.You should see a folder called “jre****″ basically copy this folder to your desktop. Leave the window open.[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000] 4.Go back to the Java setup and close it.[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000] 5.Launch jre--x64.exe and check back in C:\Users\usrsetup\AppData\LocalLow\Sun\Java[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000] 6.You should see a folder called jre_x64, copy this to your desktop alongside the other folder.[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000]For the next part of the process we need to download something called InstEd. This is a free MSI editing program that we will use to disable the updates in the MSI files we just got and placed on the desktop. Once you have InstEd downloaded/installed browse to C:\Users\usrsetup\Desktop\jre**** (remember the username will be different for you). Follow the below instructions.[/COLOR][/SIZE][/FONT][FONT=Calibri][SIZE=3][COLOR=#000000] 7.Right click jre****.msi and select “InstEd It!”. This should launch the InstEd software with the java msi loaded.[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000] 8.In InstEd down the left there is a pane called “Tables” scroll down this list until you see “Property” Click to highlight property. This should show some content in the main pane.[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000] 9.In the main pane search for AUTOUPDATECHECK and change this from a 1 to a 0. This should stop java from auto-updating when it is installed. There also appears to be a property called JAVAUPDATE, change this from a 1 to a 0 as well just to cover all bases. Finally there is a property called JU, this needs to be changed from a 1 to a 0 as well.[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000] 10.Once all properties have been changed you just simply click File > Save As and choose something like jre****_noupdate.msi. I usually save it in the folder jre****. This will leave you with two MSI files. Jre****.msi and jre****_noupdate.msi.[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000] 11.Repeat this process in C:\Users\usrsetup\Desktop\jre****_x64. The filename here for the MSI file is the same as the filename for x86 so I always rename jre****.msi to jre****_x64.msi and edit this saving it as jre****_x64_noupdate.msi[/COLOR][/SIZE][/FONT]
[SIZE=3][COLOR=#000000][FONT=Calibri]12. Now start up SFXMaker 1.2 Final Click on the Directory Tab[/FONT][/COLOR][/SIZE]
[SIZE=3][COLOR=#000000][FONT=Calibri]13. Directory Path is C:\Users\usrsetup\Desktop\jre**** or jre****_64[/FONT][/COLOR][/SIZE]
[SIZE=3][COLOR=#000000][FONT=Calibri]14. File to Run is jre****_noupdate.msi or jre****_x64_noupdate.msi[/FONT][/COLOR][/SIZE]
[SIZE=3][COLOR=#000000][FONT=Calibri]15. Silent Switches is /qn[/FONT][/COLOR][/SIZE]
[FONT=Calibri][SIZE=3][COLOR=#000000]16. Select a SFX path and filename I usually use Java32 and Java64[/COLOR][/SIZE][/FONT]
[SIZE=3][COLOR=#000000][FONT=Calibri]17. check off with Progress Bar and use EXEs Icon than Click on Create.[/FONT][/COLOR][/SIZE]
[SIZE=3][COLOR=#000000][FONT=Calibri]18. With Flash (MSI files can be found here [url]http://www.adobe.com/ca/products/flashplayer/distribution3.html[/url] )the only changes to make in the MSI file if you want to stop Automatic Upadtes and agree to license are:[/FONT][/COLOR][/SIZE]
[COLOR=#000000][FONT=Symbol][SIZE=3]·[/SIZE] [/FONT][FONT=Calibri][SIZE=3]ISCHECKFORUPDATES change 1 to 0[/SIZE][/FONT][/COLOR]
[COLOR=#000000][FONT=Symbol][SIZE=3]·[/SIZE] [/FONT][FONT=Calibri][SIZE=3]AGREETOLICENSE change No to YES[/SIZE][/FONT][/COLOR]
[SIZE=3][COLOR=#000000][FONT=Calibri]19. For Adobe Reader(MSI Files can be got here [url]ftp://ftp.adobe.com/pub/adobe/reader/[/url] ) edit the MSI File if you want to Agree to License EULA Accept makes it so staff dont even notice a new install and we Disable browser intergration as it locks up on one of our programs and make the following changes:[/FONT][/COLOR][/SIZE]
[COLOR=#000000][FONT=Symbol][SIZE=3]·[/SIZE] [/FONT][FONT=Calibri][SIZE=3]AGREETOLICENSE change [/SIZE][/FONT][FONT=Calibri][SIZE=3]No to YES[/SIZE][/FONT][/COLOR]
[COLOR=#000000][FONT=Symbol][SIZE=3]·[/SIZE] [/FONT][FONT=Calibri][SIZE=3]EULA_ACCEPT change No to YES[/SIZE][/FONT][/COLOR]
[COLOR=#000000][FONT=Symbol][SIZE=3]·[/SIZE] [/FONT][FONT=Calibri][SIZE=3]DISABLE_BROWSER_INTERGRATION change No to YES[/SIZE][/FONT][/COLOR]
[SIZE=3][COLOR=#000000][FONT=Calibri]20. Use SFX maker with the switch /qn and make it an executable.[/FONT][/COLOR][/SIZE]
-
This post is deleted! -
With the way I have mine setup it installs in the background and doesn’t disturb the user while the snapin deploys the only thing the user might notice is the adobe reader shortcut showing up on there desktop. So once you have edited the msi file save it to a new name run sfx maker on it with the /qn silent swutches than create executable and upload that to the snaping folder. add snaping to whatever computer you want than deploy either all snapins or a single snapin under the advanced tasks.
-
[quote=“Darrell Lanson, post: 9630, member: 1392”]With the way I have mine setup it installs in the background and doesn’t disturb the user while the snapin deploys the only thing the user might notice is the adobe reader shortcut showing up on there desktop. So once you have edited the msi file save it to a new name run sfx maker on it with the /qn silent swutches than create executable and upload that to the snaping folder. add snaping to whatever computer you want than deploy either all snapins or a single snapin under the advanced tasks.[/quote]
Ours used to be done like this, but I found that fog actually hides it anyway if you deploy it from Fog.But I prefer to see it run if I’m running the SFX “manually”.
-
I’m looking for some better understanding on this:
Can the snap-in tool run any executable? (Meaning could I simply write my executable in AutoIT, and then compile to exe?)
Also what user does the file run as? Currently logged on user? System account?
If I disable the UAC controls, will that stay disabled when the system joins a domain?
How many times does the Snapin attempt to run? -
[quote=“Selfcommit, post: 10436, member: 801”]I’m looking for some better understanding on this:
Can the snap-in tool run any executable? (Meaning could I simply write my executable in AutoIT, and then compile to exe?)
Also what user does the file run as? Currently logged on user? System account?
If I disable the UAC controls, will that stay disabled when the system joins a domain?
How many times does the Snapin attempt to run?[/quote]Yes it can run anything. Just remember, the sfx is just a 7zip compressed archive.
The 7zip file is made into an exe by the sfx program. All the exe does is extract the zip archive to a temporary location, then runs whatever command you specify.
In my example, the sfx will extract the installer and the .cmd script to a temp location, then it runs the .cmd file, which then launches the installer silently. In theory, you could just tell the sfx maker to run the adobe installer, but it would not complete without input from the user which is why we use a cmd script to automate it.
In your case, you could tell sfx maker to execute your executable that you made in AutoIT. I’d suggest trying to make a few SFX first to learn more about it.
-
So does the fog client look specifically for an sfx, or does it just run whatever executable it’s handed as a snapin?
Also - Does it run as the currently logged on user, or as a system account?
When does it run? At logon?
-
[quote=“Selfcommit, post: 10446, member: 801”]So does the fog client look specifically for an sfx, or does it just run whatever executable it’s handed as a snapin?
Also - Does it run as the currently logged on user, or as a system account?
When does it run? At logon?[/quote]
I imagine it will run any exe. I haven’t tried, but I don’t know how it would distinguish one .exe from the other, so again it should work. You will just have to try it.
If deployed from fog it will run as the administrator account you setup for fog. If you run it manually on the PC it will run with whatever privileges you have, ie it will not work if standard user, need to run as administrator.
-
It’s also helpful to point out that when you make a switchless .exe like this it can also be used for group policy or other deployment methods
I’ve recently been using sfx maker - [url]http://www.isoft-online.com/down/SFXMaker_1.3.1_Beta.zip[/url] to package and create installers for fog. Works great on larger installations of programs like Microsoft Office and Adobe CS products
Thanks again Andyroo for the guide.
-
This post is deleted! -
This post is deleted! -
Really hate to dig up an old topic but my problem is when using a exe and calling a “.bat” once its decompressed. The snapin deploys the SFX.exe just fine to the computer its post extraction that im having a problem with. I want this to be silent as possible and don’t want a user intervention. I tried a couple of things but UAC causes issues and some of the workstations are kiosk and or limited users.
I rather use FOG to push the apps than use GPO b/c it will not slow down the boot or shutdown process.
[code]
@echo off:: BatchGotAdmin
:-------------------------------------
REM --> Check for permissionsnul 2>&1 “%SYSTEMROOT%\system32\cacls.exe” “%SYSTEMROOT%\system32\config\system”
REM --> If error flag set, we do not have admin.
if ‘%errorlevel%’ NEQ ‘0’ (
echo Requesting administrative privileges…
goto UACPrompt
) else ( goto gotAdmin ):UACPrompt
echo Set UAC = CreateObject^(“Shell.Application”^) > “%temp%\getadmin.vbs”
set params = %*:“=”"
echo UAC.ShellExecute “cmd.exe”, “/c %~s0 %params%”, “”, “runas”, 1 >> “%temp%\getadmin.vbs”"%temp%\getadmin.vbs" del "%temp%\getadmin.vbs" exit /B
:gotAdmin
pushd “%CD%”
CD /D “%~dp0”
:--------------------------------------[/code]
-
Okay think I found my own fix.
The package .exe file must contain an application manifest, i.e. an XML file with special instructions. All UAC compliant applications should have a requested execution level added to the application manifest. Requested execution levels allow the system to know the specific privileges required for a package.
Sorry to bring up an old post.