Local session audit
Published: November 2, 2021 - 11:51 AM
Hello everyone.
As part of an audit, I would need to determine the location of the "Desktop" folder of Windows users using a WAPT package.
Nothing could be simpler: in the "audit():" definition, I put this code:
In the test environment, it finds the correct path (my desktop), but once deployed, it displays the "System" desktop (The Desktop path is: C:\Windows\system32\config\systemprofile\Desktop). Which, of course, is not at all what I want.
I successfully discovered the "session_setup()" function, which correctly returns the "local" value when... the installation of the package, but which is never called during the request for an audit subsequent.
How can I obtain information related to the logged-in user when requesting an audit after the package has been installed?
Thank you for your help!
As part of an audit, I would need to determine the location of the "Desktop" folder of Windows users using a WAPT package.
Nothing could be simpler: in the "audit():" definition, I put this code:
Code: Select all
def audit():
desktop = os.path.join(os.path.join(os.environ['USERPROFILE']), 'Desktop')
print("The Desktop path is: " + desktop)I successfully discovered the "session_setup()" function, which correctly returns the "local" value when... the installation of the package, but which is never called during the request for an audit subsequent.
How can I obtain information related to the logged-in user when requesting an audit after the package has been installed?
Thank you for your help!