Custom install using Visual Studio Installer?

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

Re: Custom install using Visual Studio Installer?

Post by Darwin »

OK, I found it.

theWord uses Unicode INI files and the INI Class object was not setup to detect and read them properly.

I fixed this and made it so I can save the INI as unicode as well.

A quick test shows that theWord seems to be reading it fine as well.

I am attaching a Beta of version 3.2 of the Module Installer.vbs script to this post.

Please read the documentation in the script.

It is very important not to overwrite the user's INI file with your complete INI file. So a couple safeguards are in place:

First, your update ini must be called configupdate.upd. This should help remind you that it must be edited.

Second, if configupdate.upd contains certain specific ini keys that should never need to be updated (last update, license, etc), then the update will be denied.

The output of the script shows when config.ini updates are denied so you can test your update and know for sure before deploying.

As a side point you should setup a compact install and configure the module set as you want it. Then edit the INI file and change any auto-generated section names to ones that: a) will never be used by theWord (don't increment numbers in an autogenerated one), b) are very unique to your purpose - not likely to be thought of by someone else doing the same type of customization. (e.g. don't call it "custom module set")

Remember to search the entire ini file for references to the section string that you are customizing as it might be in other places you aren't expecting.

Then TEST the theWord as Costas was not 100% sure that it will react appropriately to customized ini section heads.

Once you've successfully gotten this compact install working as you want, creating configupdate.upd will be as simple as copying that install's config.ini and removing everything that shouldn't be updated on target machines.

After you've done some testing, let me know if it seems to be working as desired and I will make this the production version.

To install this version:
1) unzip the entire zip file to a temporary location.
2) rename "Module Installer32.renametovbs" to "Module Installer32.vbs"
3) Double click "Module Installer32.vbs" to uninstall the previous version.
4) Double click "Module Installer32.vbs" AGAIN to uninstall the new version.

D.
Attachments
ModuleInstaller32.zip
(110.79 KiB) Downloaded 512 times
zcudaniel
Posts: 19
Joined: Thu Dec 23, 2010 12:41 am
Location: Clearwater, FL USA
Contact:

Re: Custom install using Visual Studio Installer?

Post by zcudaniel »

I tested this out and it works great. I just included the text for the book view and books and in automatically created it. It is a neat feature to be able to create a floating book view to see everything that was installed. Sorry for the late reply, I didn't realize you had replied back.

I was just wondering, what would be the best way to make this install a little more silent? Would I need to create my own self extracting .exe and use the command line to perform a silent install? Also, what location would you specify in the command line that would work for both a normal and compact install? Could the exe also automatically extract the .TWZIP module archive?

Thanks a bunch for all of your help!
Daniel
Darwin
Posts: 57
Joined: Tue Feb 02, 2010 10:57 pm

Re: Custom install using Visual Studio Installer?

Post by Darwin »

Daniel,
When I package the script in it's EXE like the production version, then the install of the script kicks off by itself.

It is already built to install and work with any "install type" of theWord (Normal, Compact, Portable).

Now that you've tested, I can prepare an EXE version as the current production version.

As far as a single EXE that both installs this script and a TWZIP, you could create an SFX EXE that:
*) extracts Module Installer.vbs and unzip.exe
*) Calls a vbs or CMD wrapper you make that:
1) Installs Module Installer.vbs with a silent command line ("Module Installer.vbs /S:C:\Path\To\The\Word")
2) Calls Module Installer.vbs to install your TWZIP ("Module Installer.fbs /Z:TWZIPName" (this is not silent)

I use IZARC to build my SFX EXEs and can give you the command line you need there to trigger a VBS - was a bit of a pain to get it worked out.

One issue - if you attempt to install Module Installer.vbs silently - you will need to determine the location of theWord yourself. You could either assume it's location or read the registry key (only works for Regular and Compact as Portable does not create a registry key). It might be better to let the script prompt the user.

You could avoid all this by just putting up a webpage that says
"1. click here to install theWord bible software if you don't already have it" (point to minimal install on theword.gr)
"2. click here to install the module installer" (point to the EXE installer location I have posted).
"3. click here to install our cool resources" (point to your .TWZIP).

I have just updated the production version to 3.2.

Here are the links (same as they are in all other threads referencing this utility):
http://c2674932.cdn.cloudfiles.rackspac ... leInst.exe
http://c2674932.cdn.cloudfiles.rackspac ... oolkit.zip

It can take up to 72 hours for the CDN to replicate - so if you find that 3.2 does not come down immediately, post to this thread or PM and I can send you a copy directly.

Since you've already got it working, would I be able to ask you be a favor to configure a TWZIP that show cases the configuration update functionality? Would be interested in it having just a couple small resources so that the distribution of the sample does not cost me a lot via the CDN. A new floating view would be cool - one that does not conflict with the name you pick for your ongoing updates. I could then put it up with the existing one I have that just does resources.

D.
Darwin
Posts: 57
Joined: Tue Feb 02, 2010 10:57 pm

Re: Custom install using Visual Studio Installer?

Post by Darwin »

Darwin wrote:
You could avoid all this by just putting up a webpage that says
"1. click here to install theWord bible software if you don't already have it" (point to minimal install on theword.gr)
"2. click here to install the module installer" (point to the EXE installer location I have posted).
"3. click here to install our cool resources" (point to your .TWZIP).
Was just remembering that you were planning on the compact install for your main audience. The above is for people who already have a Normal install or who want a normal instead of compact.

In the case of compact, you could customize CopyPreconfiguredCompactInstall.vbs to look for a .TWZIP at the root of the install media and then call Module Installer.vbs with the /Z argument.

Putting it at the root of the media would prevent it from wasting disk space by getting copied into the compact install folder.

D.
zcudaniel
Posts: 19
Joined: Thu Dec 23, 2010 12:41 am
Location: Clearwater, FL USA
Contact:

Re: Custom install using Visual Studio Installer?

Post by zcudaniel »

Actually, after testing how well this works what we would like to do is to provide a package that can install into either a standard or compact installation. Some people who receive our package might have been using TW and already have it set up they way they like it.

What you suggested about a web page for installation steps sounds like a good idea. However, I am still concerned about having two separate steps for the module installer and the .TWZIP file, especially when the users have to make decisions about where to install it. We will be distributing this package to some very computer skills limited people to put it politely. What would be the ideal solution for us is a web page with two links that says:

1. Click here to download the latest version of "TheWord" if you do not already have it installed.
2. Click here to install our cool package of resources

If we have it any more complicated than that I know we will run into trouble with users. I have found that people don't mind clicking "yes" with prompts saying "do you really want to install this." The trouble comes when they encounter questions about the type of installation. I would rather not even give them the option to install it to a portable if there has to be user input to do so.

As to an example, I will work up a sample archive with some books and a upd file. It is really quite easy when you separate out only the text for the new material.

Thanks,
Daniel
zcudaniel
Posts: 19
Joined: Thu Dec 23, 2010 12:41 am
Location: Clearwater, FL USA
Contact:

Re: Custom install using Visual Studio Installer?

Post by zcudaniel »

Here is a sample package with a couple of John Bunyon books and a upd file. One thing I noticed is you need to give the custom book view a number that will not be currently in use. For example, if the user already has 3 or 4 book views open there will be a conflict if your custom view is 1-4. So I started out with tlbx._book_view_10

Daniel
Attachments
testgroup.zip
Sample module group installation file
(150.34 KiB) Downloaded 516 times
Darwin
Posts: 57
Joined: Tue Feb 02, 2010 10:57 pm

Re: Custom install using Visual Studio Installer?

Post by Darwin »

Daniel,
I totally understand the type of user from doing training where I prefaced it with "If you know how to check email and browse the web, this class is for you."

Quite frankly I believe it's us techies that need to realize that this IS the normal user and design around that - so kudos for you boiling it down like that.

If I create a /Q switch for installing .TWZIP, you could do the following:

Create a shell VBscript to be called by your sfx EXE (Which is what I would suggest you use as your "setup" program).

Create a call to the silent install of Module Installer.vbs followed by a call to it to a silent install of the TWZIP.

Something like (reads location of theWord and of Module Installer.vbs from the registry):

Set oShell = CreateObject("Wscript.Shell")
call Module Installer.vbs /S:oShell.RegRead("HKLM\Software\The Word\Dir")
Call oShell.RegRead("HKCR\theWordModule\RegisteredLocation") & "\Module Installer.vbs /Q /Z:yourfile.TWZIP

I am under a huge deadline until the second week of February, so I have quickly created an UNTESTED version 3.21 of Module Installer.vbs that is attached to this message that has a /Q switch. It suppresses all messages EXCEPT an error message when "unzip.exe" cannot be found. (also Module Installer /S: will pop and error when it cannot find unzip.exe during install, so make sure it is in the zip).

Your SFX exe would contain:

Module Installer.vbs
unzip.exe
YourInstaller.vbs
yourfile.TWZIP

I hope this is enough for you to go on - I can give a more help starting second week of Feburary (provided I haven't had to pull any all nighters before then ;).
Attachments
Module Installer3.21.zip
(12.61 KiB) Downloaded 494 times
zcudaniel
Posts: 19
Joined: Thu Dec 23, 2010 12:41 am
Location: Clearwater, FL USA
Contact:

Re: Custom install using Visual Studio Installer?

Post by zcudaniel »

Hey Darwin, thanks so much for your help. There is not any upcoming deadline for us to develop a finished installer package. We first have to format our 90+ books into TW files. I am thinking it will take us the better part of a year to do that. But knowing that there is a simple solution for installation helps us to move forward with the formatting.

Thanks again for all of your help. I'll probably be in contact with you later on after you have recovered from your big deadline :)

Daniel
Darwin
Posts: 57
Joined: Tue Feb 02, 2010 10:57 pm

Re: Custom install using Visual Studio Installer?

Post by Darwin »

Daniel,
Everything we talked about in this thread is now in the production version of the script.

It can also now process .TWZIP files - so you no longer have to distribute uncompressed books and bibles on your media.

Details are here: viewtopic.php?f=2&t=2628

D.
Downs80
Posts: 1
Joined: Thu Mar 29, 2012 2:30 pm

Re: Custom install using Visual Studio Installer?

Post by Downs80 »

Thank you Darwin for the tips!
I've got a lot of books to convert to TheWord format and I'll go the most simple and effective way.
Post Reply