ACAT.Applications.ACATTalk.Program.createUserAndProfile C# (CSharp) Method

createUserAndProfile() private static method

Creates the user and profile directories if they don't exist
private static createUserAndProfile ( ) : bool
return bool
        private static bool createUserAndProfile()
        {
            if (!UserManager.CurrentUserExists())
            {
                const string batchFile = "CreateUser.bat";

                if (!createUser(batchFile, UserManager.CurrentUser))
                {
                    return false;
                }
            }

            if (!ProfileManager.ProfileExists(ProfileManager.CurrentProfile))
            {
                ProfileManager.CreateProfile(ProfileManager.CurrentProfile);
            }

            if (!ProfileManager.ProfileExists(ProfileManager.CurrentProfile))
            {
                MessageBox.Show("Could not find profile " + ProfileManager.CurrentProfile);
                return false;
            }

            return true;
        }