Checking to see if a specific EXE files is located on users desktops.
Using Online Kscript want to see if current logged in user has a specific program on there desktop (small single exe to change network settings)
at the "Verify" step I have:
- Verify a file exists...
- Directory: C:\Users\%UserName%\Desktop
- File: "NAME OF EXE"
The status detail i'm getting in Kace is "File does not exist: C:\Users\AE-52$\Desktop\name of exe.exe
Instead of the current user it is showing the computer name with a $ (AE-52$).
is this possible to do using a script?
0 Comments
[ + ] Show comments
Answers (1)
Answer Summary:
Please log in to answer
Posted by:
SMal.tmcc
9 years ago
you need to run the script as the logged-in user
Comments:
-
you should be able to use for directory:
%HOMEPATH%\desktop - SMal.tmcc 9 years ago -
Logged-in User was the answer, Thanks! - kroosevelt 9 years ago
-
any time you use user level windows variables you need to run it as the user. Otherwise the scripts run as system and know nothing about variables like %username% or %homepath% - SMal.tmcc 9 years ago