static void Main(String[] args) { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); frmWebApplicationList webAppForm = null; //case of Installer if ((args != null) && (args.Length > 0)) { String myBasePath = args[0];//12 hive //Note: due to a bug in installshield, we get additional Quote(") in the path. It needs to be handled if (myBasePath.EndsWith("\"")) { myBasePath = myBasePath.Substring(0, myBasePath.Length - 1); } if (!myBasePath.EndsWith("\\")) { myBasePath += "\\"; } try { InstallFeature(myBasePath);//Install and Activate Feature } catch (Exception) { //do nothing...as can't do much when running from installer } webAppForm = new frmWebApplicationList(myBasePath /*+ TEMPLATE*/, true);//set the search box deployment location } else //case of Shortcut { webAppForm = new frmWebApplicationList("c:", false); } Application.Run(webAppForm); }