/build/static/layout/Breadcrumb_cap_w.png

Scripting Question


I need to create a script to Copy a folder from a server into the c:\Program Files folder on each of my Users Machines.

12/05/2017 1156 views
I need to run the program from the Program Files folder. So, I need to copy the folder there first. 
There is of course an access restriction on that folder. I know I need to get into an Elevated PS State to do so, but I am unsure how to write that into the script. 

Any help would be greatly appreciated.
3 Comments   [ + ] Show comments

Comments

  • Is this a script that you plan to run manually or do you have a system like the K1000 to execute it remotely?
  • I have the K1000 system. I am trying to determine how to go about testing it manually before I build the script in the K1000 though.
    • The K1000 agent runs in the system context, so you don't need to worry about elevation. You can just have the script copy the files. It will be easiest to upload the files to the K1000 as dependencies, however.
  • In our environment we have some deployments of software that run from a folder. In the K1000 we zip the folder, upload it as a dependency and as part of our batch file to install, we unzip it in the KACE dependency directory, create the directory in program files, then use robocopy to copy it there. To put the icing on the cake, we use a powershell script to create a shortcut on Public Desktop. All of our installers run as local system and we never ran into problems with elevation. The same thing can be accomplished by using PSexec if you don't have a K1000

Be the first to answer this question

Don't be a Stranger!

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

Sign up! or login

View more:

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