Forum Discussion

Magger777's avatar
Magger777
Copper Contributor
Feb 06, 2023

Robocopy batch to deploy files from a network drive via Win32App

Hello everyone,

 

I was wondering if it is possible to use robocopy in a batch to deploy files from a network drive to the computer.

After that I want to install the deployed files and after installation delete the files I previously downloaded.

 

My attempt:

 

ROBOCOPY \\networkdrive\folder1 C:\ProgramName /E
start /wait msiexec /i C:\ProgramName\Program.msi /qn
RD /S /Q C:\ProgramName

 

 

After creating the Win32App i tried to run this app. As Installation command I just use the name of the batch.

Sadly it does not copy any files and without the files the installation won't start.

Error: The specified file was not found. (0x80070002)

 

Any suggestions what I'am doing wrong?

 

Thanks!

  • You can copy all the files to a folder including subfolder and use a install.cmd containing the install command for installation, you should also have a uninstall one
  • If you're running this as a user instead of SYSTEM, then it could be that the user hasn't got enough rights to install the MSI. If you're running this as SYSTEM, then it won't work because it hasn't got rights on the network drive.

    You can better put the program.msi in the Win32 package and run it from there as SYSTEM, Intune downloads and extracts all the files in the Win32 package locally so no need to download it again

    • Magger777's avatar
      Magger777
      Copper Contributor

      I don't know if I'm getting this right.
      The issue is that the MSI needs additional files to complete the installation.
      That's why I tried it this way.
      Is there a way build the files into the Win32 Package?

       

      I tested to set this app to USER just to see if it would at least copy the files but it gave me a "Not Applicable Status"

      • You can copy all the files to a folder including subfolder and use a install.cmd containing the install command for installation, you should also have a uninstall one

Resources