@@ -145,6 +145,35 @@ LPCTSTR GetParamByPrefix(LPCTSTR lpCmdLine, LPCTSTR prefix) {
145145static int Run (LPTSTR lpCmdLine) {
146146 constexpr bool silent = true ;
147147 constexpr bool old_ime_support = false ;
148+ // parameter /? or /help to show commandline args
149+ if (!wcscmp (L" /?" , lpCmdLine) || !wcscmp (L" /help" , lpCmdLine)) {
150+ WCHAR msg[1024 ] = {0 };
151+ if (LoadString (GetModuleHandle (NULL ), IDS_STR_HELP, msg,
152+ sizeof (msg) / sizeof (TCHAR))) {
153+ MessageBox (NULL , msg, L" WeaselSetup" , MB_ICONINFORMATION | MB_OK);
154+ } else {
155+ MessageBox (
156+ NULL ,
157+ L" Usage: WeaselSetup.exe [options]\n "
158+ L" /? or /help - Show this help message\n "
159+ L" /u - Uninstall Weasel\n "
160+ L" /i - Install Weasel\n "
161+ L" /s - Install Weasel (Simplified Chinese)\n "
162+ L" /t - Install Weasel (Traditional Chinese)\n "
163+ L" /ls - Set Weasel language to Simplified Chinese\n "
164+ L" /lt - Set Weasel language to Traditional Chinese\n "
165+ L" /le - Set Weasel language to English\n "
166+ L" /eu - Enable automatic update check\n "
167+ L" /du - Disable automatic update check\n "
168+ L" /toggleime - Toggle IME on open/close(ctrl+space)\n "
169+ L" /toggleascii - Toggle ASCII on open/close(ctrl+space)\n "
170+ L" /testing - Set update channel to testing\n "
171+ L" /release - Set update channel to release\n "
172+ L" /userdir:<dir> - Set user directory\n " ,
173+ L" WeaselSetup" , MB_ICONINFORMATION | MB_OK);
174+ }
175+ return 0 ;
176+ }
148177 bool uninstalling = !wcscmp (L" /u" , lpCmdLine);
149178 if (uninstalling) {
150179 if (IsProcAdmin ())
0 commit comments