Changes

Dropbox

8,072 bytes added, 09:11, 22 May 2012
Dropbox
Dropbox for Windows is a client software for use with the popular Dropbox online storage service. For more information see the [http://www.dropbox.com/ Dropbox Homepage].
 
An alternative to the method below is to use Innosetup [http://www.jrsoftware.org/isinfo.php http://www.jrsoftware.org/isinfo.php]and ISTool [http://sourceforge.net/projects/istool/ http://sourceforge.net/projects/istool/] to create an ISS file and compile it to an installer. Download the latest dropbox.exe install it on a test system or extract using 7zip. Copy all the files to two source folders in your Innosetup source folder called 'embedded' fr the BMP files and {app} for all the EXEs and DLLs. These need to be subfolders of the location of the ISS file.
 
Open ISTool, load the ISS file and compile and new installer dropbox.version.exe. Here is my package:
 
<package id="dropbox"
name="dropbox"
revision="%version%"
reboot="false"
priority="97">
<variable name="version" value="1.4.0" />
<check type="uninstall" condition="exists" path="Dropbox %version%" />
<install cmd='%SOFTWARE%\Dropbox\Dropbox.%version%.exe /silent' />
<install architecture="x86" cmd='%comspec% /c copy /y "%ALLUSERSPROFILE%\Start Menu\Programs\Dropbox.lnk" "%AllUsersProfile%\Desktop"'/>
<install os="windows.+6\.\d{1}\.\d{4}" architecture="x64" cmd='%comspec% /c copy /y "%PROGRAMDATA%\Microsoft\Windows\Start Menu\Programs\Dropbox.lnk" "c:\users\public\Desktop"'/>
<downgrade include="install" />
<upgrade include="install" />
<remove cmd='cmd /C %SETTINGS%\tools\taskkill.exe /F /IM dropbox.exe' ><exit code='1' /><exit code='128' /></remove>
<remove architecture="x86" cmd='"%PROGRAMFILES%\dropbox\unins000.exe" /silent' />
<remove architecture="x64" cmd='"%PROGRAMFILES(x86)%\dropbox\unins000.exe" /silent' />
</package>
 
Innosetup ISS file:
 
#define MyAppName "Dropbox"
#define MyAppVerName "Dropbox 1.4.0"
#define MyAppVersion "1.4.0"
#define MyAppPublisher "DropBox (repackaged)"
#define MyAppURL "http://www.getdropbox.com"
#define MyAppExeName "Dropbox.exe"
[Setup]
AppName={#MyAppName}
AppVerName={#MyAppVerName}
AppPublisher={#MyAppPublisher}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf32}\{#MyAppName}
DefaultGroupName={#MyAppName}
OutputDir=.\Output
OutputBaseFilename={#MyAppName}.{#MyAppVersion}
Compression=lzma
SolidCompression=true
DirExistsWarning=no
ShowLanguageDialog=auto
WizardImageFile=embedded\modern-wizard.bmp
WizardSmallImageFile=embedded\modern-header.bmp
ArchitecturesInstallIn64BitMode=x64
[InstallDelete]
Name: {app}\*.*; Type: files; Languages:
[Dirs]
[Files]
Source: {app}\*.*; DestDir: {app}; Flags: ignoreversion recursesubdirs; Excludes: DropboxExt64.14.dll
Source: {app}\DropboxExt64.14.dll; DestDir: {app}; Check: IsWin64
[Registry]
Root: HKLM; Subkey: SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\AuthorizedApplications\List; ValueType: string; ValueName: {app}\{#MyAppExeName}; ValueData: {app}\{#MyAppExeName}:*:Enabled:Dropbox; Flags: uninsdeletevalue
Root: HKLM32; Subkey: SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\DropboxExt1; ValueType: string; ValueData: {{FB314ED9-A251-47B7-93E1-CDD82E34AF8B}; Flags: uninsdeletekey
Root: HKLM32; Subkey: SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\DropboxExt2; ValueType: string; ValueData: {{FB314EDA-A251-47B7-93E1-CDD82E34AF8B}; Flags: uninsdeletekey
Root: HKLM32; Subkey: SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\DropboxExt3; ValueType: string; ValueData: {{FB314EDB-A251-47B7-93E1-CDD82E34AF8B}; Flags: uninsdeletekey
Root: HKLM; Subkey: SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\DropboxExt1; ValueType: string; ValueData: {{FB314ED9-A251-47B7-93E1-CDD82E34AF8B}; Flags: uninsdeletekey; Check: IsWin64
Root: HKLM; Subkey: SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\DropboxExt2; ValueType: string; ValueData: {{FB314EDA-A251-47B7-93E1-CDD82E34AF8B}; Flags: uninsdeletekey; Check: IsWin64
Root: HKLM; Subkey: SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\DropboxExt3; ValueType: string; ValueData: {{FB314EDB-A251-47B7-93E1-CDD82E34AF8B}; Flags: uninsdeletekey; Check: IsWin64
Root: HKCR; Subkey: *\shellex\ContextMenuHandlers\DropboxExt; ValueType: string; ValueData: {{FB314ED9-A251-47B7-93E1-CDD82E34AF8B}; Flags: uninsdeletekey
Root: HKCR; Subkey: Directory\Background\shellex\ContextMenuHandlers\DropboxExt; ValueType: string; ValueData: {{FB314ED9-A251-47B7-93E1-CDD82E34AF8B}; Flags: uninsdeletekey
Root: HKCR; Subkey: Directory\shellex\ContextMenuHandlers\DropboxExt; ValueType: string; ValueData: {{FB314ED9-A251-47B7-93E1-CDD82E34AF8B}; Flags: uninsdeletekey
Root: HKCR32; Subkey: CLSID\{{FB314ED9-A251-47B7-93E1-CDD82E34AF8B}; ValueType: string; ValueData: DropboxExt; Flags: uninsdeletekey
Root: HKCR32; Subkey: CLSID\{{FB314ED9-A251-47B7-93E1-CDD82E34AF8B}\InProcServer32; ValueType: string; ValueData: {app}\DropboxExt.14.dll
Root: HKCR32; Subkey: CLSID\{{FB314ED9-A251-47B7-93E1-CDD82E34AF8B}\InProcServer32; ValueType: string; ValueName: ThreadingModel; ValueData: Apartment
Root: HKCR32; Subkey: CLSID\{{FB314EDA-A251-47B7-93E1-CDD82E34AF8B}; ValueType: string; ValueData: DropboxExt; Flags: uninsdeletekey
Root: HKCR32; Subkey: CLSID\{{FB314EDA-A251-47B7-93E1-CDD82E34AF8B}\InProcServer32; ValueType: string; ValueData: {app}\DropboxExt.14.dll
Root: HKCR32; Subkey: CLSID\{{FB314EDA-A251-47B7-93E1-CDD82E34AF8B}\InProcServer32; ValueType: string; ValueName: ThreadingModel; ValueData: Apartment
Root: HKCR32; Subkey: CLSID\{{FB314EDB-A251-47B7-93E1-CDD82E34AF8B}; ValueType: string; ValueData: DropboxExt; Flags: uninsdeletekey
Root: HKCR32; Subkey: CLSID\{{FB314EDB-A251-47B7-93E1-CDD82E34AF8B}\InProcServer32; ValueType: string; ValueData: {app}\DropboxExt.14.dll
Root: HKCR32; Subkey: CLSID\{{FB314EDB-A251-47B7-93E1-CDD82E34AF8B}\InProcServer32; ValueType: string; ValueName: ThreadingModel; ValueData: Apartment
Root: HKCR; Subkey: CLSID\{{FB314ED9-A251-47B7-93E1-CDD82E34AF8B}; ValueType: string; ValueData: DropboxExt; Flags: uninsdeletekey; Check: IsWin64
Root: HKCR; Subkey: CLSID\{{FB314ED9-A251-47B7-93E1-CDD82E34AF8B}\InProcServer32; ValueType: string; ValueData: {app}\DropboxExt64.14.dll; Check: IsWin64
Root: HKCR; Subkey: CLSID\{{FB314ED9-A251-47B7-93E1-CDD82E34AF8B}\InProcServer32; ValueType: string; ValueName: ThreadingModel; ValueData: Apartment; Check: IsWin64
Root: HKCR; Subkey: CLSID\{{FB314EDA-A251-47B7-93E1-CDD82E34AF8B}; ValueType: string; ValueData: DropboxExt; Flags: uninsdeletekey; Check: IsWin64
Root: HKCR; Subkey: CLSID\{{FB314EDA-A251-47B7-93E1-CDD82E34AF8B}\InProcServer32; ValueType: string; ValueData: {app}\DropboxExt64.14.dll; Check: IsWin64
Root: HKCR; Subkey: CLSID\{{FB314EDA-A251-47B7-93E1-CDD82E34AF8B}\InProcServer32; ValueType: string; ValueName: ThreadingModel; ValueData: Apartment; Check: IsWin64
Root: HKCR; Subkey: CLSID\{{FB314EDB-A251-47B7-93E1-CDD82E34AF8B}; ValueType: string; ValueData: DropboxExt; Flags: uninsdeletekey; Check: IsWin64
Root: HKCR; Subkey: CLSID\{{FB314EDB-A251-47B7-93E1-CDD82E34AF8B}\InProcServer32; ValueType: string; ValueData: {app}\DropboxExt64.14.dll; Check: IsWin64
Root: HKCR; Subkey: CLSID\{{FB314EDB-A251-47B7-93E1-CDD82E34AF8B}\InProcServer32; ValueType: string; ValueName: ThreadingModel; ValueData: Apartment; Check: IsWin64
[UninstallDelete]
[Icons]
Name: {commonprograms}\{#MyAppName}; Filename: {app}\{#MyAppExeName}
[Tasks]
[CustomMessages]
english.NameAndVersion=%1 version %2
english.AdditionalIcons=Additional icons:
english.CreateDesktopIcon=Create a &desktop icon
english.CreateQuickLaunchIcon=Create a &Quick Launch icon
english.ProgramOnTheWeb=%1 on the Web
english.UninstallProgram=Uninstall %1
english.LaunchProgram=Launch %1
english.AssocFileExtension=&Associate %1 with the %2 file extension
english.AssocingFileExtension=Associating %1 with the %2 file extension...
[Languages]
Name: english; MessagesFile: embedded\english.isl
 
 
Installing Dropbox software was meant to be "easy for end users" which apparently meant that it must be a challenge for administrators. Dropbox 1.0.10 uses an NSIS installer which supports /D[estination irectory] and /S[ilent] switches, but there seems to be no way to use them both in conjunction (see [http://forums.dropbox.com/topic.php?id=15219 this discussion thread] for details). As dropbox installs everything (including binaries!) into the current user's %APPDATA% unless told otherwise, we would need to use the /D switch and script the installation using [http://www.autoitscript.com/autoit3/index.shtml the AutoIt3 scripting language].
76
edits