(FYI SWMM= Stormwater & Wastewater Management Model)
Notes:
-running the program will creates a errors.4di.log file on the user's desktop that stays after the app is exited. This happens regardless if the app is installed manually from the Setup.exe or via this automated method. Files are always 0 bytes and can be deleted.
-Program is multi-user profile friendly (very Good!)
-License server in xpswmm.INI in [Network} section can be an IP or a DNS address. The Original Setup.exe does not allow DNS entered during manual install.
-By default, the software does not install in \Program Files\ like normal programs.
The packagers at XP Software have unwittingly made it very hard to create an unattended installation but here is a workaround:
-Launch original setup.exe and copy the xpswmm.msi from %TEMP% before accepting license.
-Cancel Install
-Get 7-ZIP and install it on a PC
-Open xpswmm.msi with 7-Zip to extract "Binary.ISSetupFilesHelper" to same folder as the MSI
-rename "Binary.ISSetupFilesHelper" to ISSetupFilesHelper.dll
-Manually install XPSWMM to a PC with the settings that you require. In my case I configured for the network client.
-Copy these 2 files to the same folder as the MSI
"C:\Program Files\xps\xpswmm\SWMXP.INI"
"C:\Program Files\xps\xpswmm\SWMXP.cnf"
-Create a CMD batch file in the same folder as the MSI containing the following:
:: Install InstallShield DLL
RunDLL32 "%~DP0ISSetupFilesHelper.dll" SFStartupEx
::Install xpswmm 10.6 (all in one line)
"%~dp0xpswmm.msi" ISSETUPDRIVEN=1 ALLUSERS=1 REBOOT=RS /qr INSTALLDIR="C:\Program Files\xps\xpswmm" ADDLOCAL=Redistributables,TemplateFiles,TutorialFiles,Utilities,SampleFiles,UpdateDlls,ProgramFiles,DLLs, HelpFiles,SentinelProtectedF iles,SentinelDrivers /L*v "%TEMP%\XPSWMM_10_6_CLIENT.LOG"
:: Note: the ADDLOCAL property is needed to prevent the viewer shortcut from being installed. You can obtain its value by running a manual install and forcing MSI to generate log files.
:: ISSetupFilesCleanup
RunDLL32 "%~DP0ISSetupFilesHelper.dll" SFCleanupEx
::Caveat: Does not delete the temporary files created in %TEMP% after the install
::This method does not configure the INI or install the License file so...
copy "%~DP0SWMXPNetwork.INI" "C:\Program Files\xps\xpswmm\SWMXP.INI" /Y
copy "%~DP0swmxpNetwork.cnf" "C:\Program Files\xps\xpswmm\SWMXP.cnf" /Y
::Patch to 10.62
wscript.exe "%~DP0update.vbs"
Now to patch to 10.62, the developers did not check the "enable silent mode option" in project settings when creating the patch with Visual Patch. So we drive it with VBS instead as follows:
-DL the xpswmmv10.6-10.6.2update.exe patch file
-In the same folder create the following update.VBS:
'Waits for specific window to appear and presses Enter
set WshShell = WScript.CreateObject("WScript.Shell")
timeout=0
StrCWD=Replace(Ucase(Wscript.ScriptFullName), "\"&Ucase(wscript.ScriptName), "")'path where this script is located
set objEnv = WshShell.Environment("PROCESS")
objEnv("SEE_MASK_NOZONECHECKS") = 1 'Bypass "Open File - Security Warning dialog box"
iErrorCode = WshShell.Run(""""&StrCWD&"\xpswmmv10.6-10.6.2update.exe""", 1, FALSE) '1=normal FALSE=no Wait 'extra " in case of Spaces in path
Wscript.Sleep 1500 'Wait for it to decompress
objEnv.Remove("SEE_MASK_NOZONECHECKS")
'Wait for "xpswmm Patch" dialog to show
Do
Wscript.Sleep 500 'required to prevent 100% CPU utilisation
Timeout=timeout+1
If timeout >30 Then
WScript.Quit (1) 'Prevent looping forever
End If
Loop Until WshShell.AppActivate ("xpswmm Patch")
Wscript.Sleep 500
WshShell.AppActivate ("xpswmm Patch")
WshShell.SendKeys "%S" 'Alt-S to Click Start
WScript.Sleep 500
WshShell.AppActivate ("xpswmm Patch") 'do it twice in-case Alt-S is sent to splash screen
WshShell.SendKeys "%S" 'Alt-S to Click Start
While WshShell.AppActivate ("xpswmm Patch")
Wscript.Sleep 500 'required to prevent 100% CPU utilisation
Timeout=timeout+1
If timeout >30 Then
WScript.Quit (1) 'Prevent looping forever
End If
WshShell.AppActivate ("xpswmm Patch")
WshShell.SendKeys "%F" 'Alt-F To click Finish at end
Wend
This website uses cookies.
By continuing to use this site and/or clicking the "Accept" button you are providing consent
Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our
websites or when you do business with us. For more information about our
Privacy Policy and our data protection
efforts, please visit
GDPR-HQ