Page 1 of 2

Windows XP and Windows 7 User Profile Path

Posted: Tue, 06 Jan 2015, 11:32
by leiz
Hallo,

I use Panda Cloud System Management. I need to monitor file size, and send email alert if this file exeed file size limit. This file located at C:\Users\[User Name]\FolderA\FolderB\MyFile.xxx for win 7 and C:\Documents and Settings\[User Name]\Local Settings\Application Data\FolderA\FolderB\MyFile.xxx for Win XP

How do i type this path in PCSM Add Monitor wizard without mention username one by one? I tried C:\Users\* , %UserProfile%\ but the file size not return any result, it's like PCSM can't find the file path

Thank You

Re: Windows XP and Windows 7 User Profile Path

Posted: Tue, 06 Jan 2015, 15:30
by Mehrdad
Hi there,
Naturally you must use Environment variable
http://en.wikipedia.org/wiki/Environment_variable

You are able to set your own variables within your script as normal, as well as referring to any Windows environment variables that are defined on your devices (such as %username%, or %logonserver%).

basically, creates Windows environment variables whenever a component executes which are set to the names and values of your input variables. You can then call these in your scripts just like you would do a "normal" environment variable (such as %computername%).

Re: Windows XP and Windows 7 User Profile Path

Posted: Tue, 06 Jan 2015, 15:57
by leiz
myazdi wrote:Hi there,
Naturally you must use Environment variable
http://en.wikipedia.org/wiki/Environment_variable

You are able to set your own variables within your script as normal, as well as referring to any Windows environment variables that are defined on your devices (such as %username%, or %logonserver%).

basically, creates Windows environment variables whenever a component executes which are set to the names and values of your input variables. You can then call these in your scripts just like you would do a "normal" environment variable (such as %computername%).
Thanks for your answer. I got the clue but still not clear...can you give example how to use of environment variable?

Refer to wiki page. %USERPROFILE% is one of true environment variable. So if I type path %userprofile%\AppData\Local\FolderA\FolderB\MyFile.xxx it will same as C:\Users\[Username]\AppData\Local\FolderA\FolderB\MyFile.xxx is that correct?

Re: Windows XP and Windows 7 User Profile Path

Posted: Tue, 06 Jan 2015, 17:51
by leiz
Sorry...maybe my first post not so clear.

I'm not use any custom script but use built in File/Folder Size monitor in PCSM. And I don't know what to type in Full path to file/folder field because my file located at userprofile folder and there are so many PC i want to monitor with different username
06-01-2015 22-45-01.jpg
06-01-2015 22-45-01.jpg (47.77 KiB) Viewed 19398 times

Re: Windows XP and Windows 7 User Profile Path

Posted: Wed, 07 Jan 2015, 12:15
by Mehrdad
leiz wrote:
myazdi wrote:Hi there,
Naturally you must use Environment variable
http://en.wikipedia.org/wiki/Environment_variable

You are able to set your own variables within your script as normal, as well as referring to any Windows environment variables that are defined on your devices (such as %username%, or %logonserver%).

basically, creates Windows environment variables whenever a component executes which are set to the names and values of your input variables. You can then call these in your scripts just like you would do a "normal" environment variable (such as %computername%).
Thanks for your answer. I got the clue but still not clear...can you give example how to use of environment variable?

Refer to wiki page. %USERPROFILE% is one of true environment variable. So if I type path %userprofile%\AppData\Local\FolderA\FolderB\MyFile.xxx it will same as C:\Users\[Username]\AppData\Local\FolderA\FolderB\MyFile.xxx is that correct?


Yes, It's correct if you want to work on specific file that locate on different locations you must use it, and your example is correct !

Re: Windows XP and Windows 7 User Profile Path

Posted: Wed, 07 Jan 2015, 12:24
by Mehrdad
leiz wrote:Sorry...maybe my first post not so clear.

I'm not use any custom script but use built in File/Folder Size monitor in PCSM. And I don't know what to type in Full path to file/folder field because my file located at userprofile folder and there are so many PC i want to monitor with different username
06-01-2015 22-45-01.jpg

I mean you can set custom Environment variable for example if you want to use %Username% instead of %USERPROFILE%

Re: Windows XP and Windows 7 User Profile Path

Posted: Thu, 08 Jan 2015, 17:45
by leiz
myazdi wrote:
leiz wrote:Sorry...maybe my first post not so clear.

I'm not use any custom script but use built in File/Folder Size monitor in PCSM. And I don't know what to type in Full path to file/folder field because my file located at userprofile folder and there are so many PC i want to monitor with different username
06-01-2015 22-45-01.jpg

I mean you can set custom Environment variable for example if you want to use %Username% instead of %USERPROFILE%
how to set this custom environment?

i tried environment variable on my file path but still not working. I type %USERPROFILE%\AppData\Local\FolderA\FolderB\MyFile.xxx but still PCSM File Size monitor didn't return any result or send alert via email

Re: Windows XP and Windows 7 User Profile Path

Posted: Tue, 19 May 2015, 10:18
by tongclub62
i'm thinking window 7sp1 not balance. :?

Re: Windows XP and Windows 7 User Profile Path

Posted: Thu, 21 May 2015, 13:40
by Firefox
Hi leiz,

The PCSM agent runs as the local system account, so when you try to monitor %USERPROFILE% it will return the user profile directory for the SYSTEM user on the machine, which is unlikely to be the result you would need.

It is possible to monitor Free disk space as a whole if this is helpful, however without adding the individual user profile path it is not possible to monitor all the locations at once without writing a complete custom file monitor.

Please see bellow with some information on creating a custom Monitor, in this case it is an example of how to write a monitor to check if a file exists.

http://www.centrastage.com/blog/creatin ... -monitors/

Kind regards,

FireFox

Re: Windows XP and Windows 7 User Profile Path

Posted: Mon, 07 Nov 2016, 11:55
by viveksharma
can we use panda security window 10 please seggest me.and also new user.



regards
vivek sharma