/build/static/layout/Breadcrumb_cap_w.png

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: 
    
  1. Verify a file exists...
  2.     Directory: C:\Users\%UserName%\Desktop
  3.     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:
Posted by: SMal.tmcc 9 years ago
Red Belt
0
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
 
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