Why ldifde.exe not executable after copied from host exe. ( in case, windows server dont have native ldifde.exe )

0

I am copying ldifde.exe from host exe to a temp file at the explorer in order to execute it from there rather than executing directly from C:\Windows\System32. I have to execute ldifde.exe for those Windows Servers where ldifde.exe might not exist. ( in specific windows server version ).

But Process.Start simply returns an exception :

ldifde.exe returned with ErrorCode : -2147467259

System.ComponentModel.Win32Exception (0x80004005): The specified executable is not a valid application for this OS platform. at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)

Why it is not able directly able to execute from that local folder instead of throwng above exception. I dont' want to overide ldifde.exe functionality from C:\Windows\System32 to local folder just for nothing instead considering the cases when ldifde.exe never exist under C:\Windows\System32. ( as i said for specififc windows Server versions ).

If I try to run it directly from Command Prompt or Windows PowerShell by pointing to that local folder where ldifde.exe is being copied from host application. it throws me this message.

Program 'ldifde.exe' failed to run: The specified executable is not a valid application for this OS platform.At line:1 char:1 + .\ldifde.exe + ~~~~~~~~~~~~. At line:1 char:1 + .\ldifde.exe + ~~~~~~~~~~~~ + CategoryInfo : ResourceUnavailable: (:) [], ApplicationFailedException + FullyQualifiedErrorId : NativeCommandFailed

Can any body help me out.

c#
active-directory
ldif
asked on Stack Overflow Jul 8, 2019 by Usman • edited Jul 8, 2019 by Usman

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0