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?
Answer Summary:
What if you tried this as a bat script ? IF EXISTS %appdata%\Microsoft\Windows\Start Menu\COMPANY ( DO SOMETHIHNG )
Cancel
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Community Chosen Answer

2
What if you tried this as a bat script ?

IF EXISTS %appdata%\Microsoft\Windows\Start Menu\COMPANY (
DO SOMETHIHNG
)
Answered 03/28/2012 by: dchristian
Red Belt

Please log in to comment

Answers

0
If I remember correctly, the KACE agent won't use environment variables. Like dchristian said, you would need to script the check.
Answered 03/28/2012 by: andibogard
Blue Belt

Please log in to comment
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
Answered 03/29/2012 by: snissen
Fourth Degree Green Belt

Please log in to comment
Answer this question or Comment on this question for clarity