-1

There's not a lot of discussion of this error online so I included the entire error code in the title to help others if we can figure this out here.

The problem is that I'm trying to install software that runs completely from a folder without installation. To "install" it, I have to xcopy it from a network drive to c:\program files and then create a task in the scheduler to run it. The code works perfectly if I run it from c:\temp or the network drive from an administrative command prompt.

The error message suggests the install isn't running with administrative privileges, but don't all SCCM installs run with admin rights (else, how would they install at all)? Either way, in the SCCM deployment, I have it set to "install for system" which should work should it not?

not_a_generic_user
  • 1,906
  • 2
  • 19
  • 34
  • I think this question is more suitable for [Server Fault](http://serverfault.com/about) than for Stack Overflow. And I think this question is hard to answer for anybody without seeing the code of the batch file. Do you use a UNC path on `xcopy` command line or a network drive assigned with `net use` to a drive letter? Has the user account used on running the batch file with SCCM the permissions to read file contents on the network share required for the file copying process? Why are the files needed for the installation not packed together with the batch file into a package deployed with SCCM? – Mofi Sep 18 '17 at 17:24
  • I'm not familiar with Server Fault, but I can post it there. But I don't want to leave your questions unanswered. I use a relative path on the xcopy command because the files it needs are in a subfolder relative to the install file.SCCM pulls all files in the folder I point to into the deployment does it not? Are you saying I need to use a "package" instead? Why? – not_a_generic_user Sep 18 '17 at 22:58
  • SCCM is usually used with packages to avoid problems like this. See the answers on [CMD does not support UNC paths as current directories](https://stackoverflow.com/a/45072396/3074564) and [Executing BAT files in scheduled task](https://stackoverflow.com/a/41821620/3074564). I suppose you run into the problems you have because of your batch file is not taking into account the different environment on being executed by SCCM. The usage of using local administrator account results usually in no read access permissions on network shares. – Mofi Sep 19 '17 at 06:20

1 Answers1

0

Selecting "downloadload and run locally" helped. I also had a problem with the task scheduler working when I was logged in as an admin, but not when I was a regular user. Turns out it was there, but my regular user account didn't have rights to see it. For now, it's working.

not_a_generic_user
  • 1,906
  • 2
  • 19
  • 34