XMetaL 5.5 (SP1) DITA and Windows 7

I use XMetaL Author Enterprise for my work. We use a customized DITA Open Toolkit. With XMetaL, the customized files are placed in the Common Files folder under the XMetal Shared folder.

These files get updated from our version control system. Once there are updates, sometimes I need to make changes such as changing product name variables. Then, I need to refresh XMetaL by deleting the XMetal Shared folder under my user profile.

This used to work fine in Windows XP. It didn’t work in Windows 7. After some investigation, I’ve found the reason: Virtual Store.

I see the variable file changed in the Common Files folder. I deleted XMetaL Shared under my user profile. Then I see that XMetaL updates the shared folder in my user profile. But none of the changes I made to Common Files make it there.

In Windows 7, applications are not supposed to write to the Program Files folder after installation. Once an application tries to make changes to it’s Program Files folder, Windows 7 creates a folder for that application in the Virtual Store folder. From then onwards, all reads and writes from the application regarding these files are made in the Virtual Store folder. In other words, I was editing the DITA OT files in the Common Files folder but when XMetaL recreates the XMetaL Shared folder in my user profile, it was using the one in the Virtual Store (it didn’t know any better as Windows redirects it silently to Virtual Store).

However, if I make changes to the one in the Virtual Store instead, I have a problem as the source control system make changes directly to the Common Files folder – I gave it Administrator rights. So, you’ll have to give Admin rights to XMetaL too. But would that work?

Don’t know. I hate having to click Yes every time I start XMetaL with admin rights.

So, the solution is to turn off User Account Control. Then, copy all files in the Virtual Store’s Program Files folder back to Program Files, overwriting files in the main Program Files folder.

I never noticed it in Vista because I hate Vista’s UAC so much that I disabled it before even installing anything. I guess I have to live without UAC in Windows 7 too… at least until XMetaL changes the way it work with DITA OT.

Actually, you’ll experience the same problem with other software too. For example, I see hundreds of megabytes in the Virtual Store for my antivirus (McAfee Enterprise). Every time it updates, it tries to write to Program Files so Windows redirect it to Virtual Store. Waste of space.

There is another workaround to the virtual store which is to use system local policy to disable it. If you do this without disabling UAC, Windows 7 won’t create Virtual Store but applications that tries to write to Program Files will fail without any warning. You’ll need to give the application admin rights.

Another way,  more hassle but more secure, is to monitor the Virtual Store. Once you see an application using it, and it’s wasting space (like for antivirus updates), you can give admin rights to the application without having to turn off UAC. You’ll just have to click Yes every time you start the app, though.

So for me, no UAC. I’ll just have to be extra careful with what I install… well, I survived Windows XP for 7 years, didn’t I?

Information and Links

Join the fray by commenting, tracking what others have to say, or linking to it from your blog.

Other Posts

Write a Comment

Take a moment to comment and tell us what you think. Some basic HTML is allowed for formatting.

Reader Comments

I added your blog to bookmarks. And i’ll read your articles more often!