How to perform a silent/custom installation of theWord

Share your favorite tips, workarounds and shortcuts for theWord
csterg
Site Admin
Posts: 8627
Joined: Tue Aug 29, 2006 3:09 pm
Location: Corfu, Greece
Contact:

How to perform a silent/custom installation of theWord

Post by csterg »

theWord installer is extensible and allows you to customize it for your own needs.
This posts shows you how to use the standard package you download from the site to perform a silent installation and also modify it a little.
First, download the standard english package from here: http://www.theword.net/files/setup/getmulti.php/en (or any other package from here http://www.theword.net/index.php?downlo ... &l=english).

Assuming you downloaded the main english package, you have a file named theword-setup-en.exe saved on your disk. Double click to run it, the first screen of the installer appears. Don't click next, just let the first screen on your screen. Now, open Windows Explorer and go to the Temp folder, which should be located to C:\Users\<user>\AppData\Local\Temp (this path might be a bit different in pre-Vista OSes). Try to locate a subfolder in there with a name se_XXXXXXXXXX where X is a digit (the number of digits might be more or less than 10). If you open this folder you will see a list of all the files that theWord installer is about to install on your PC! These are the files that you need. Just copy all these files to another folder (e.g. create a folder on your desktop named theWordInstall and copy all these files there).

Now, go back to the actual theWord installer you have started and click 'Cancel' (e.g. do NOT install theWord), you will notice that the installer will just delete all these files and the temporary folder will disappear. But now, you have on your desktop all the files that were bundled in the single .exe file you downloaded. These are the actual files that comprise theWord and the package you chose.

Now, the adventure begins! Here is what you can do:

1. To install theWord, double click on the file theword-setup.exe
2. To do a silent installation, open a command prompt and type theword-setup.exe /S
3. To create a custom package just edit the install.ini file: open it with an editor and play around with it: see how you can add/remove files. If you want, you can download more modules from the site, put them in that folder, edit the install.ini file and create a new package for theWord.

If you are interested for more, post back here with questions,
Costas
User avatar
paul1149
Posts: 301
Joined: Tue Oct 13, 2009 9:35 pm

Re: How to perform a silent/custom installation of theWord

Post by paul1149 »

This is very neat, Costas. What I would be interested in are switches that would prevent theWord from starting, from opening release notes (I don't think that happens), to install for all users, etc.
csterg
Site Admin
Posts: 8627
Joined: Tue Aug 29, 2006 3:09 pm
Location: Corfu, Greece
Contact:

Re: How to perform a silent/custom installation of theWord

Post by csterg »

All these happen by default.
Once you install with the /S switch it will not start and it will be ready for new users (or so I think)
Costas
User avatar
paul1149
Posts: 301
Joined: Tue Oct 13, 2009 9:35 pm

Re: How to perform a silent/custom installation of theWord

Post by paul1149 »

Great. I should be able to give this a run soon. Thanks so much, friend.
User avatar
paul1149
Posts: 301
Joined: Tue Oct 13, 2009 9:35 pm

Re: How to perform a silent/custom installation of theWord

Post by paul1149 »

Hi Costas. I had some problems with this.

First I tried via a batch, which consisted of

Code: Select all

start /wait "%drive%:\pc tools\enhancements\apps\theword-install\theword-setup.exe" /S
where %drive% is the drive letter of my USB stick. I also tried it hard-coding "e" as the drive label. Nothing happened in either case, just a flash of a command window on Win7.

Then I opened a command window in the "theword-install" folder and typed "theword-setup.exe /S". After asking UAC permission, the program began installing, and placed a shortcut on the desktop. But then the prog manifested a "stopped running" error. Then on trying to run TW I got the notice that some modules were closed because they were installed in read-only directories. Namely, they were installed under theword's folder in C:\program files rather than out in appdata. This occurred in two trials.

Also, in the install.ini, how does one deal with the "size" parameter if one wants to add a module?

Thanks.
csterg
Site Admin
Posts: 8627
Joined: Tue Aug 29, 2006 3:09 pm
Location: Corfu, Greece
Contact:

Re: How to perform a silent/custom installation of theWord

Post by csterg »

Shouldn't you first 'cd' to the directory instead of just runnint the theword-setup.exe file? if you run it like that, the .exe file does not really know the 'current directory', does it? So you should probably:

Code: Select all

cd "%drive%:\pc tools\enhancements\apps\theword-install\"
start /wait theword-setup.exe /S
Concerning the read-only files: the installer should not install any modules under program files: are you sure? what is the current user under which you are running this command?
what is the COMMON_APP_DATA pointing to?
Costas
User avatar
paul1149
Posts: 301
Joined: Tue Oct 13, 2009 9:35 pm

Re: How to perform a silent/custom installation of theWord

Post by paul1149 »

That's a good point about CDing, and I'll change the batch. But the fact is that the installer did find and install the modules. I don't know why.
(Edit: yes, I think I do. It is the setup program that installs the modules, not the batch file. So it refers to itself.)

Yes, I examined the folder structure and the Books, Bibles, etc folders were under theWord under Program files.

I can't tell you what the appdata spec was because I've just reinstalled Windows afresh on that machine. I can't imagine it being anything but legit, however, as that was a fresh install whose only problem was it wouldn't activate with MS. Once I get this install up, I'll try TW again.
Last edited by paul1149 on Mon Dec 31, 2012 12:58 am, edited 1 time in total.
csterg
Site Admin
Posts: 8627
Joined: Tue Aug 29, 2006 3:09 pm
Location: Corfu, Greece
Contact:

Re: How to perform a silent/custom installation of theWord

Post by csterg »

The default installation should use the AppData folder for modules in Win7. Unless the system incorrectly reports back wrong paths, but why would that happen?
Try to run the installer interactively, how does it install? (remember you can install/uninstall it as many times as you want, there are no traces left behind)
Costas
User avatar
paul1149
Posts: 301
Joined: Tue Oct 13, 2009 9:35 pm

Re: How to perform a silent/custom installation of theWord

Post by paul1149 »

%appdata% takes me right to the roaming folder of the current user. I don't see common appdata under environmental variables, and haven't been able to formulate a %xxx% form that takes me anywhere.

Again I ran the batch:

start /wait "f:\pc tools\enhancements\apps\theword-install\theword-setup.exe" /S in both Administrative Mode and standard modes, I only got command windows flashing by.

I then changed the batch to the CD method you suggested. Same result.

I then opened a command window directly in "theword-install" directory and ran the file command manually with the switch. I got the UAC flag, allowed it, it ran for a bit and again I got the "stopped working" error. Again, all tW folders were under PF, nothing was under any user or program data.

Also, somewhere here I got an error "/S" - incorrect flag. But then it worked subsequently.

So as a control I ran the install file interactively, and it worked perfectly. Modules were placed under C:\Program Data. I then tried the /S switch again, with the bad result. Is it possible the switch is broken?
csterg
Site Admin
Posts: 8627
Joined: Tue Aug 29, 2006 3:09 pm
Location: Corfu, Greece
Contact:

Re: How to perform a silent/custom installation of theWord

Post by csterg »

Yes, there is a big in the installer.
I think i fixed it, please get again the file http://www.theword.net/files/setup/theword-setup.exe and replace the one you have there,
Costas
User avatar
paul1149
Posts: 301
Joined: Tue Oct 13, 2009 9:35 pm

Re: How to perform a silent/custom installation of theWord

Post by paul1149 »

Still getting that the /S is an invalid switch.
csterg
Site Admin
Posts: 8627
Joined: Tue Aug 29, 2006 3:09 pm
Location: Corfu, Greece
Contact:

Re: How to perform a silent/custom installation of theWord

Post by csterg »

this is certainly interesting since i just tried it...
Where do you get that? Can you show me a SS?
Costas
User avatar
paul1149
Posts: 301
Joined: Tue Oct 13, 2009 9:35 pm

Re: How to perform a silent/custom installation of theWord

Post by paul1149 »

Using the same machine, I uninstalled TW and ran the setup file from a command window directly in the folder. No batch, no changing directories, etc. I tried it in a regular CMD window and an elevated one, and the only difference was when the UAC prompt came, as expected. The 'invalid switch' error didn't happen.

What did happen though is the /S switch had no effect. The command line caused the interactive to manifest:

Image

I also noticed the d= spec as it was installing, and thought of the problem with modules installing in the program files folder. But evidently this is the way it's supposed to be specced, since the modules went to the correct program data folder:

Image

Then I went back and tried the batch file. I use a master batch that calls a series of sub-batches, but I just went to the sub-batch and ran it. This time I got the invalid switch error, as you can see:

Image

You can see the actual command in the window. I found that using a CD to access the setup file directly causes the master batch to lose its own directory focus. It could be changed back of course, but the setup program doesn't seem to need it anyway, and neither do any of the other progs I install this way. I also tried moving the S switch inside the quotes, but that just manifested an inert cmd window, sort of a soft error.
csterg
Site Admin
Posts: 8627
Joined: Tue Aug 29, 2006 3:09 pm
Location: Corfu, Greece
Contact:

Re: How to perform a silent/custom installation of theWord

Post by csterg »

Can you give it a try to run it in a path that does NOT contain spaces in case that is the error?
e.g. put all files in c:\tw.install and run it from there. I cannot repeat it here,
Costas
User avatar
JG
Posts: 4599
Joined: Wed Jun 04, 2008 8:34 pm

Re: How to perform a silent/custom installation of theWord

Post by JG »

Costas, if it is any 'help', I can't get the 'silent' switch to have any effect, it always shows the dialog. [Win XP]

A single module install worked with the /S using this .nsi script
viewtopic.php?p=7220#p7220



Now I find this!!!! viewtopic.php?p=14486#p14486
Costas wrote: The module installers support the silent mode. The main installer not
Jon
the
Word 6 Bible Software
OS for testing; Windows 10
Beta Download ------Beta Setup Guide------On-line Manual------Tech doc's and Utilities------Copyright Factsheet
Post Reply