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
Please log in to comment

There are no answers at this time

Answers

Answer this question or Comment on this question for clarity