Best Practice dictates that when personalising an application it should be placed into an Application Group, even if you are only intending to personalise one exe disparate to all others. The theory being if in the future you find you need to add other exe's to the group and maintain settings then this can easily be done.
One of the things I then come across is clients wanting to adhere to Best Practice and therefore creating an Application Group and moving to this instead of the individual exe being personalised. This leads to the burning question, what do we do about existing users? Looking at documentation and speaking to AppSense support there isn't any easy answer so usually its easy to go with the clean start approach. However there is an alternative (there are others including PSExport and SQL scripting but that's beyond me am afraid). The alternative being EMP File Utility. This is installed when installing the AppSense tools from the installation media. The documentation (in my eyes) isn't brilliant nor easy to follow, well I don't think so anyway. So for my own future memory here goes:
Export of Data
Firstly we need to export out an individual users personalisation, this is achieved by running EMP File Utility from the Start Menu - AppSense - Environment Manager - Tools.
Next we need to connect to the Personalisation Database, to do this entering a command along the lines of:
SET EMPFileUtilConnectionString= Data Source=(Database server\Instance);Initial Catalog=PersonalizationServer; Integrated Security=SSPI
Obviously entering the correct Database name and if required, Instance, the brackets are not needed in the command Line.
Once we have connected to the database we then need to perform the export using a command line in the following format:
EMPFileUtil EXPORT <username> <usergroup> <application> <database root> <output folder>
The above is taken from the Environment Manager Administrative Tools Guide, available from myappsense or the installation media. The username is in the form Domain\User and usergroup is the name of the Personalization Group. Database root refers to the root of the file tree, eg CSIDL_APPDATA, however for the purposes of exporting all data we use a wildcard *. The added benefit to this is that it also exports the fbr associated with the application. Following that we add a path to an empty folder we will populate with the relevant personalisation.
A correct example of this would be:
EMPFileUtil EXPORT Domain\User "Personalisation Group Name" "Individual personalised exe" * c:\exportedpers\username
Import of Data
The first step in importing this is to create an xml file. The format of this again is taken from the Admin Guide and is shown below:
<?xml version="1.0" encoding="utf-8"?>
<Users>
<User
Name="appsense\smithj"
RetrieveSID="yes" >
<Application
Name="Notepad"
Type="single"
DeleteExisting="yes"
RootFolder="c:\TestImport\Notepad" />
</PersonalizationGroup>
</User>
</Users>
It is worth noting that we can have multiple user sections as well as multiple applications for each user, to have additional users we just need to repeat <User going down to </User>. Most of the other information is self explanatory, type is either single for an individual exe (as per our requirements in this case) or group if we are exporting data out of an existing Application Group., delete existing does what it says on the tin.
We then save our xml somewhere and again using EMPFileUtil we use the following format of command:
EMPFileUtil IMPORT c:\exportedpers\username
And there we have it, its quite straightforward but obviously not practical if we have a huge number of users, but for the VIP users works a treat.
I guess its worth remembering there is also an EMP Registry Utility to just manipulate registry settings as well as a Migrate Utility which allows you to migrate user settings between disparate databases.
Apologies that this isn't very pretty to look at, I wanted to knock it up quick before I forgot what I've done.