How do I determine which profile the user is currently using? For example, are they using the Default profile or the SDL Trados profile?
How do I determine which profile the user is currently using? For example, are they using the Default profile or the SDL Trados profile?
Hi David
The info for the current user profile is stored in the 'BaseSettings.xml' file located in the following location:
C:\Users\[USER NAME OF CURRENT USER]\AppData\Roaming\SDL\SDL Trados Studio\11.0.0.0
In here you should see something like this:
<SettingsGroup Id="IUserSettingsService">
<Setting Id="CurrentUserProfileFilePath">C:\Users\faziz\AppData\Roaming\SDL\SDL Trados Studio\11.0.0.0\UserProfiles\Builtin\Default.sdlprofile</Setting>
</SettingsGroup>
So for my instance of Studio the 'Default' profile is enabled.
Thanks
Fas
Fas Aziz | Desktop Life Cycle Service Manager | SDL | Support Operations, Support Lifecycle
Hi David
The info for the current user profile is stored in the 'BaseSettings.xml' file located in the following location:
C:\Users\[USER NAME OF CURRENT USER]\AppData\Roaming\SDL\SDL Trados Studio\11.0.0.0
In here you should see something like this:
<SettingsGroup Id="IUserSettingsService">
<Setting Id="CurrentUserProfileFilePath">C:\Users\faziz\AppData\Roaming\SDL\SDL Trados Studio\11.0.0.0\UserProfiles\Builtin\Default.sdlprofile</Setting>
</SettingsGroup>
So for my instance of Studio the 'Default' profile is enabled.
Thanks
Fas
Fas Aziz | Desktop Life Cycle Service Manager | SDL | Support Operations, Support Lifecycle
Here is the actual code I used to get a strongly typed object to represent that file:
XmlReader reader = null;
try
{
reader = XmlReader.Create(_baseSettingsFile);
}
catch (Exception e)
{
PromptFailedToReadBaseSettings(e.Message);
return;
}
ISettingsBundle baseSettings = SettingsUtil.DeserializeSettingsBundle(reader, null);
ISettingsGroup userSettingsService = baseSettings.GetSettingsGroup("IUserSettingsService");
Setting<string> currentUserProfileFilePathSetting = userSettingsService.GetSetting<string>("CurrentUserProfileFilePath");