Welcome to OCS Inventory NG community support, where you can ask questions and receive answers from other members of the community.

Please ask questions only in English or French.

Release 2.8 available

The official documentation can be found on http://wiki.ocsinventory-ng.org. Read it before asking your question.

%UserProfile% doesn´t work with package deployment

Hello!

I need to store some files into the profile path of the currently logged in Windows user. Tried to use environment variable %UserProfile% with package deployment but it doesn´t work as desired. There´s an appropriate example in the OCS Inventory documentation using store action in combination with this variable so I´m a bit confused now.

Can anybody help me?

Server: v2.7,  Debian 10, PHP 7.3.19, Apache 2.4.38, Debian 10 version 10.3.23-MariaDB-0+deb10u1, VMware 15.5 platform

Win-Agents: v2.7.0.1 on Windows 10 Prof. v1909

Thanks a lot!
in OCS Inventory NG agent for Windows by (330 points)

1 Answer

+1 vote
 
Best answer
OCS-inventory is working under "system context" account .. so you must use a script to loop through user profiles

see here

https://home.memftw.com/copying-files-to-every-users-profile/

and

https://stackoverflow.com/questions/50397554/how-to-get-to-users-appdata-when-running-as-system-user-from-a-batch-file

kind regards

soktra
by (13k points)
selected by
 
Powered by Question2Answer
...