Showing posts with label enterprise deployment. Show all posts
Showing posts with label enterprise deployment. Show all posts

Wednesday, May 15, 2013

Packaging Skype with Auto Update disabled

EDITED: I have edited this post on 30-Aug-2013 after some users comments that the given solution is not working. I have studied in depth the skype update process and created this solution for all. Please check below (Edited Section) for more information.

Recently while packaging Skype for enterprise version, I could not disable the Auto Updates and finally found a way to get rid of it.

You can get the latest version of Skype setup in MSI format from the following URL: http://download.skype.com/msi/SkypeSetup.msi or
http://www.skype.com/go/getskype-msi


There is no registry, file which can disable the Auto Update functionality of Skype. I searched in lots of forums and all said that it automatically prompts for update. So finally I decided to look in the MSI and find why and how it is doing it.

What I found was that Skype has an Updater.exe in the installation folder and it also creates a Skype Update service which points to this exe.
I just removed this service and updater.exe file from the skype msi package and it worked.
No need to do anything else. Just do this small part and you are done with removing the Auto Update in Skype.

Edited:
I have been asked and told by a lot of users that this is not working so I am adding a further solution which will definitely work without a doubt. I have mass deployed this and it has worked fine. For all the users who were getting the pop ups, this has fixed it.

You need to create a dummy SetupSkype.exe file and a Skypefix.vbs as below and add it to your INSTALLDIR (C:\Program Files\Skype\Phone\) of the package.

SkypeFix.vbs:
'==============================================
dim filesys, oShell
Set filesys = CreateObject("Scripting.FileSystemObject")
Set oShell = CreateObject("WScript.Shell")

des1 = oShell.ExpandEnvironmentStrings ("%Temp%")
sup = oShell.ExpandEnvironmentStrings ("%ProgramFiles%")
windir = oShell.ExpandEnvironmentStrings ("%Windir%")

destfile1= des1 & "\SkypeSetup.exe"
sourcefile1= sup & "\Skype\Phone\SkypeSetup.exe"

'Copy files

If filesys.FileExists(sourcefile1) Then

 a= filesys.CopyFile (sourcefile1, destfile1,True)

End If

oShell.Run windir & "\System32\Icacls.exe " & destfile1 & " /deny Everyone:D"

'=================================================

After this you need to create an Active Setup registry key which will run this vbs file for every user who logs off and logs in. After this there will be no upgrade issue.

This script works on the fact that SkypeSetup.exe gets downloaded from internet to %temp% folder of user and when it is downloaded, it starts prompting up for upgrade. I have created this file before hand in %temp% folder or replace the already existing one with this dummy file and then put a deny restriction to all the users on this file. So now a file cannot be downloaded to %temp% folder because there is already a file which cannot be deleted/replaced. Hence no more upgrade prompts.
I have created this solution by deeper understanding of Skype setup and upgrade.

Hope this tip will be helpful to you and let me know if it still does not work.

Sunday, June 03, 2012

Packaging Google Chrome for Enterprise deployment

Many times it is an issue with the Administrators to deploy Google Chrome enterprise wide as there are lots of issues like:

1) Many people would have already installed various other versions of Chrome either through MSI or through exe.
2) How to customize Google chrome for enterprise wide deployment.

*Edited: The new version has a few differences, please see the end of post on how to tackle this.*

First, I would like to mention here that Google Chrome Enterprise version can be downloaded from the following location:
http://www.google.com/intl/en/chrome/business/browser/

This site contains an MSI, which is already customized for business as in there are no desktop/Taskbar shortcuts and the application automatically goes to Program files folder.
If you need to customize this, it is best to capture this MSI as it runs a Setup.exe from within.
I would say that, this MSI is good enough to go like this too so not recommended to waste your time in capturing the MSI unless specifically required.

You can add master_preferences file in the Google\Chrome\Application folder with following contents:

{
"homepage" : "http://msiworld.blogspot.com",
"homepage_is_newtabpage" : false,
"browser" : {
"show_home_button" : true,
 "check_default_browser" : false,
 "window_placement": {
 "bottom": 1000,
 "left": 10,
 "maximized": false,
 "right": 904,
 "top": 10,
 "work_area_bottom": 1010,
 "work_area_left": 0,
 "work_area_right": 1680,
 "work_area_top": 0
 }
 },
 "bookmark_bar" : {
"show_on_all_tabs" : true
},
"distribution" : {
"skip_first_run_ui" : true,
"show_welcome_page" : false,
"import_search_engine" : false,
"import_history" : false,
"create_all_shortcuts" : true,
"do_not_launch_chrome" : true,
"make_chrome_default" : false
}
}

If you add this, change the install sequence of Custom Actions which are already there in the MSI to run before InstallFiles action. That is, move InstallFiles Action after DoInstall. This will make sure your master_preferences file is retained till end.
*Edited
There are are 3 Custom Actions by the name starting from : CallUninstaller
Change their condition to REMOVE="ALL"
This will enable for a clean upgrade else you will face issues while upgrading the application.
*
Uninstall Any Previous Version of Chrome:

To Uninstall any previous version of Chrome, I have written this VBScript which can be run before the installation of your MSI.

'==============================================================
'Lines to get the computer Name
Const HKEY_LOCAL_MACHINE = &H80000002
 Set wshShell = WScript.CreateObject( "WScript.Shell" )
 strComputerName = wshShell.ExpandEnvironmentStrings( "%COMPUTERNAME%" )
 dim folder, MyProperties, arrMyProperties, Exe, Param, oReg, strKeyPath, strValueName

'==============================================================
 'To check whether the OS is 32 bit or 64 bit of Windows 7
'==============================================================
'Lines to detect whether the OS is 32 bit or 64 bit of Windows 7
 Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputerName & "\root\default:StdRegProv")
   strKeyPath = "HARDWARE\DESCRIPTION\System\CentralProcessor\0"
   strValueName = "Identifier"

 oReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
'==============================================================
'Checking Condition whether the build is 64bit or 32 bit
   if (instr(strValue,"64")) then
 folder = "C:\Program Files (x86)\Google\Chrome"
 RegVal = ReadReg ("HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Google Chrome\UninstallString")
 End If
if (instr(strValue,"x86")) then
 folder = "C:\Program Files\Google\Chrome"
 RegVal = ReadReg ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Google Chrome\UninstallString")
End If
'==============================================================

MyProperties = RegVal
arrMyProperties = Split(MyProperties, "-")
Exe = arrMyProperties(0)
Param = "--uninstall --multi-install --chrome --system-level --force-uninstall"
'Uninstall Previous version Chrome
'==============================================================
wshShell.run Exe & Param, 1, True
'Delete leftover folder and files from Previous version Chrome
'==============================================================
dim filesys
Set filesys = CreateObject("Scripting.FileSystemObject")
If filesys.FolderExists(folder & "\") Then 
   filesys.DeleteFolder folder
End If
Function ReadReg(RegPath)
      Dim objRegistry, Key
      Set objRegistry = CreateObject("Wscript.shell")
      Key = objRegistry.RegRead(RegPath)
      ReadReg = Key
 End Function


Hope these steps will reduce your efforts in deployment of Chrome.

*
With the New version 26.0.1410.64, Google has changed the install sequence. do the following:

1) In InstallExecuteSequence Table move InstallFiles action after DoInstall Custom Action. This DoInstall Custom Action is actually installing the Google Chrome from an exe. So if the MSI already had copied the master_preferences file, this exe will replace it with its own. If you place the InstallFile Action after DoInstall, then the file which you have added in your package will overwrite the one which Google provides.
2) You might have to write a small script to delete the shortcut from C:\Users\Public\Desktop, if you do not want a desktop shortcut.
Place this CA at the end just before InstallFinalize.

Monday, January 23, 2012

Packaging Mozilla Firefox

Most people dread while packaging Mozilla Firefox application and mostly try to make a silent installation of it. I was recently given task to package the latest Mozilla Firefox application.
The same procedure can be used for version 10.0.1, 11, 12 and 13, 14 and 15 as well as I have tried and it works fine for all of these.
I would like to share here how I could easily package it. Also by this method you will be able to do Proxy server settings.
First step is to do a Setup capture of the source exe which can be downloaded from Mozilla’s website. Take care that you do not have to launch the application after the installation is completed.
Second Step is to copy 3 files as stated below. You can add these files in your .wsi directly after the setup capture. These 3 files will solve all your issues.

1. Mozilla.cfg: This file needs to be added to "%programfiles%\Mozilla Firefox\" folder and should have this content:

//Firefox Default Settings
// set Firefox Default homepage
pref("browser.startup.homepage","http://your.intranet.com");
// disable default browser check
pref("browser.shell.checkDefaultBrowser", false);
// disable application updates
pref("app.update.enabled", false)
// disables the 'know your rights' button from displaying on first run
pref("browser.rights.3.shown", true);
// disables the request to send performance data from displaying
pref("toolkit.telemetry.prompted", 2);
pref("toolkit.telemetry.rejected", true);
//Firefox Default Settings
//set proxy server settings, choose whatever is required by your organization
pref("network.proxy.ftp", "your.proxy.server");
pref("network.proxy.ftp_port", 8080);
pref("network.proxy.gopher", " your.proxy.server ");
pref("network.proxy.gopher_port", 8080);
pref("network.proxy.http", " your.proxy.server ");
pref("network.proxy.http_port", 8080);
pref("network.proxy.no_proxies_on", "localhost, 127.0.0.1, *.server.local");
pref("network.proxy.type", 1);
pref("network.proxy.share_proxy_settings", true); // use the same proxy settings for all protocols


2. local-settings.js: This file needs to be added to "%programfiles%\Mozilla Firefox\defaults\pref" folder and should have this content:

pref("general.config.obscure_value", 0);
pref("general.config.filename", "mozilla.cfg");

3. override.ini : This file needs to be added to “%programfiles%\Mozilla Firefox\” folder and should have this content:

[XRE]
EnableProfileMigrator=false


It is just this simple you can now just remove the Desktop shortcut in your .wsi file and compile it to .msi file.