Why will a batch file fail when run from a C# app, but not when run on it's own? -


i'm trying run simple batch script uninstall windows update.

@echo off rem uninstall windows update 2592687 wusa /uninstall /kb:2592687 /norestart 

when run command line works fine, when run c# console app

static void main(string[] args)     {         string path = path.getfullpath("..\\..\\kbunins.bat");         processstartinfo proc = new processstartinfo(path);         process.start(proc);     } 

i installer encountered error: 0x8000ffff catastrophic failure error message i've tried googling error message , couldn't find useful , tried run cmd.exe bat file argument , have tried running command directly , got same results.

edit: i've built application , run installer administrator update still isn't uninstalled. i've added in file.exists() bit , finds file.

what cause this?

try compile app.

go bin folder. right click on exe file , choose run administrator.

if works, assign administrator permission code (if can so).


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -