def get_appdir(self, portable_path=None, folder=None, create=False):
        '''
        path = uac_bypass(file)

        This function will only operate when your program is installed
        check the is_installed function for details

        Moves working data to another folder. The idea is to get around
        security and uac on windows vista +

        returns cwd on linux, windows returns path with write
        access: C:\\ProgramData\\appname here

        if a file is passed in it will be appended to the path

        set create to true to create the file in the programData folder

        setting overwrite to True will silently overwrite, otherwise a
        FileExistsError is raised

        Setting overwrite to get, will get the file path instead of throwing an error

                                ---Background----
        If a user is using windows, Read write access is restriced in the
        Program Files directory without prompting for uac.

        We create a folder in c:\Program Data\ of the program name and
        save logging data etc there.

        This way the program doesnt need admin rights.

        '''
        if self.is_installed():
            appdir = appdirs.user_data_dir(self.app_name)
        elif portable_path:
            appdir = portable_path
            if not folder:
                folder = 'data^-^'
        else:
            appdir = os.getcwd()

        if folder:
            path = os.path.join(appdir, folder)
        else:
            path = appdir

        path = os.path.realpath(path)

        if create:
            os.makedirs(path, exist_ok=1)
        return path