Add using XML - Not working with Special Characters

I think WyUpdate and WyBuild are really great products, and I've been able to customize and use them for my application with great success. However, I think there's a possible bug in the implementation of the command line parameters to create updates using xml. Either that, or I'm using the file incorrectly somehow.I get an error when my xml file contains special characters (specifically the '&' character in my case). If one of my source files has an '&' character in its name, I get an error saying:

The update failed to build: An error occured while trying to add versions from the file "newversion.xml": An error occurred while parsing EntityName. Line 156, position 108.

And the xml file's 107th character on line 156 is '&'. I won't include the whole xml file here, but line 156 is:

<File source="C:\Documents and Settings\STB\Desktop\TEST\ARMS Updater\Releases\0.1\basedir\CompactRepair\C&RepairAccess.exe" />

The structure of the xml file is correct - because it's created programmatically, and the updater accepts it for other folders...

However, the same folder with files including special characters work correctly if added using the drag and drop interface.

Also, I was wondering how WyUpdate handles overwriting files. If I add a file in a new version which doesn't exist in previous versions on the server, but does exist in the client's machine, is there any way of specifying how the situation is handled? (An option to merge the files perhaps, or to keep the old file, or overwrite it with the new one?) Finally, my last query is one related to creating application shortcuts. Is it possible to implement shortcuts by drag and drop if one is using the GUI to build the updates? Or do they have to be added by right-clicking and selecting Create Shortcut?

Thank you for your help, and for creating a wonderful product.

I think WyUpdate and WyBuild are really great products, and I've been able to customize and use them for my application with great success. However, I think there's a possible bug in the implementation of the command line parameters to create updates using xml. Either that, or I'm using the file incorrectly somehow.I get an error when my xml file contains special characters (specifically the '&' character in my case). If one of my source files has an '&' character in its name, I get an error saying:

The update failed to build: An error occured while trying to add versions from the file "newversion.xml": An error occurred while parsing EntityName. Line 156, position 108.

And the xml file's 107th character on line 156 is '&'. I won't include the whole xml file here, but line 156 is:

<File source="C:\Documents and Settings\STB\Desktop\TEST\ARMS Updater\Releases\0.1\basedir\CompactRepair\C&RepairAccess.exe" />

The structure of the xml file is correct - because it's created programmatically, and the updater accepts it for other folders...

However, the same folder with files including special characters work correctly if added using the drag and drop interface.

XML files require certain characters be encoded. For example "&" is "&amp;" in xml files. There are several other characters like that.

So you'd write this instead:

<File source="C:\Documents and Settings\STB\Desktop\TEST\ARMS Updater\Releases\0.1\basedir\CompactRepair\C&amp;RepairAccess.exe" />

Also, I was wondering how WyUpdate handles overwriting files. If I add a file in a new version which doesn't exist in previous versions on the server, but does exist in the client's machine, is there any way of specifying how the situation is handled? (An option to merge the files perhaps, or to keep the old file, or overwrite it with the new one?)

wyUpdate replaces the file in this case. If you're upgrading default config files, I'd do what wordpress does: Create a default "blank" config file like "wp-config-example" and then your program will take these defaults and copy them over to "wp-config" if it doesn't already exist.

That way when you update the example config file you won't harm your users settings. You'll just be updating the blank file.

Finally, my last query is one related to creating application shortcuts. Is it possible to implement shortcuts by drag and drop if one is using the GUI to build the updates? Or do they have to be added by right-clicking and selecting Create Shortcut?

They can only be created using the GUI by right clicking a file. The reason is that the shortcut has to be associated with file that exists on your users' machine (which differs between Languages, Windows versions, etc.). So wyUpdate creates the files on the fly referencing the correct file on your users machine.

Thank you for your reply - and for the information about the xml characters - I'd written a small program to generate the xml files, hadn't taken character conversion into consideration. And the suggestion about copying the config file was rather useful.I have a suggestion about adding shortcuts by drag and drop - a possible way of going about it could be that on adding a shortcut by drag and drop, wyBuild could check to see if it references a file in the project (by comparing the shortcut target with the sources of the files in the project). If it finds a match, it could create a shortcut accordingly. For instance, if the basedir in the project has a file called Readme.txt, with the source set to C:\Info.txt, and someone adds a shortcut to commstartmenu, pointing to C:\Info.txt, it could be replaced with a shortcut to %basedir%\Readme.txt automatically.That's just a suggestion - it would be rather handy, because at the moment, creating an update involves dragging a set of files from the new release to basedir, then right clicking and creating shortcuts for a whole lot of executables, moving them to respective places in different folders, renaming them etc - which does get a little cumbersome. Not to mention the chances of typos!Thanks for an awesome product though, and I do hope you'll take the suggestion into consideration.

Also, is there any way of adding shortcuts to the current users start menu rather than the common start menu? And the current users desktop for that matter?

Thanks once again.

Thank you for your reply - and for the information about the xml characters - I'd written a small program to generate the xml files, hadn't taken character conversion into consideration. And the suggestion about copying the config file was rather useful.

I have a suggestion about adding shortcuts by drag and drop - a possible way of going about it could be that on adding a shortcut by drag and drop, wyBuild could check to see if it references a file in the project (by comparing the shortcut target with the sources of the files in the project). If it finds a match, it could create a shortcut accordingly. For instance, if the basedir in the project has a file called Readme.txt, with the source set to C:\Info.txt, and someone adds a shortcut to commstartmenu, pointing to C:\Info.txt, it could be replaced with a shortcut to %basedir%\Readme.txt automatically.

That's just a suggestion - it would be rather handy, because at the moment, creating an update involves dragging a set of files from the new release to basedir, then right clicking and creating shortcuts for a whole lot of executables, moving them to respective places in different folders, renaming them etc - which does get a little cumbersome. Not to mention the chances of typos!

I agree with you, this is definitely a problem. We're going to be solving the problem in wyBuild 2.7 & 2.8 - trying to whittle down the number of clicks to release a new version to 1 or 2.

Also, is there any way of adding shortcuts to the current users start menu rather than the common start menu? And the current users desktop for that matter?

Sure, we'll add this to wyBuild 2.6.