Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

USMT - reading contents of an INI file

Featured Replies

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 location

B) Open the INI file and read the entry that contains the data folder

c) Backup the data folder

Now 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


Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.