Avatar of 19andreas61
19andreas61
 asked on

WIN10 wbadmin.exe as a C# process

I try to start wbadmin as a process via C#. I've installed WIN10.
If I try a File.Exist(@"c:\Windows\System32\wbadmin.exe") the answer is false (not found or not the correct priviliges).
A manifest with <requestedExecutionLevel  level="requireAdministrator" uiAccess="false" /> is included and the security request pops up at the program start.

With WIN7 it runs without a problem.

Is there any idea to solve the problem?
C#Windows 10Storage Software

Avatar of undefined
Last Comment
19andreas61

8/22/2022 - Mon
sarabande

if it is a 64-bit windows and wbadmin.exe is a 32-bit executable, the correct path is

c:\windows\syswow64\wbadmin.exe

in system32 folder there are only 64-bit executables.

Sara
19andreas61

ASKER
Hi Sara,

thanks for the information, but ...
Yes it is 64-Bit, but at c:\windows\syswow64\ is no wbadmin.exe.

The c:\Windows\System32\wbadmin.exe works fine at an Administrator-CMD. I have another place at
C:\Windows\WinSxS\amd64_microsoft-windows-blb-cli-main_31bf3856ad364e35_10.0.10240.16384_none_53554ecf29b30305
but there I get the error
"Im Cache des Ressourcenladeprogramms ist kein MUI-Eintrag geladen." (it is a german system)

The basic problem or question is: What can I do that File.Exist(@"c:\Windows\System32\wbadmin.exe") can see the file, like I can see it at the file-explorer?

Thanks
Andreas
SOLUTION
sarabande

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
sarabande

i found the wbadmin.exe in my system32 folder as well. i think you don't need to check existence of the executable by a File.Exist since wbadmin comes with the operation system.

using System.Diagnostics; 

....

Process.Start("wbadmin.exe");

Open in new window


the operation system should find wbadmin.exe since it is in the standard path.

Sara
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
ASKER CERTIFIED SOLUTION
19andreas61

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.