[SOLVED] Creation of a package allowing searching for a file on workstations
Published: February 7, 2024 - 5:08 PM
Hello everyone,
My WAPT server version is WAPT Server 2.4.0.14143 Enterprise Edition under Windows Server 2019 Standard.
I create the packages from my machine running Microsoft Windows 11 Professional Version 10.0.22631 Build 22631 with WAPT Agent version 2.4.0.14143-4
I apologize in advance if this question has already been asked, but I couldn't find a package on the store or any information on the forum.
I want to create a package that allows me to find out if a file exists on the workstations.
I tried the following code:
But the package throws an error as soon as there are denied permissions; I also can't exclude these paths:
Can you assist me?
I might need to look into an audit function, but I haven't used that part yet.
Most of the time we use the packages from the store.
Thank you.
My WAPT server version is WAPT Server 2.4.0.14143 Enterprise Edition under Windows Server 2019 Standard.
I create the packages from my machine running Microsoft Windows 11 Professional Version 10.0.22631 Build 22631 with WAPT Agent version 2.4.0.14143-4
I apologize in advance if this question has already been asked, but I couldn't find a package on the store or any information on the forum.
I want to create a package that allows me to find out if a file exists on the workstations.
I tried the following code:
Code: Select all
# -*- coding: utf-8 -*-
from setuphelpers import *
def install():
for fn in find_all_files('c:\\','*nomdufichier'):
print(fn)
Code: Select all
File "C:\Program Files (x86)\wapt\common.py", line 4083, in install_wapt
exitstatus = setup.install()
File "C:\windows\TEMP\wapt4h6awkg2\setup.py", line 6, in install
File "C:\Program Files (x86)\wapt\waptutils.py", line 1403, in find_all_files
for f in do_find_all_files(rootdir):
File "C:\Program Files (x86)\wapt\waptutils.py", line 1384, in do_find_all_files
for fn in do_find_all_files(full_fn):
File "C:\Program Files (x86)\wapt\waptutils.py", line 1384, in do_find_all_files
for fn in do_find_all_files(full_fn):
File "C:\Program Files (x86)\wapt\waptutils.py", line 1384, in do_find_all_files
for fn in do_find_all_files(full_fn):
[Previous line repeated 1 more time]
File "C:\Program Files (x86)\wapt\waptutils.py", line 1379, in do_find_all_files
for fn in os.listdir(absolute_rootdir):
PermissionError: [WinError 5] Accès refusé: 'c:\\users\\admaz\\AppData\\Local\\Application Data'
13 : Accès refuséCan you assist me?
I might need to look into an audit function, but I haven't used that part yet.
Most of the time we use the packages from the store.
Thank you.