Write into Text File Problem

Got a problem you cannot solve? Try here.
nbmkumar
Posts: 7
Joined: Tue Feb 07, 2006 4:02 am

Write into Text File Problem

Postby nbmkumar » Wed Feb 15, 2006 2:08 am

Hi,
We are using InstallAware Studio for creating Web Installer. In the Installer we need to add the user name and password in one of the config files in IIS. for that i tried to use the command Write into Text File. but i cannot see any change in the target file after installation.

my code looks like this:

[DEFINE REGION: Perform First Time or Maintenance Installation]
// Install/Re-Install product
Create Shortcut $SHORTCUTFOLDER$\\Uninstall ictm to $UNINSTALLLINK$
[OFFLINE CONTENT]
Install Files E:\\admin\\files\\ictm\\*.* to $TARGETDIR$\\ictm
Install Files E:\\admin\\files\\soft\\*.* to $TARGETDIR$\\ictm\\soft
Write into Text File $TARGETFIR$\\web.config from Value <configuration> (at start of file)
[DEFINE WEB MEDIA ictm]

I removed the file web.config from the installation and tried. The document says that it will create the file if the file doesnt exists. but it doesnt creating the file too.

And also i dont understand the text in the help that says
"This command does NOT execute through Windows Installer and is provided as a convenience to the setup author."

Does this means that Write into Text File is not a windows installer command?

Muthu

Gizm0
Posts: 339
Joined: Wed Nov 09, 2005 8:47 pm

Postby Gizm0 » Wed Feb 15, 2006 8:42 am

Hello,

You should apply the command on the Apply Installation section, not before or after it..

Thank you,
Panagiotis Kefalidis
Software Design Team Lead
\"In order to succeed, your desire for success should be greater than your fear of failure\"
InstallAware Software Corporation

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Wed Feb 15, 2006 11:46 am

Hi Kumar,

This is a very good question. Purple commands in the setup script (with default highlighting) are Windows Installer commands. You can think as if they are "cached" until Apply Install executes, then the "cache" is "flushed" as the MSI engine is invoked and performs all pending changes.

Black commands, on the other hand, execute immediately and they are handled by InstallAware. For instance the Write to Text File command does something which is not available at all through the MSI engine - Microsoft simply left it out. Therefore, InstallAware provides it as a convenience for you, in the form of a script command that executes right away.

So all you have to do is call the command after Apply Install executes. The reason it appears to not execute is probably because it modified a file that doesn't even exist yet, and which later got overwritten by the Install Files command that worked when Apply Install got called.
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/

nbmkumar
Posts: 7
Joined: Tue Feb 07, 2006 4:02 am

Postby nbmkumar » Thu Feb 16, 2006 3:33 am

Thanks for ur help.
I works Perfect. Why dont u add these details in the documentation or is it already there and i didnt go thro fully?

Muthukumaran.

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Thu Feb 16, 2006 6:03 am

Hi Muthukumaran,

Yes, its already available in the help. If you press F1 while the commands section of the script editor is highlighted (the region displaying all available commands to the left of your setup script), a help topic titled "Classes of Commands" shows - you may also look this up in the help index for more information.
Michael Nesmith

InstallAware

Home of The Next Generation MSI Installer

Get your free copy today - http://www.installaware.com/


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 134 guests