EZ Module Installer.vbs - Version 3.2 Released on 1/19/2011

Share your favorite tips, workarounds and shortcuts for theWord
Darwin
Posts: 57
Joined: Tue Feb 02, 2010 10:57 pm

EZ Module Installer.vbs - Version 3.2 Released on 1/19/2011

Post by Darwin »

These tools were originally launched on this thead: http://forum.theword.gr/viewtopic.php?f=2&t=1859

Module Installer.vbs allows you to install and uninstall modules for theWord by double-clicking them (locally or on the web).

A major limitation to "Module Installer.vbs" is that it did not support compressed files.

Version 2.0 does support this, here's how:

.TWZIP Module Archives
Processes .TWZIP files (a .ZIP renamed to .TWZIP) by extracting all modules for theWord and installing them in the appropriate folders. It ignores folder structures (both when looking for modules in the zip and when extracting them). Works for files opened locally or from the web.

Using a custom file type (.TWZIP) allows double-clicking the file to automatically install in theWord.

.ZIP Module Archive
To prevent disturbing your normal zip file software, a new menu item is simply added that is called "Install theWord Modules (if any)" to the right-click menu of .ZIP files. It works the same as .TWZIP.

It does not require admin rights to register "Module Installer.vbs"

"Module Installer.vbs" does not require admin rights to INSTALL MODULES!

This script is helpful whether you deploy individual zipped modules or groups of zipped modules.

Usage and Benefits
[*]If you run a site that distributes modules, you can have visitors install this script, then you can deploy .TWZIP (or .ZIP) compressed modules - no complex installers, no learning about Windows crazy path system.
[*]Additionally, module installers only require admin rights because they are setup.exe's - since this approach avoid setup.exe's your visitors can install modules without being prompted for admin rights (theWord folder's don't actually require admin rights, it's Vista / Win7 "installer detection" that picks up on the fact you are running an official "setup" program.
[*]Your module installs won't generate any "did that install correctly" messages on Vista / Win7. This happens because PCA (Program Compatibility Assistant) knows you were running setup.exe, but it did not copy files to the normal places that PCA knows most setup.exes *should*.
[*]In most cases, users should be able to click a web link to a .TWZIP and have it directly install from the web in one or two clicks. Try it here after you've installed the script: http://c2674932.cdn.cloudfiles.rackspac ... mple.twzip
[*]The script adds theWord icon and file type names to relevant files so that visitors know they can double click the files to install modules.
[*]The unzip program used is LIGHTNING fast, you will be amazed how quickly modules install.
[*]Version 2.1 (11/11/2010) adds "Open in Zip Program" right-click menu item to .TWZIP files.
[*]Works for all install types: Standard, Compact and Portable

The updated script is in the zip file below. The below zip file supports building a CD, but if you just want to use the scripts on your own machine, copy them into the folder where theword.exe is and run "Module Installer.vbs" to register it. Clicking it again asks if you want to uninstall.

Once it is installed you "use" it by double-clicking or right-clicking the files that it can install or uninstall for you (.TWZIP, .ZIP, .ONT, .ONTX, .NT, .OT, .TWM).

http://c2674932.cdn.cloudfiles.rackspac ... oolkit.zip
Attachments
New Right-click menu option on regular .ZIPs for those that are already distributed this way.  Prevents user from having to browse for the appropriate the module folder (especially since ProgramData is hidden on Windows 7).  Ignores files that are not modules, does not extract entire zip file, file can be on read-only media, very fast unzip.
New Right-click menu option on regular .ZIPs for those that are already distributed this way. Prevents user from having to browse for the appropriate the module folder (especially since ProgramData is hidden on Windows 7). Ignores files that are not modules, does not extract entire zip file, file can be on read-only media, very fast unzip.
InstallFromRegularZip-Ann.png (11.88 KiB) Viewed 7418 times
Right-click menu: Uncompressed modules have install and uninstall options added, along with an icon and description.  Screenshot shows .ONTX, but all other Word modules work the same.
Right-click menu: Uncompressed modules have install and uninstall options added, along with an icon and description. Screenshot shows .ONTX, but all other Word modules work the same.
ModuleOptions-Ann.png (13.07 KiB) Viewed 7418 times
Right click menu: Defines new .TWZIP file extension which is just a renamed .ZIP  Double-clicking automatically installs all modules contained in file - ignores internal ZIP folder structure.  Ignores files that are not modules, does not extract entire zip file, file can be on read-only media, very fast unzip.
Right click menu: Defines new .TWZIP file extension which is just a renamed .ZIP Double-clicking automatically installs all modules contained in file - ignores internal ZIP folder structure. Ignores files that are not modules, does not extract entire zip file, file can be on read-only media, very fast unzip.
TWZIPInstaller.png (20.25 KiB) Viewed 7418 times
Last edited by Darwin on Wed Jan 19, 2011 8:22 pm, edited 7 times in total.
Darwin
Posts: 57
Joined: Tue Feb 02, 2010 10:57 pm

Major Upgrade 3.0 of Module Installer.vbs

Post by Darwin »

This script no longer requires the end user to move the script to reside next to theword.exe.

Instead, double clicking it causes it to prompt for where it should be installed.

The script copies itself (and unzip.exe) to the Common Modules Folder. This location is writable by a standard user even in a Regular Install of the Word.

In addition, I have provided a self-extracting EXE so that unzip.exe always travels with the script. (DO NOT RENAME THE EXE to include the words "install", "setup" or "update" or you will trigger "installer detection" on Windows vista and later, which results in unnecessary prompts before AND after the script install.)


This should make it extremely easy for those of you who provide modules to have non-technical user's install the script so that they can very easily download and install modules from your site in .TWZIP format.


Once this script is installed, you only need to zip your modules and rename them .TWZIP to create module installers that install to the correct location.

You can also provide a module with links to other modules on your site. This can be used for directories of resources. Modules can also provide an update weblink for their own content.

So weblinks in a module (similar to the following ones) will do a seamless install:

Code: Select all

http://yoursite.com/bibles/fivebiblesyouneed.TWZIP 
http://yoursite.com/modules/XYZmodule-newestversion.TWZIP
Here is a working example once you have the script installed:
http://c2674932.cdn.cloudfiles.rackspac ... mple.twzip

You can see how it can directly install TWMs by clicking on any module on this page: http://www.squidoo.com/twm

The TWZIP does not need to be capitalized - just doing it here for emphasis.

If you build your own EXE installers, the script can also be silently registered with this command line:
wscript "Module Installer.vbs" /S:"c:\Program Files\The Word"
(substitute the location of the word for which you want to register the script)
Other command line options are detailed in the script comments.

Self-extracting EXE for this script: http://c2674932.cdn.cloudfiles.rackspac ... leInst.exe

CD Toolkit that includes this script: http://c2674932.cdn.cloudfiles.rackspac ... oolkit.zip
Attachments
Prompt for where to register the module installer.vbs
Prompt for where to register the module installer.vbs
moduleinstallerprompt.jpg (39.78 KiB) Viewed 7390 times
Last edited by Darwin on Thu Dec 23, 2010 10:12 pm, edited 4 times in total.
Darwin
Posts: 57
Joined: Tue Feb 02, 2010 10:57 pm

Version 3.17

Post by Darwin »

Apologies, the self-installer EXE link was not working until now.

Here is the change log (from 3.1):
'* 12/13/10 - 3.17
'* - Enhanced: Error message for "target location not writable" says upgrading theWord may fix it.
'* - Fix: Properly detects registry key for theWord folder on 64 bit windows
'* - Fix: Proper menu choices when no installs detected

'* 11/29/10 - 3.16
'* - Adds "OpenWithProgids" shell verb to shop "Open With => {default zip prog}"
'* - Does not add the currect script folder to the list of installable
'* locations if: 1) it is read-only OR 2) it contains "distributionmaster.flg"
'* OR 3) it is already on the list

'* 11/22/10 - 3.15
'* - Does not create errors if user does not have a registered default zip program
'* - Cleaned up debugging message box in module installation routine
'* - Version number appears in install / upgrade prompt
'* - Much improved setup completion prompt that explains new capabilities

Self-extracting, Self-Installing EXE for this script: http://c2674932.cdn.cloudfiles.rackspac ... leInst.exe

CD Toolkit that includes this script: http://c2674932.cdn.cloudfiles.rackspac ... oolkit.zip
Last edited by Darwin on Mon Dec 13, 2010 11:23 pm, edited 1 time in total.
marcelo.betel
Posts: 35
Joined: Sat Dec 11, 2010 6:55 pm

Re: EZ Module Installer.vbs (v 3.16)

Post by marcelo.betel »

I think that's a good idea to look for updated information before say that we won't have any permission messages on Windows 7.

The .exe of the module installer can't install the script because of that.
Maybe I have to edit the security levels on the The Word folder - but I'm not sure how to.. :cry:
Darwin
Posts: 57
Joined: Tue Feb 02, 2010 10:57 pm

Re: EZ Module Installer.vbs (v 3.16)

Post by Darwin »

Marcello,
Could you provide more information about the problem and message you are receiving?

I just tested it and it seems to be working on a standard Windows 7 setup.

You may receive messages from your browser and maybe from any antivirus software you have running - but you will not receive a Windows 7 UAC prompt to use administrator rights. This also means that if you are a standard user on the computer - say at work - the install will succeed without admin rights.

If you have problems executing it right in the browser, try downloading to a folder and then using Windows Explorer to open the file - this may avoid some messages / blocking that is designed to prevent you from accidentally executing code from the Internet.

D.
marcelo.betel
Posts: 35
Joined: Sat Dec 11, 2010 6:55 pm

Re: EZ Module Installer.vbs (v 3.16)

Post by marcelo.betel »

Hello Darwin,

I'm actually trying to install the module installer from a folder in my computer.
Double clicking the .exe opens the setup panel and all I have to do is click OK.
Well, I do that, and all I have after that is an advertise pop-out about the impossibility to install anthing on that folder ("C:\Program Files (x86)\The Word").

The message is - Critical Error Target Folder: C:\Program Data\The Word Is not avaible
:( :( :( :( :(
Darwin
Posts: 57
Joined: Tue Feb 02, 2010 10:57 pm

Re: EZ Module Installer.vbs (v 3.16)

Post by Darwin »

Marcello,
Thank you for the additional info - it helped immensely. I think I have this figured out.

The script does not actually try to write to "C:\Program Files\The Word" (or "C:\Program Files (x86)\The Word" on 64-bit).

It tries to write to "C:\ProgramData\The Word"

Previous versions of the EXE installer for theWord software did not set permissions on this folder to give the group "Everyone" full control. The most recent ones do. (For instance, I know the installer for 3.1.1.1014 and earlier did not do the permission update).

I tested upgrading the older version 3.1.1.1014 (that didn't do the permissions) with the latest version and it worked. So it *should* work for you to simply upgrade to the latest version of theWord to correct the permissions.

If for some reason that does not work or you have a reason that prevents you from upgrading to the latest, then run the .CMD in the zip file attached to this message with administrator permissions. To do this, *) extract FixProgramDataPermissions.CMD file from the .ZIP, then *) right click the FixProgramDataPermissions.CMD and select "Run as administrator"

If you receive any errors. please record them exactly or screenshot them (ALT-Prtsc). (Note: "Failed on 0 files" is a success message - albeit a confusing one).

After the permissions are corrected, you should be able to re-run the module installer successfully.

While testing on 64 bit I did discover the script did not properly detect theWord folder registry key on 64 bit and did not properly build the install locations menu when no installs were detected. Both of these have been fixed and the download location updated with version 3.17.

Let me know if you need any more assistance,
D.
Attachments
FixProgramDataPermissions.zip
(691 Bytes) Downloaded 612 times
Darwin
Posts: 57
Joined: Tue Feb 02, 2010 10:57 pm

Version 3.20 Released

Post by Darwin »

Here are the changes:

'* Revision History:
'* 12/29/10 - 3.20
'* - New: Merges config.ini found in a TWZIP file with the user's TWZIP
'* ATTENTION - See "USAGE" in this comments section for how to use this.

'* UPDATING CONFIG.INI:
'* ATTENTION - READ CAREFULLY
'* This feature is intended to allow you to install new INI sections
'* or update ones THAT YOU OWN. If you update sections that the user
'* is using, you will get them very angry. Make sure that if you
'* update view settings, module sets, etc - that you are referencing
'* custom names and not the names autocreated by theWord during normal
'* operations.
'* If you are using your own config.ini as a sample, it will have standard
'* auto-create names which should be customized before sending to users.

'* To use this feature create a standard INI file called configupdate.upd
'* and include any sections and keys that you want to update or add on the
'* target workstation. Include configupdate.upd in your TWZIP file
'* (usually with whatever resources you are configurating in your view
'* or module set)
'*
'* ATTENTION: When using this to create / maintain your own settings
'* you should make the ini section headings completely unique to yourself
'* by editing them in your "distribution master copy" of theWord to
'* change any auto-generated references to custom ones.
'*
'* ATTENTION: SAFEGUARD FEATURE:
'* If a configupdate.upd file contains any of these values "info.serial",
'* "last.check.for.update","lang","info.serialm","info.first.run"
'* from the "[general]" section, it will be assumed that you have
'* accidentally included your entire config.ini and no updates will be
'* done. You can see if this is happening during testing as the script
'* will output:
'*
'* "UPDATE DENIED: configupdate.upd"
'*
'* instead of
'*
'* "PROCESSED: configupdate.upd"




Self-extracting, Self-Installing EXE for this script: http://c2674932.cdn.cloudfiles.rackspac ... leInst.exe

CD Toolkit that includes this script: http://c2674932.cdn.cloudfiles.rackspac ... oolkit.zip
Post Reply