https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f133d01f20855a27fc5f7…
commit f133d01f20855a27fc5f7afb0abeef807d6aa53a
Author: Mark Jansen <mark.jansen(a)reactos.org>
AuthorDate: Tue Jun 5 22:08:18 2018 +0200
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Sat Jun 9 17:14:06 2018 +0200
[RAPPS] Fix command line handling
---
base/applications/rapps/available.cpp | 2 +-
base/applications/rapps/unattended.cpp | 10 +++++-----
base/applications/rapps/winmain.cpp | 2 +-
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/base/applications/rapps/available.cpp
b/base/applications/rapps/available.cpp
index 61c5a16e5e..c6ee68f7f2 100644
--- a/base/applications/rapps/available.cpp
+++ b/base/applications/rapps/available.cpp
@@ -402,7 +402,7 @@ CAvailableApplicationInfo* CAvailableApps::FindInfo(const
ATL::CStringW& szAppNa
while (CurrentListPosition != NULL)
{
info = m_InfoList.GetNext(CurrentListPosition);
- if (info->m_szName == szAppName)
+ if (info->m_szName.CompareNoCase(szAppName) == 0)
{
return info;
}
diff --git a/base/applications/rapps/unattended.cpp
b/base/applications/rapps/unattended.cpp
index 06f8537999..7f7f3510f6 100644
--- a/base/applications/rapps/unattended.cpp
+++ b/base/applications/rapps/unattended.cpp
@@ -11,7 +11,7 @@
#include <setupapi.h>
-#define MIN_ARGS 2
+#define MIN_ARGS 3
BOOL UseCmdParameters(LPWSTR lpCmdLine)
{
@@ -25,17 +25,17 @@ BOOL UseCmdParameters(LPWSTR lpCmdLine)
// TODO: use DB filenames as names because they're shorter
ATL::CSimpleArray<ATL::CStringW> arrNames;
- if (!StrCmpW(argv[0], CMD_KEY_INSTALL))
+ if (!StrCmpIW(argv[1], CMD_KEY_INSTALL))
{
- for (INT i = 1; i < argc; ++i)
+ for (INT i = 2; i < argc; ++i)
{
arrNames.Add(argv[i]);
}
}
else
- if (!StrCmpW(argv[0], CMD_KEY_SETUP))
+ if (!StrCmpIW(argv[1], CMD_KEY_SETUP))
{
- HINF InfHandle = SetupOpenInfFileW(argv[1], NULL, INF_STYLE_WIN4, NULL);
+ HINF InfHandle = SetupOpenInfFileW(argv[2], NULL, INF_STYLE_WIN4, NULL);
if (InfHandle == INVALID_HANDLE_VALUE)
{
return FALSE;
diff --git a/base/applications/rapps/winmain.cpp b/base/applications/rapps/winmain.cpp
index 386023785e..98f44a19e0 100644
--- a/base/applications/rapps/winmain.cpp
+++ b/base/applications/rapps/winmain.cpp
@@ -160,7 +160,7 @@ INT WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPWSTR lpCmdLi
InitCommonControls();
// skip window creation if there were some keys
- if (!UseCmdParameters(lpCmdLine))
+ if (!UseCmdParameters(GetCommandLineW()))
{
if (SettingsInfo.bUpdateAtStart || bIsFirstLaunch)
CAvailableApps::ForceUpdateAppsDB();