Forum Discussion

Pogo947's avatar
Pogo947
Copper Contributor
Oct 09, 2023

WIN32 App Install error 0x80070002

I have an app that I am trying to add to Company Portal. No matter how I try to install it (using a powershell script to call the executable, calling the executable itself, and even using a .cmd to call a powershell scrip to call the executable.

 

I receive the error 0x80070002 whenever I try to have it install through my normal means (calling the executable with silent argument). This is "file cannot be found". I have checked, and the Intune Management Extension is staging and moving the executable to where it needs to go (IMECache), but it will not execute the file no matter what I try. 

 

Here is the relevant commands:

 

I have confirmed many, many times that there are no misspellings, etc. 

 

Troubleshooting I've Done:

If I install the program manually (WRT.exe /S in cmd), and then click install in company portal, it will say that the program is installed. So I know the detection rules are working correctly.

 

If I then click "uninstall" in Company Portal, it will successfully uninstall the program. So we know the uninstall command is correct.

 

I have made a powershell script to call the executable, then have calling the powershell file as the install command. 

Powershell Script:

$Command = ".\WRT.exe"
$Parms = "/S"
& "$Command" $Parms

 

Install Command: powershell.exe -executionpolicy bypass -file .\WRT.ps1

 

The above has worked with other Win32 apps I have created, but not this one.

 

I have even attempted to make an Install.cmd that calls the above powershell script, and making Install.cmd the install command, but this did not work either. I use this method for other Win32 apps that install successfully.

 

I'm at my wit's end here and could use any help ya'll could provide.

 

Thanks!

16 Replies

  • Pogo947's avatar
    Pogo947
    Copper Contributor
    Further information, I changed the silent command from /S (the correct argument) to /s (the incorrect argument, the installer will run as normal, not silently). I can see the installer running in the background.

    So we know that the install command "WRT.exe" /s will call the installer, but not install due to the incorrect silent argument.

    I will now attempt to just change the s from lower to capital, and see if it works.
      • Pogo947's avatar
        Pogo947
        Copper Contributor

        It is certainly an older application. On my local machine, /S works to install it. Will try -s.

         

        Edit: -s does not work on local machine.

    • Pogo947's avatar
      Pogo947
      Copper Contributor
      This has been attempted as well, but will try again.

Resources