Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

Need to Restart visual studio programatically

$
0
0

Hi ,

        Am newer to Vs packages,I have created a Vs Package in which I have a button which will call a exe (eg:Installer.exe)after the exe get executed visual studio should get restart,

i have used the following snippet

 System.Diagnostics.Process p = new System.Diagnostics.Process();
            p.StartInfo.FileName = "Installer.exe";
            p.Start(); 
            var obj = (IVsShell4)this.GetService(typeof(SVsShell));

               (obj as IVsShell4).Restart((uint)__VSRESTARTTYPE.RESTART_Normal);

with this code the vs get restarted before the completion of exe's execution.

what i need is on button click exe should called and some installation shoud be performed based on the exe,after that vs should get restart.anyone please provide solution on this


Kani



Viewing all articles
Browse latest Browse all 4410

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>