/build/static/layout/Breadcrumb_cap_w.png

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.

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
  • Is this a script that you plan to run manually or do you have a system like the K1000 to execute it remotely? - chucksteel 6 years ago
  • 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. - jtownsend68 6 years ago
    • 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. - chucksteel 6 years ago
  • 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 - Bethski 6 years ago

Answers (0)

Be the first to answer this question

 
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