/build/static/layout/Breadcrumb_cap_w.png

Is it possible to have Kace test for a 'directoryexists' using %APPDATA% or any variable?

my test is failing for a directory, I see the following

Output Log
Running as: win7_test
Directory does not exist: %appdata%\Microsoft\Windows\Start Menu\COMPANY
Activity Log
Checking if directory exists: %appdata%\Microsoft\Windows\Start Menu\COMPANY

The thing is, this directory does exist. I can copy and paste that exact path, under the WIN7_test account and it opens that directory. Kace is failing to test that directory path I give it.

Anybody know how to do this?

0 Comments   [ + ] Show comments

Answers (3)

Answer Summary:
What if you tried this as a bat script ? IF EXISTS %appdata%\Microsoft\Windows\Start Menu\COMPANY ( DO SOMETHIHNG )
Posted by: dchristian 12 years ago
Red Belt
2
What if you tried this as a bat script ?

IF EXISTS %appdata%\Microsoft\Windows\Start Menu\COMPANY (
DO SOMETHIHNG
)

Comments:
Posted by: andibogard 12 years ago
Blue Belt
0
If I remember correctly, the KACE agent won't use environment variables. Like dchristian said, you would need to script the check.
Posted by: snissen 12 years ago
Fourth Degree Green Belt
0
Two comments:

1. With the 5.1 KBOX agents, in a script you could "Verify a directory exists" with environment variables like %SystemRoot% and %AppData%. With the 5.3 KBOX agents, this now fails, which is what the documentation always said.

2. Remember that %AppData% is a directory under the %UserProfile%, which means the script should be running in a user context (Run As ... User). With the 5.1 KBOX agent and the script running as Local System, I discovered that %AppData% was undefined, while %UserProfile% pointed to %SystemRoot%\system32\config\systemprofile.

Sande

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ