Error on DSC_RESOURCE

I am trying to use dsc_resource to install .exe.
I am mounting share on P: and this is my dsc_resource:
dsc_resource ‘InstallSEP’ do
resource :package
notifies :run, ‘reboot[requires_reboot]’, :delayed
property :ensure, ‘Present’
property :name, ‘Symantec Endpoint Protection’
property :path, ‘P:\Sep Server Installs\x64\setup.exe’
property :ProductId, ‘’
property :Arguments, ‘/s’
end
Using this same mount for windows_package with no issue…

Error:

       Error executing action `run` on resource 'dsc_resource[InstallSEP]'
       ====================================================================

===========

       Chef::Exceptions::PowershellCmdletException
       -------------------------------------------
       Powershell Cmdlet failed: PowerShell DSC resource MSFT_PackageResour

e failed to execute

       Set-TargetResource functionality with error message: The given Path

P:\Sep

       Server Installs\x64\setup.exe) could not be found

    + CategoryInfo          : InvalidOperation: (root/Microsoft/...guration

an

   ager:String) [], CimException

    + FullyQualifiedErrorId : ProviderOperationExecutionFailure

Any ideas appreciated!!

You may to add quotes to your path or store your installs in a location that doesn’t contain spaces:

dsc_resource 'InstallSEP' do
  resource :package
  notifies :run, 'reboot[requires_reboot]', :delayed
  property :ensure, 'Present'
  property :name, 'Symantec Endpoint Protection'
  property :path, '"P:\Sep Server Installs\x64\setup.exe"'
  property :ProductId, ''
  property :Arguments, '/s'
end

Stuart

Stuart - Thanks
There appears to be something else going on. I tried quotes and still error. But also tried installing another package which does not have spaces: P:\Evault\latest_Win_64bit\Agent-Windows-x64-8-31-7896.exe. and received could not be found for this as well.

I was thinking about this earlier. dsc_resource essentially writes your resource out to something that’s PowerShell compatible, and then calls Invoke-DscResource via PowerShell to trigger the Local Configuration Manager (LCM) to apply the configuration. For any Windows shares mounted using a mapped drive letter - these are unlikely to be available to the LCM (which will typically be running as SYSTEM)

Have you tried using a UNC path? e.g. \\server\share\Sep Server Installs\x64\setup.exe and ensuring that your computer account `DOMAIN\COMPUTERNAME$ has read access to that share?

I will have to come back to this - unc path appears to work better but using test kitchen/vagrant and not added to domain…so access denied. Will let you know when I get a better test server. Thanks for all your help.