Please tell me how could i access system restore "rstrui.exe" from my c# code.
I tried by calling C:\Windows\System32\rstrui.exe
;
But it is not accessible at all.
I need to call this function for redirecting my controls to System Restore.
thanks....
You can access C:\Windows\System32 using the following property:
Environment.SystemDirectory Property
You can run the executable using the following method:
Path.Combine Method
Process.Start Method
UPDATE >>>
Ahhh... now I see your problem.
When accessing the
System32
folder from 32 bit code on 64bit Windows 7 and Vista (maybe Windows 8 too), Windows 'cleverly' changes that part of the request path toSysWow64
. That is why you may have got a 'could not find path' error. In order to get around this, you can use the following:A more complete answer might be: