mdolan Posted November 11, 2009 Posted November 11, 2009 While this isn't actually a Windows 7 question, it's a migration question with regards Windows 7 supplied tools :-)I hope someone might be able to help with this. I'm doing some work with USMT4 and I have an app that stores data in a folder. This folder is per user specific and to get the information I need to:a) Read the user registry to get the INI locationB) Open the INI file and read the entry that contains the data folderc) Backup the data folderNow I've done some reading of the USMT reference guide and in theory this is possible. In practice I'm failing miserably, so I'm hoping someone can point out the error of my ways :-). Unfortunately the reference/examples for INI reading is very sparse.Here is my USMT XML:<?xml version="1.0" encoding="UTF-8"?><migration urlid="http://www.microsoft.com/migration/1.0/migxmlext/test"> <!-- Multi-User migrate setup --> <component context="User" type="Documents"> <environment> <variable name="testINIPath"> <script>MigXmlHelper.GetStringContent("Registry","HKCU\Software\Mike [testINI]")</script> </variable> <variable name="testDataPath"> <script>MigXmlHelper.GetStringContent("INI","%testINIPath%|Notes[Directory]")</script> </variable> </environment> <displayName>Multiuser app</displayName> <role role="Data"> <rules> <include> <objectSet> <pattern type="File">%TestDataPath%\* [*]</pattern> </objectSet> </include> </rules> </role> </component></migration>So the theory is:a) The variable "testINIPath" gets populated from the registry HKCU\Software\Mike [testINI]B) Using the fully named INI (in the testINIPath variable), the INI is opened and then entry "Directory" (from the "Notes" section) is retrieved into "testDataPath"c) The contents of "testDataPath" is backed up.But as I've stated it does nothing :-(Pointers welcomed - and if this is the wrong forum, if someone could point me to the correct place it would be appreciated.Cheers,Mike
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now