2 Replies Latest reply on Aug 10, 2020 9:15 AM by Steve Gibbs

    Executing Powershell  - Access denied

    Steve Hobbins
      Share This:

      Hi all

       

      I am trying to fire off an installer for a powershell script usin gthe start-process command.

       

      Seems no matter what i so i am getting access denied messages :

       

      start-process : Access is denied

      At C:\Temp\Office365 ProPlus 64Bit\INSTALL Office ProPlus 64Bit.ps1:3 char:1

      + start-process $var1 -verb RunAs -WorkingDirectory $var2

      + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

          + CategoryInfo          : NotSpecified: (:) [Start-Process], UnauthorizedAccessException

          + FullyQualifiedErrorId : System.UnauthorizedAccessException,Microsoft.PowerShell.Commands.StartProcessCommand

       

      I have set local admin credentials on the package in package factory and republished but this makes zero difference - i can get the basic executable to fire.

       

      I know the scripts is ok as i can run this under the local admin credentials i have specified in the package.

       

      Anyone got any ideas on what to look at next?

       

      Cheers


      Steve

        • 1. Re: Executing Powershell  - Access denied
          Steve Hobbins

          Being the nature of the beast with this product - i've found another way of skinning the cat as this was a complete dead end for me.

           

          Thanks to this post for provding me some inspiration :

          Re: Office 2013 to Office 365

           

          I've abandoned the idea of having the source files referenced on the network and opted to send them down to each machine from the relay. Then execute a slightly modfied configuration file to account for the files being locally. (Execute program OR : C:\temp\office365\setup.exe /configure C:\temp\office365\config.xml)

           

          Seems you need to set the full file path to the config file despite sitting next to the executable in the folder!!

           

          Also another thing which absolutely destroyed me here was inside the config file i had a variable set : Soucepath="xyz" - whilst all the documentation suggests you must have that set - i found yet another page which showed success when you remove that parameter completely from the file which worked for me!!

           

          Install error 30182-1011 (3)

           

          Until i removed this i had all manner of installation errors and spurious errors about not being able to download files... what a complete waste of time tracking that one down... grrrr

           

          I now have a working package in client management for this. My next steps are to ensure i can uninstall cleanly and also make sure client management will update this Office365 version once installed.

           

          Anyway i hope this helps anyone else trying to follow Microsofts instructions and deploy Office365 from a network share via client management!!

          • 2. Re: Executing Powershell  - Access denied
            Steve Gibbs

            Thanks Steve Hobbins for the follow up. Please keep us informed on the patching piece and how the NOOP file behaves with your solution where all the setup files are run from your local system. From my understanding, you must use ODT (Office Deployment Tool) to fetch the patches from Microsoft and be placed in the Network Share.  I am no expert on ODT or the proper way to create the XML config file and the proper method to patch Office 2019.

             

            I know I am responding late but thought I would share a method I used while working with another customer that was having issues running Office 2019 from Network Share.

             

            The solution that we used and did work was to run the batch file that was created after the ODT created the XML configuration files was to "Mount" the share as specific user that had rights to the share. We assigned a drive letter and then the Execute Program was used. The line looked as simple as M:\setup.bat. The mount point was right to the root folder of the Office folder. Mount is the same as Map Drive. The mount and unmount steps are in the Windows Folder of Op Rule Steps.

             

            Also, for future reference, when running PowerShell commands or scripts trying using this:

             

            PowerShell.exe -ExecutionPolicy ByPass xxxx - If you do not use the ByPass option then PowerShell is a little cranky and I never was able to use PowerShell until I starting adding that to the Execute Program Step...

             

            Here is a link to where you can see how I used PowerShell to remove the CR from a text file:

            EICAR Test File