Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Bystander-user operation record of playing psr problem recorder

2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

Requirements: when users access the internal desktop cloud and server on the public network, they need to record and save their operation records. At the beginning of the idea is to use screen video, to meet the needs of screencap software is to charge, the price is not cheap, the company has no plan to invest in this area. After tossing about for a long time, I inadvertently found that win7 had an artifact called psr (Problem Steps Recorder). Directly run psr, try to play, the results are very satisfactory, it is gratifying that the software supports the command line, with parameters to run silently! So tossed about for a day, found a way to play the other way. Powershell script: # first create a folder named by user name md "\\ server sharing path\ $env:username" on the stationery; # the method to start psr function psrStart {$FileName = Get-Date-Format 'yyyyMMddHHmmss';# uses the current date and time as the file name, which needs to be formatted out ":" Special character psr.exe / start / gui 0 / output "\\ server sharing path\ $env:username\ $FileName.zip" # / gui 0 means to run silently in the background. / output calls the method ending psr to save the path psrStop;#. Without this action, zip will not be saved. } function psrStop {count;# calls "timer" psr.exe / stop;Sleep-m 500 psr start;} function count {Sleep-s 20;} psrStart; as to why it is not logged out, run psr / start through a script. That's why I've been messing around for so long, because I found that psr / start must be used with psr / stop to save the zip file to your specified location, and forcing the end of the psr process will not be saved. However, when the user logs out of the system, the psr process is terminated before the script is called; I also try to start the running script of psr as a system service, but the results are not satisfactory. That is why every 20 seconds, end, start a psr action to achieve data preservation. If you have a good way to run the psr / stop command before the user clicks logout and ends the psr process, and there is a certain time for the generated zip file to be uploaded to the server, please give me some advice.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report