First off... I didn't realize you were backing up to the same box that the logs are on. I saw the UNC and assumed you just 'sterilized' the names and that it was backing up to a central repository.
I notice between your first and last post that the share name is different. In the first it's a visible share, while in the last it's hidden.
One small point. When using a $ in quotes always double them up as:
backupeventlog('\\' + $server + '\Application', '\\' + $server + '\evtlogs$$\' + $appname)

I suggest you try it with a local path with drive letter instead of UNC.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.