MSI is an installation file that requires the system's own msiexec.exe to execute
varTempDir =@"D:\UploadFiles\SCADASetupWix.msi"; varStart =NewProcessStartInfo ("msiexec.exe","/I \ ""+tempdir); Start. WindowStyle=Processwindowstyle.normal; Start. CreateNoWindow=true; Process.Start (Start);//. WaitForExit ()
However, under 360, a warning pops up. It is considered unsafe to install automatically. There should be a better way.
Triggering the installation in CMD will also pop up a 360 warning. And then show the Reject installation
Automatically run EXE files will also pop up a warning.
Process PRC =NewProcess (); Try{PRC. Startinfo.filename=@"C:\Users\Administrator\Desktop\SCADA\setupok.exe"; Prc. Startinfo.useshellexecute=false; Prc. Startinfo.redirectstandarderror=true; Prc. Startinfo.redirectstandardoutput=true; Prc. Startinfo.redirectstandardinput=true; Prc. Startinfo.createnowindow=false; Prc. Start (); } Catch(Exception ExU) {if(!PRC. hasexited) {PRC. Close (); } Throw NewException (exU.Message.ToString ()); }
There should be a silent installation method. Keep looking!