public bool InCommandLineMode()
{
IVsShell shell = (IVsShell)GetService(typeof(SVsShell));
object pvar;
if (shell.GetProperty((int)__VSSPROPID.VSSPROPID_IsInCommandLineMode, out pvar) == VSConstants.S_OK &&
(bool)pvar)
{
return true;
}
return false;
}