EzDevInfo.com

roaming-profile interview questions

Top roaming-profile frequently asked interview questions

Restore roaming profiles on Server 2008

Awhile back our Windows server 2008 Domain Controller crashed. It was restored by an outside IT company, but they did not restore everything they should have like roaming profiles.

Clients still have the the Roaming folder in USERNAME\App Data directory. If I fill in the profile field for the user in the active directory information on the server will the Roaming profile be pulled back to the server or will the Roaming folder be overwritten with a blank roaming profile?


Source: (StackOverflow)

How to save user.config to AppData\Roaming folder instead of AppData\Local?

Introductory Example

This code

Properties.Settings.Default.MyUserSettingBlah = "some new value";
Properties.Settings.Default.Save();

saves the user.config file to

C:\Users\MyUserName\AppData\Local\My_Company_Name\MyApp_Url_vb2s5kwidefdmxstmabckatcyl5t0lxd\1.0.0.0\user.config

Question

How can I save user.config to

  • C:\Users\MyUserName\AppData\ Roaming \...

instead of

  • C:\Users\MyUserName\AppData\ Local \... ?

Source: (StackOverflow)

Advertisements

Best Practices for Roaming Profile Support Testing

We need to ensure that a Windows app that we make (which includes Office plugins) works right when installed in a Roaming Profile environment. Can anyone supply procedures, or a pointer to procedures, for

  1. Setting up a test AD domain for use in testing with roaming profiles
  2. testing

The fact that we've got Office plugins implies, of course, that we've got COM objects.


Source: (StackOverflow)

VS 2015 settings roaming broken

I've installed VS 2015 Enterprise on 2 machines and I've entered the same LiveId as the VS-login in both. If I now switch lets say from light to dark theme in one studio this change won't make it to the other one even when I wait a couple of days.

I found this VS-Blog-entry from last year which seems to describe the same behavior but it is inconclusive and if I use Fiddler I can't see any HTTP 409 as it is assumed there.

Am I the only one facing this?


Source: (StackOverflow)

roaming profile does not save my documents

My windows 7 blew up and I installed windows10. I was able to log into the roaming profile but I am missing all my libraries and documents. Is this normal and can I find them somewhere on the server? I'm on MS server 2012.

I'm a noob and have minimal experience doing MS sys admin, but I have access to all the servers and can learn it with some help.


Source: (StackOverflow)

Can I configure a roaming user profile on a Windows Xp Pro SP3 system?

For testing purposes I need to see how my code behaves when a Windows user account is set up as "roaming". Can I somehow configure my Windows XP SP3 Professional to do that (if not, what about Vista or Windows 7)?


Source: (StackOverflow)

How to work around LocalFileSettingsProvider requiring Full Control/OwnerRights

In my .NET client application I use the default settings provider with Scope=User and Roaming=True. This works fine in most environments, no matter if client or Terminal Server, except for a customer with a Citrix Terminal Server farm. Whenever Properties. Settings.Default.Save() is called, the following exception is thrown:

System.UnauthorizedAccessException: Attempted to perform an unauthorized operation.
   at System.Security.AccessControl.Win32.SetSecurityInfo(ResourceType type, String name, SafeHandle handle, SecurityInfos securityInformation, SecurityIdentifier owner, SecurityIdentifier group, GenericAcl sacl, GenericAcl dacl)
   at System.Security.AccessControl.NativeObjectSecurity.Persist(String name, SafeHandle handle, AccessControlSections includeSections, Object exceptionContext)
   at System.Security.AccessControl.NativeObjectSecurity.Persist(String name, AccessControlSections includeSections, Object exceptionContext)
   at System.Security.AccessControl.FileSystemSecurity.Persist(String fullPath)
   at System.Configuration.Internal.WriteFileContext.DuplicateTemplateAttributes (String source, String destination)
   at System.Configuration.Internal.WriteFileContext.DuplicateFileAttributes(String source, String destination)
   at System.Configuration.Internal.WriteFileContext.Complete(String filename, Boolean success)
   at System.Configuration.Internal.InternalConfigHost.StaticWriteCompleted(String streamName, Boolean success, Object writeContext, Boolean assertPermissions)
   at System.Configuration.Internal.DelegatingConfigHost.WriteCompleted(String streamName, Boolean success, Object writeContext, Boolean assertPermissions)
   at System.Configuration.ClientSettingsStore.ClientSettingsConfigurationHost.WriteCompleted(String streamName, Boolean success, Object writeContext)
   at System.Configuration.UpdateConfigHost.WriteCompleted(String streamName, Boolean success, Object writeContext)
   at System.Configuration.MgmtConfigurationRecord.SaveAs(String filename, ConfigurationSaveMode saveMode, Boolean forceUpdateAll)
   at System.Configuration.ClientSettingsStore.WriteSettings(String sectionName, Boolean isRoaming, IDictionary newSettings)
   at System.Configuration.LocalFileSettingsProvider.SetPropertyValues(SettingsContext context, SettingsPropertyValueCollection values)
   at System.Configuration.SettingsBase.SaveCore()
   at System.Configuration.SettingsBase.Save()

The reason for this exception:

  • System.Configuration.Internal.WriteFileContext writes a new copy (...newcfg) of the user settings in the user's roaming profile. Then, DuplicateTemplateAttributes tries to modify the ACLs of this file and explicitly set the ownership to the current user.
  • In the case of this customer this fails because the roaming profile is stored on a file share and the users have only Read and Change permissions, but not Full Control. They probably have Full Control in NTFS (because by default you are "Owner" of all files you create, and as the owner, you can do anything with the file no matter if you have "Full Control" explicitly set), but it seems like its blocked on the SMB share level.

This behavior doesn't make any sense to me: Given that the LocalFileSystemProvider always uses a private profile folder of the current user (local or roaming), we can safely assume that the user is the owner anyway.

Since WriteFileContext catches the exception, deletes the temporary .newcfg file and then rethrows, there is no way to simply catch the exception in my code and rename the file or somehow grab its content since it is already deleted when the exception is thrown.

I couldn't find any simple way to work around this issue except for implementing my own settings provider. For this, it seems like I even would have to rebuild things like the serialization part since all the System.Configuration stuff used for this is internal. And of course I don't want to break the currently used settings, so it looks like a ridiculous amount of code just to rebuild everything as it is with just "one line commented out" (setting the owner of the file).

Any ideas what else I could try?

There is no way the customer changes anything in its file share permissions...


Source: (StackOverflow)

What is the difference: LoadUserProfile -vs- RegOpenCurrentUser

These two APIs are very similar but it is unclear what the differences are and when each should be used (Except that LoadUserProfile is specified for use with CreateProcessAsUser which I am not using. I am simply impersonating for hive accesss).

LoadUserProfile http://msdn.microsoft.com/en-us/library/bb762281(VS.85).aspx

RegOpenCurrentUser http://msdn.microsoft.com/en-us/library/ms724894(VS.85).aspx

According to the Services & the Registry article: http://msdn.microsoft.com/en-us/library/ms685145(VS.85).aspx we should use RegOpenCurrentUser when impersonating.

But what does/should RegOpenCurrentUser do if the user profile is roaming - should it load it?

As far as I can tell from these docs, both APIs provide a handle to the HKEY_CURRENT_USER for the user the thread is impersonating. Therefore, they both "load" the hive i.e. lock it as a database file and give a handle to it for registry APIs.

It might seem that LoadUserProfile loads the user profile in the same way as the User does when he/she logs on, whereas RegOpenCurrentUser does not - is this correct? What is the fundamental difference (if any) in how these two APIs mount the hive?

What are the implications and differences (if any) between what happens IF

  1. A user logs-on or logs-off while each of these impersonated handles is already in use?

  2. A user is already logged-on when each matching close function (RegCloseKey and UnloadUserProfile) is called?


Source: (StackOverflow)

Windows: How to canonicalize a file to the special folder?

i want to to persist some filenames for the user (e.g. recent files).

Let's use six example files:

  • c:\Documents & Settings\Ian\My Documents\Budget.xls
  • c:\Documents & Settings\Ian\My Documents\My Pictures\Daughter's Winning Goal.jpg
  • c:\Documents & Settings\Ian\Application Data\uTorrent
  • c:\Documents & Settings\All Users\Application Data\Consonto\SpellcheckDictionary.dat
  • c:\Develop\readme.txt
  • c:\Program Files\Adobe\Reader\WhatsNew.txt

i'm now hard-coding path to special folders. If the user redirects their folders, roams to another computer, or upgrades their operating system, the paths will be broken:

i want to be a good developer, and convert these hard-coded absolute paths to relative paths from the appropriate special folders:

  • %CSIDL_Personal%\Budget.xls
  • %CSIDL_MyPictures%\Daughter's Winning Goal.jpg
  • %CSIDL_AppData%\uTorrent
  • %CSIDL_Common_AppData%\Consonto\SpellcheckDictionary.dat
  • c:\Develop\readme.txt
  • %CSIDL_Program_Files%\Adobe\Reader\WhatsNew.txt

The difficulty comes with the fact that there can be multiple representations for the same file, e.g.:

  • c:\Documents & Settings\Ian\My Documents\My Pictures\Daughter's Winning Goal.jpg
  • %CSIDL_Profile%\My Documents\My Pictures\Daughter's Winning Goal.jpg
  • %CSIDL_Personal%\My Pictures\Daughter's Winning Goal.jpg
  • %CSIDL_MyPictures%\Daughter's Winning Goal.jpg

Note also that in Windows XP My Pictures are stored in My Documents:

%CSIDL_Profile%\My Documents
%CSIDL_Profile%\My Documents\My Pictures

But on Vista/7 they are separate:

%CSIDL_Profile%\Documents
%CSIDL_Profile%\Pictures

Note: i realize the syntax %CSIDL_xxx%\filename.ext is not valid; that Windows will not expand those keywords like they are environment strings. i'm only using it as a way to ask this question. Internally i would obviously store the items some other way, perhaps as a CSIDL parent and the tail of the path, e.g.:

 CSIDL_Personal         \Budget.xls
 CSIDL_MyPictures       \Daughter's Winning Goal.jpg
 CSIDL_AppData          \uTorrent
 CSIDL_Common_AppData   \Consonto\SpellcheckDictionary.dat
 -1                     c:\Develop\readme.txt   (-1, since 0 is a valid csidl)
 CSIDL_Program_Files    \Adobe\Reader\WhatsNew.txt

The question becomes, how to use, as much as possible, paths relative to canonical special folders?


I'm thinking:

void CanonicalizeSpecialPath(String path, ref CSLID cslid, ref String relativePath)
{
   return "todo";
}

See also


Source: (StackOverflow)

Is there any way to determine if the iphone is roaming?

I am working on an iPhone application and would really like to determine if the device is roaming so that I can intelligently avoid costing my users expensive connections if out of their home network.

The application I am writing is for jailbroken phones, however I would prefer to use standard SDKs if possible.

Here is what I've already found:

1. Apple SDKs: In the apple documentation, I found the promise in Apple's SCNetworkReachability API. The API provides access to such things as whether you are on a WIFI or a cell phone network, whether a network connection is currently established, etc. However searching the SCNetworkReachability API reference pdf for 'roam' or 'roaming' both turn up nil. So does their sample code.

2. Grep of a Jailbroken iPhone FS: The preferences -> general -> networking tab is where users can turn on or off their roaming. Looking in the plist file for this ("/Applications/Preferences/Network.plist") I was able to find the following references:

        PostNotification = "com.apple.commcenter.InternationalRoamingEDGE.changed";
        cell = PSSwitchCell;
        default = 1;
        defaults = "com.apple.commcenter";
        key = InternationalRoamingEDGE;
        label = "EDGE_ROAMING_TOGGLE";
        requiredCapabilities =             (
            telephony
        );

This is certainly a lead, as it appears I can sign up for notifications that the user has changed the InternationalRoaming settings. Still, I'm not certain how to turn this into the knowledge that they are in fact, presently roaming.

3. Check the class dumped sources of SpringBoard: I've dumped the classes of SpringBoard using class-dump. I was unable to find any references to 'roam' or 'roaming'

4. Obviously I started by checking at SO for this: Couldn't find anything related.

Further steps: Does anyone have any advice here? I know this is possible. Apple clearly has made it very difficult to find however. I highly doubt this is possible without using a private framework. (such as CoreTelephony). As this is a jailbroken app, I may resort to screen-scraping the the carrier name with injected code in the SpringBoard, but I would really rather prefer not to go that route. Any advice much appreciated. Thanks.


Source: (StackOverflow)

Where should I store machine-wide application settings for non-roaming users?

I have a WPF application that must run for all users of a machine with the same settings. The settings must be read/write. I have previously been storing user configuration settings in CommonApplicationData, for example

var settingsFile = Path.Combine(Environment.GetFolderPath(
  Environment.SpecialFolder.CommonApplicationData),
    "[company]", "[product]", "settings.xml");

However I read this morning that CommonApplicationData is used for roaming profiles, meaning they are not machine specific. From what I can find, we have the following options for application data (source):

// Store application-specific data for the current roaming user.
// A roaming user works on more than one computer on a network.
// A roaming user's profile is kept on a server on the network and is loaded onto a system ' when the user logs on.
System.Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);


// Store in-common application-specific data that is used by all users.
System.Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData);


// Store application-specific data that is used by the current, non-roaming user.
System.Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);

To summarize, the options are

  • Single user, roaming
  • All users, roaming
  • Single user, non-roaming

What I need is all users, non-roaming. My initial thought is to chuck it all into the install folder, but that seems a little old-school?

Thoughts?


Source: (StackOverflow)

OS X mobile / portable / roaming profiles

I'm working in a small but growing agency for software development. At this time I have 8-10 coworkers, we have 8 iMacs, 1 Windows Machine and several Macbooks / Windows Notebooks.

We need the possibility to switch the devices / offices between the developers without the need for reconfiguring every profile at every machine. I took a look into the possible solutions:

  1. Open Directory via OS X Server
  2. Open Directory via Linux Server
  3. Active Directory via Windows Server
  4. Activa Directory with Samba 4 via Linux Server

Without tending to one of those solutions we need a setup which allows mobile profiles for the notebooks. The only way to archive this are roaming profiles with active (/open) directory and kind of a profile-to-server-sync solution. I tried (successfully using NFS / AFP / SMB1-3) to move the complete home to a network drive, but the performance is not satisfying and there are a lot of troubles using Android Studio / XCode / Webstorm (Or any Jetbrains IDE)..

I can't be true that we are the only company in the world facing this challenge, is there anybody out there with a working setup? Please keep in mind that profiles with a network mount are not a working solution (file locks aren't working well e.g.) unless you have a fancy working protocol for this (I even tried SFTP - thanks to fuse).

I'm thankful for any ideas :)


Source: (StackOverflow)

Application/User Settings with Roaming Profiles

Hi Guys any help would be much appreciated.

We have an application that’s installed at several locations but we are having an issue at one particular site. In short the application settings (My.) are not being saved after a reboot. The application is build in VB.Net v3.5 Framework and we are not experiencing any issues elsewhere.

This particular site is using roaming profiles and the network administrator ensures us that the correct permissions are applied to the user account(s) and all application data is being saved to the server. I’ve asked the network admin to check for the existence of the user settings file user.config in the Application Data directory and he says it doesn’t exist.

In our application we store the connection string to the database in the application settings under the user scope. If no connection string is present or if one is present and a connection to the database cannot be made then a form is shown asking the user for the database credentials. Each morning when the users boot the machine and opens the application for the first time they are asked for these credentials but if they close the application and restart it they are not asked for them. This indicates to us that the settings are being saved but once the pc is rebooted and the application is opened for the first time they are asked for the database credentials. This seems like the settings are not persisting after a reboot.

Any thoughts/feedback would be much appreciated.


Source: (StackOverflow)

Outlook 2010 signatures profile dissapearing

I am working on a service desk/position, not too long though, and this morning when I logged in on my machine and on my company citrix machine I tried to reply from citrix and I suddenly realize that my signature profile has disapeared.

When I asked my colleagues if they have had the same issue they said yes, so I started to search for some kind of a resolution but the only one that made sense was a resolution for the problem on Oulook 2003.

On 2003 installation Outlook creates a registry key named 'first run' or something like that and if you work with more than one server like I do when I connect to the citrix machine and if the value is different from server to server, outlook seems to think that you are on your first run and creates you a new profile. So the fix on 2003 is that you need to set the same value to the first run key on all citrix servers.

But 2010 seems that it doesn`t create the reg key that I mentioned earlier so if someone can help me with this I will really appreciate it! Thank you in advance.


Source: (StackOverflow)

Setting Roaming Profile via GPO

we like to change our Roaming Profile setting. Since only 10% of our company really needs them, we like to deactivate them for the majority and only apply them to those 10%.

However via investigating into this topic I came across a Problem. The Roaming Profile setting is as it seems set via a Computer Policy. This is a problem as I want to give certain users a Roaming Profile according to a group membership and not everyone using a certain computer.

I don't know how I can solve this and maybe you can help me?

  1. I want to create a Group for people who should get a Roaming Profile
  2. I want to create a GPO setting so that only people in this Group will get a Roaming Profile

P.S. We are a quite big company with many sites in different countries. I will use a variable %Site% to determine the profile Path for for every user. so it looks something like: \domain\dfs\%site%-profile\%USERNAME%


Source: (StackOverflow)