Update of /cvsroot/com0com/com0com/setup
In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv12216
Modified Files:
setup.cpp
Log Message:
Added --silent option
Index: setup.cpp
===================================================================
RCS file: /cvsroot/com0com/com0com/setup/setup.cpp,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** setup.cpp 12 Sep 2008 09:55:59 -0000 1.24
--- setup.cpp 12 Sep 2008 12:21:49 -0000 1.25
***************
*** 20,23 ****
--- 20,26 ----
*
* $Log$
+ * Revision 1.25 2008/09/12 12:21:49 vfrolov
+ * Added --silent option
+ *
* Revision 1.24 2008/09/12 09:55:59 vfrolov
* Fixed help cutting
***************
*** 124,127 ****
--- 127,131 ----
///////////////////////////////////////////////////////////////
static BOOL detailPrms = FALSE;
+ static BOOL silent = FALSE;
///////////////////////////////////////////////////////////////
static BOOL IsValidPortNum(int num)
***************
*** 782,786 ****
if (QueryServiceStatus(hSrv, &srvStatus)) {
if (srvStatus.dwCurrentState == SERVICE_STOPPED) {
! if (ShowMsg(MB_YESNO,
"The deleting %s service will remove your manual settings.\n"
"Would you like to delete service?\n",
--- 786,791 ----
if (QueryServiceStatus(hSrv, &srvStatus)) {
if (srvStatus.dwCurrentState == SERVICE_STOPPED) {
! if (silent ||
! ShowMsg(MB_YESNO,
"The deleting %s service will remove your manual settings.\n"
"Would you like to delete service?\n",
***************
*** 957,960 ****
--- 962,966 ----
" --output <file> - file for output, default is console\n"
" --detail-prms - show detailed parameters\n"
+ " --silent - suppress dialogs if possible\n"
);
ConsoleWrite(
***************
*** 1056,1059 ****
--- 1062,1071 ----
argc--;
}
+ else
+ if (!strcmp(argv[1], "--silent")) {
+ silent = TRUE;
+ argv++;
+ argc--;
+ }
else {
ConsoleWrite("Invalid option %s\n", argv[1]);
|