Highlighted
Ash Regular Contributor.
Regular Contributor.
374 views

Script to clear Recents, Favourites and Searches etc

Hi guys,

I am a CM trainer and we use training accounts in a training dataset, after each session I'm having to go through clearing recent searches, recent documents, recent folders, favourite records, favourite classifictions etc.

I am wondering if it is possible to run a script or something to clear this stuff out without having to do it manually on each of our training logins.

Thanks in advance!

Cheers

A

 

0 Likes
2 Replies
Super Contributor.. davros29 Super Contributor..
Super Contributor..

Re: Script to clear Recents, Favourites and Searches etc

Disclaimer - this is untested. If you have access to the database, something like this should work.

delete from TSLABELITE
where uri in (
  select lbi.uri
  from TSLABEL lb with (nolock), TSLABELITE lbi with (nolock)
  where lb.uri = lbi.lbiLabelUri
  and lb.lbLocUri in (123,124,125)
)

Where 123,124,125 are the URIs of the training accounts in TRIM.

Or this would delete items from all favourites, recents, work trays and labels for everyone. 

delete from TSLABELITE
where uri in (
  select lbi.uri
  from TSLABEL lb with (nolock), TSLABELITE lbi with (nolock)
  where lb.uri = lbi.lbiLabelUri
  and lb.lbLocUri > 0
)
Ash Regular Contributor.
Regular Contributor.

Re: Script to clear Recents, Favourites and Searches etc

Hi Davros,

Thanks for that - unfortunately I don't have access to our database which sucks so I was kind of thinking more along the lines of a reg key or a script I could run on the training laptops once users have concluded their training.

Thanks anyway mate, have noted this if I ever get access to the database. 

cheers

A

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.