PDA

View Full Version : Including an XML file in "XML File Changes" causes install to rollback unexpectedly



PNorth
12-03-2004, 08:38 AM
Hi,

I have created an install package which works fine until I try to use the new "XML File Changes" functionality.

I have imported a very simple (3 Nodes) config file which is to be created by the install process, I am not trying to include any variables in the nodes (i.e. [INSTALLDIR]). Now when i run the install set i get the following results:

On Clean Win2000: The setup.exe starts installing then gives Error 27521: Setup requires XML 3.0 or higher. I have included XML 4.0 merge module as my software uses it but try as i might I can not get this to install first thus negating the need to pre-install or seperately ship XML 3.0.

On Win2000 SP4 (inc. XML 3.0 [msxml3.dll v8.40.9419.0]): The setup.exe installs all files, registers all components, then reads "Updating XML file c:\...". Then with no interaction from me, or error message, rolls back the installation then proceeds to the "This installation was interrupted before [Product] could be completely installed... Your system has not been modified". If I (as an experiment) remove or condition out the XML Custom Actions then the install completes successfully but of course no changes are made to the XML file.

The install package was created in Installshield Pro 10.5 inc. all updates found by the auto-updater, and I have not manually edited any of the msi tables. I have scoured the help files, community, FAQ pages & Google and have drawn a blank, has anyone got this new functionality to work and if so please could you point me in the right direction.

Many Thanks,

Paul North

aaron330i
12-07-2004, 01:58 PM
I am experiencing the exact same problem. I even created an installation from scratch and included a simple Xml file. It always rollsback with no message or explanation as to why.

aaron330i
12-13-2004, 12:41 PM
Apparently we're the only ones experiencing the problems...oh well, time to go back to installer components.

Tim Owers
12-14-2004, 04:19 AM
Nope, you are not alone. From full blown projects to a one file test, this functionality simply cannot be made to work. I suspect we are all doing something fundamentally wrong - it couldn't have been released just 'not working' - could it?
InstallShield, could you write an article or maybe a step by step example, of what we should be doing?
Tim Owers

PNorth
12-14-2004, 04:47 AM
..I thought i was going mad!

I sent the first post as a support request but was informed i needed to pay them first even if it was a bug with the program (after which i will be re-imbursed). As a small company i had enough difficulty getting the boss to buy just the software in the first place! I've already spent 2-3 days trying to get just this to work in different scenarios and have endured the scowls from above for it!

I have had similar issues with the new SQL functionality, whereby adding an SQL server into the build automatically gives me a "Log-on to SQL" dialog, but the dll that is supposed to interrogate the SQL Servers on the network returns no results so the drop-down box of servers is empty. :confused: As this is another new addition since version X could they be related? Or have you guys tested this successfully?

Cheers for reaffirming my sanity :)

Paul North

aaron330i
12-14-2004, 09:23 AM
..I thought i was going mad!

I sent the first post as a support request but was informed i needed to pay them first even if it was a bug with the program (after which i will be re-imbursed). As a small company i had enough difficulty getting the boss to buy just the software in the first place! I've already spent 2-3 days trying to get just this to work in different scenarios and have endured the scowls from above for it!


Cheers for reaffirming my sanity :)

Paul North

I got the same response...and it was the same day I purchased the program specifically because of this feature. So now my company spent a lot of money for zero additional benefit.

syoung
12-14-2004, 07:24 PM
I'm giving up on 10.5 back to 8. I can not get XML to work at all.

1: Installing XML file 'C:\mas\Test.xml'
Action 18:45:07: Progress Custom Action. Creating XML file C:\mas\Test.xml...
Action 18:45:07: Progress Custom Action. Updating XML file C:\mas\Test.xml...
1: MSXML 4 not installed, using MSXML 3...
1: XML file 'C:\mas\Test.xml' does not exist. Creating...
1: Processing XPath '//'
1: XPath '//' not found, creating...
1: Checking XPath '/'
1: CISXmlFile::CreateXPathElements - QueryInterface failed
1: Node name: '#document' --> Attribute name = 'Attribute1', Current Value = '', Operation = '1'
1: Node name: '#document' - Attribute name = 'Attribute1', Old Value = '', New value = 'Attribute Value', Actual New Value = 'Attribute Value'
Action ended 18:45:07: InstallFinalize. Return value 3.

wadams
12-17-2004, 11:01 AM
I am experiencing the same problems. Like PNorth I added an SQL Script to my project, and get the SQL Logon dialog. "Browse" however returns an empty Server list. I also import an XML config file with the intention of modifying a database connection string with the Server name [IS_SQLSERVER_SERVER] returned by the SQL dialog. I can get neither one to work! Unfortunately, 10.5 is the only IS product I have, so I have no fall back position. If anyone has a solution, I would greatly appreciate any input.

Walt

BenSaw
12-21-2004, 10:22 AM
This is covered in another thread as well. I currently have my .msi submitted for perusal by IS staff. I was successful ONLY when created a blank project with just a single .xml file; otherwise, the rollback as mentioned previously.

In the meantime, I see there's an SP1 for IS 10.5 - it mentions this issue - I'll report back on it. My 'fix' to this problem is below for anyone using a previous version. Pretty basic code, but at least it's already written ;)
Forgive me if it doesn't compile, I cut it from a larger function to make it readable, I might have missed a variable declaration.

The only trick is running the search/replace CA *after* you know the file has been deployed.

- Ben

function int FixUpConfigFile(hMSI)
number hFile; // file handle
string svFileInfo; // dummy param. here - used for another version of GetFileInfo
string directory, filename;
string fullFileSpec; // fully qualified pathname + filename
string svString; // string for reading file into
number nvFileSize, nvFileAttr;
int x; // ret val for StrReplace function
begin

if ( 0 != GetFileInfo (fullFileSpec, FILE_SIZE, nvFileSize, svFileInfo)) then
MessageBox ("Can't get file size.", SEVERE);
return 0;
endif;

OpenFileMode (FILE_MODE_BINARY);
OpenFile (hFile, directory, filename);

if (ReadBytes (hFile, svString, 0, nvFileSize) < 0) then
MessageBox ("ReadBytes failed - import config file.", SEVERE);
return 0;
endif;

// For this to work, the XM file has to be tagged with constant values that
// can be searched for.
// This was written for .config files only, and may or may not
// work fully for you
x = StrReplace(svString, "_VALUE_TO_BE_REPLACED_", "OutputString", 0);
// repeat for all the values you want to change


// truncate the file - not sure if this is possible another way, but at least this works
CloseFile (hFile);
FileDeleteLine (fullFileSpec, 0, DELETE_EOF);
OpenFile (hFile, directory, filename);

// write out the new data
SeekBytes (hFile, 0, FILE_BIN_START);
WriteBytes (hFile, svString, 0, StrLength(svString));
CloseFile (hFile);
end;

BenSaw
12-21-2004, 11:35 AM
Well, my bad - I saw the XML Changes topic under the 'features' of 10.5 SP1, not the 'bug fixes'.

Looks like it still has a case of the rollbacks.

- Ben

QuickFixPro
12-21-2004, 01:47 PM
I downloaded 10.5 for evaluation today...

The first thing I wanted to try was XML support...

Now I cannot make it work and it looks like I am not alone.

I wonder if anyone was able to import web.config successfully? For me it won't even import my AppSettings, only system.web. And, sure AppSettings is exactly what I want to be able to change. :(

PNorth
01-10-2005, 05:20 AM
Hi BenSaw,

Have you heard anything from IS staff about your submission or are they having as much trouble with it as we are?

Cheers,
North

BenSaw
01-11-2005, 11:45 AM
North -

Nothing yet - Ben

rsinclair
01-14-2005, 02:42 PM
:mad: This is pathetic. I upgraded a few days ago and this feature is the one I needed. Any of you people at InstallShield paying the slightest bit of attention to this thread? This feature DOES NOT WORK and the documentation for it is terrible.

rsinclair
01-14-2005, 03:17 PM
Also, try this:
Select an Element
Put the cursor in the Element Name textbox
Select a different element

Don't know if it does this to other people but on my machine, it changes the value of the second element to include the identifier from the string table. Not just displayed that way, the value actually changes.

Should we not be free of stupid flaws in a program like this by version 10?