Highlighted
Enthusiast
Enthusiast

How do remove specific *.lnk files after User log in?

Hi , we want to delete e.g:

<AppData>\Microsoft\Windows\SendTo\Fax Recipient.lnk

Today we do this over the Profile Cleanup which only works when the user logs out but we wanna do it while the user first logs in, any ideas?

Thanks!

2 Replies
Highlighted
VMware Employee
VMware Employee

Hi system32AUT,

Just doing so from a script (and running that as a UEM logon task, if you'd like) is the first thing that comes to mind.

You could use profile cleanup, although it's a a bit of a hack...

  • Create a SpecialCleanup.INI config file, with just profile cleanup settings. Turn off Process during logon and logoff on the Advanced tab if you want to prevent it running at logoff as well.
  • Run "C:\Program Files\Immidio\Flex Profiles\FlexEngine.exe" -i "%UEMConfigShare%\SpecialCleanup.INI" -s DoesNotMatter.zip -b- -f- as a UEM logon task
    • -s DoesNotMatter.zip : File-based exports require a profile archive file name (rather than the profile archive folder that's specified in your normal configuration). However, as there is no import/export content, no profile archive will actually be created, so the name does not matter.
    • -b- : Turn off backups, just in case you have it turned on in your normal configuration, as that would result in an error message about requiring a backup file name. No backup will be created anyway, as no profile archive will be created, but we don't know that at the time we're parsing command-line arguments.
    • -f- : Turn off logging, so as not to run into file locking conflicts with the path-based import that is still running. Alternatively, you could use -f path\to\other.log to log to another log file.
Highlighted
Enthusiast
Enthusiast

Thanks UEMdev, could you maybe take my question as a feature request for UEM 9.8 in a simplier way over the GUI like click and play u know Smiley Happy