diff --git a/xpinstall/wizard/windows/setup/extern.h b/xpinstall/wizard/windows/setup/extern.h index bbd9c028696b..8c9b8cedfb14 100644 --- a/xpinstall/wizard/windows/setup/extern.h +++ b/xpinstall/wizard/windows/setup/extern.h @@ -75,6 +75,7 @@ extern BOOL gbIgnoreProgramFolderX; extern BOOL gbRestrictedAccess; extern BOOL gbDownloadTriggered; extern BOOL gbAllowMultipleInstalls; +extern BOOL gbForceInstall; extern setupGen sgProduct; extern diS diSetup; diff --git a/xpinstall/wizard/windows/setup/extra.c b/xpinstall/wizard/windows/setup/extra.c index 8bfb06562b4b..40c4aa574799 100644 --- a/xpinstall/wizard/windows/setup/extra.c +++ b/xpinstall/wizard/windows/setup/extra.c @@ -294,7 +294,7 @@ void SetInstallFilesVar(LPSTR szProdDir) char szProgramPath[MAX_BUF]; wsprintf(szProgramPath, "%s%s", szProdDir, sgProduct.szProgramName); - if(FileExists(szProgramPath)) + if((!gbForceInstall) && FileExists(szProgramPath)) sgProduct.bInstallFiles = FALSE; } @@ -5029,12 +5029,18 @@ void PrintUsage(void) /* -h: this help * -a [path]: Alternate archive search path + * -app: ID of application which is launching the installer (Shared installs) + * -app_path: Points to representative file of app (Shared installs) + * -dd [path]: Suggested install destination directory. (Shared installs) + * -f: Force install (Shared installs) * -n [filename]: setup's parent's process filename * -ma: run setup in Auto mode + * -mmi: Allow multiple installer instances. (Shared installs) * -ms: run setup in Silent mode * -ira: ignore the [RunAppX] sections * -ispf: ignore the [Program FolderX] sections that show * the Start Menu shortcut folder at the end of installation. + * -reg_path [path]: Where to make entries in the Windows registry. (Shared installs) */ if(sgProduct.szParentProcessFilename && *sgProduct.szParentProcessFilename != '\0') @@ -5048,7 +5054,7 @@ void PrintUsage(void) GetPrivateProfileString("Strings", "UsageMsg Usage", "", szBuf, sizeof(szBuf), szFileIniConfig); if (lstrlen(szBuf) > 0) { - wsprintf(szUsageMsg, szBuf, szProcessFilename, "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n"); + wsprintf(szUsageMsg, szBuf, szProcessFilename, "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n"); PrintError(szUsageMsg, ERROR_CODE_HIDE); } } @@ -5086,6 +5092,10 @@ DWORD ParseCommandLine(LPSTR lpszCmdLine) GetArgV(lpszCmdLine, i, szArgVBuf, sizeof(szArgVBuf)); lstrcpy(sgProduct.szAlternateArchiveSearchPath, szArgVBuf); } + else if(!lstrcmpi(szArgVBuf, "-f") || !lstrcmpi(szArgVBuf, "/f")) + { + gbForceInstall = TRUE; + } else if(!lstrcmpi(szArgVBuf, "-n") || !lstrcmpi(szArgVBuf, "/n")) { ++i; diff --git a/xpinstall/wizard/windows/setup/setup.c b/xpinstall/wizard/windows/setup/setup.c index a9d2b5851bb5..1190c0825828 100644 --- a/xpinstall/wizard/windows/setup/setup.c +++ b/xpinstall/wizard/windows/setup/setup.c @@ -78,6 +78,7 @@ BOOL gbIgnoreProgramFolderX; BOOL gbRestrictedAccess; BOOL gbDownloadTriggered; BOOL gbAllowMultipleInstalls = FALSE; +BOOL gbForceInstall = FALSE; setupGen sgProduct; diS diSetup;