Hi there

Sorry if this has been asked before, I have done a search but couldn't find it.

We have an application (Endnote 6) which needs a line entering into the hosts file.
We also have other applications or websites which need an entry in the hosts file.

Is there a way to get the MSI to append a line to a file rathr then overwriting it all the time?

Also is there a way to get an MSI to append to a registry entry rather than overwriting it (Endnote also needs a proxy exception).

Many thanks for any help.

Matt
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
hi
I would try the following:
-write a script that appends the data
or
-use ini file table and append the data you need

gruss

Olivier
Answered 11/05/2004 by: olivier
Orange Senior Belt

Please log in to comment
0
Thanks for that Oliver.

Lets just pretend for a second then that I am a complete newbie at this [:-], how would I go about doing the easiest one of these?

Matt
Answered 11/05/2004 by: mjccheshire
Senior Yellow Belt

Please log in to comment
0
Well depending on what scripting tool you use....if you use Wisescript for instance then you can use the command to "Insert Text to file"

You can select a line number or append at the end.
Answered 11/05/2004 by: MSIMaker
Second Degree Black Belt

Please log in to comment
0
hmmm, difficult to explain :-)
you can do a customaction running the script

example for a script:
set fs = CreateObject("Scripting.FileSystemObject")
set file = fs.opentextfile("myhost.txt")
file.writeline "myhost1...."
file.close


etc. etc.
Answered 11/05/2004 by: olivier
Orange Senior Belt

Please log in to comment
0
The most simple method would be right from a command line:

echo New Line On Bottom >>myfile.txt

the double "greater than" symbol appends, whereas a single "greater than" symbol will overwrite the target file.
Answered 11/05/2004 by: bkelly
Red Belt

Please log in to comment
0
Thanks for all the help guys. I have decided to go for WiseScripting as it seemed to provide the easiest solution.

Cheers

Matt
Answered 11/08/2004 by: mjccheshire
Senior Yellow Belt

Please log in to comment
0
Just a thought, but if you have your own DNS servers, why not just add the relevant host record there - instead of editing the local hosts file?

That way you can manage the record centrally and it will save you the bother of editing the hosts file as part of your install routine..

Cheers,
Rob.
Answered 11/09/2004 by: MSIPackager
Third Degree Black Belt

Please log in to comment
0
Would love to mate but I don't control the servers.

Plus there are only a limited number of people who need access to this so we are trying to limit it.

Cheers for the suggestion though.

Matt
Answered 11/09/2004 by: mjccheshire
Senior Yellow Belt

Please log in to comment
Answer this question or Comment on this question for clarity