# Scripting Question

## How can you script a path that has changing PC names with each query?

01/22/2020 190 views

Hello All,

I'm trying to deploy software with the KACE 1000 scripts and I'm having an issue.

A Software .exe file has been added to multiple computers to their share (I.E. \\deg1266\c$). I need to have KACE find said file and execute it, but I am unable to correctly script KACE to find said paths as each one changes with the computer. So one computer path would be \\deg1255\c$, then next pc would be \\deg1298\c$, and so on. So I have two questions: 1) How can I script a path so KACE can find said file on each PC without have to create a script for each PC? 2) Is there a command variable to place in the path to represent the PC it's accessing (I.E., instead of \\deg1266\c$ you type \\[$COMPUTER_NAME]\c$?

Thank you.

2

The script runs on the client, not the server, so the path is specified locally, e.g. c:\path\to\software.exe.

Also, rather than copying the file separately you can upload it as a dependency of the script. The client will then download the file to the system before running the script.

• That makes much more sense and I got it to work. Thanks!

#### Don't be a Stranger!

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

#### View more

Scripting Questions