mirror of
https://github.com/reactos/reactos.git
synced 2025-06-14 02:28:31 +00:00
[RAPPS] Fix command line handling
This commit is contained in:
parent
4f8dc9c266
commit
f133d01f20
3 changed files with 7 additions and 7 deletions
|
@ -402,7 +402,7 @@ CAvailableApplicationInfo* CAvailableApps::FindInfo(const ATL::CStringW& szAppNa
|
||||||
while (CurrentListPosition != NULL)
|
while (CurrentListPosition != NULL)
|
||||||
{
|
{
|
||||||
info = m_InfoList.GetNext(CurrentListPosition);
|
info = m_InfoList.GetNext(CurrentListPosition);
|
||||||
if (info->m_szName == szAppName)
|
if (info->m_szName.CompareNoCase(szAppName) == 0)
|
||||||
{
|
{
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
#include <setupapi.h>
|
#include <setupapi.h>
|
||||||
|
|
||||||
#define MIN_ARGS 2
|
#define MIN_ARGS 3
|
||||||
|
|
||||||
BOOL UseCmdParameters(LPWSTR lpCmdLine)
|
BOOL UseCmdParameters(LPWSTR lpCmdLine)
|
||||||
{
|
{
|
||||||
|
@ -25,17 +25,17 @@ BOOL UseCmdParameters(LPWSTR lpCmdLine)
|
||||||
|
|
||||||
// TODO: use DB filenames as names because they're shorter
|
// TODO: use DB filenames as names because they're shorter
|
||||||
ATL::CSimpleArray<ATL::CStringW> arrNames;
|
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]);
|
arrNames.Add(argv[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
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)
|
if (InfHandle == INVALID_HANDLE_VALUE)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
|
@ -160,7 +160,7 @@ INT WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLi
|
||||||
InitCommonControls();
|
InitCommonControls();
|
||||||
|
|
||||||
// skip window creation if there were some keys
|
// skip window creation if there were some keys
|
||||||
if (!UseCmdParameters(lpCmdLine))
|
if (!UseCmdParameters(GetCommandLineW()))
|
||||||
{
|
{
|
||||||
if (SettingsInfo.bUpdateAtStart || bIsFirstLaunch)
|
if (SettingsInfo.bUpdateAtStart || bIsFirstLaunch)
|
||||||
CAvailableApps::ForceUpdateAppsDB();
|
CAvailableApps::ForceUpdateAppsDB();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue