Script Description:
This script automates the installation of EHR-RPMS (RPMS). EHR-RPMS stands for Electronic Health Record - Resource and Patient Management System. It is a health information system used primarily by the Indian Health Service (IHS), tribal healthcare facilities, and other related health organizations in the United States. Within my organization RPMS is used as a legacy software to access legacy health records. I first wrote the script in batch and then rewrote it in PowerShell.
Primary Functionality: Automates the extremely involved process of installing RPMS.
Key Technologies: Batch, PowerShell
Batch Script:
The Batch script starts with a menu. I built in an uninstall feature into the Batch script:
Selecting option 1, the script starts by piping a network location into a txt file and launching it in notepad. This is configuration information needed by the installer. Next the installer launches. This is not a silent installer. After the bulk of the RPMS has been installed permissions and groups are added to RPMS's lnk file found in the Public Desktop. Some ini files are copied. Another text file is piped with information and launched with an RPMS updater, which is not a silent install. Note the Username and Password that is piped into the txt file is edited for this guide:
Some OCX and DLL files are copied to System32 and SysWOW64. The files are then registered with regsvr32:
RPMS is launched, then CMD prompts tech to exit. This is likely due to the software writing configuration files and setting things up. Same ini files are moved to a different folder. Some DLL and VOR files are copied to proper location. RPMS is launched for the final time and some temp files are cleaned up:
If option 2 is selected the script launches RPMS installer where a tech selects uninstall. Some files are removed in System32 and SysWOW64 and RPMS directory (VueCentric) is removed from Program Files (x86). Option 3, exits the script:
PowerShell Script:
The PowerShell version of RPMS installation is much shorter. The script starts by piping information into a TXT file and launching notepad. The RPMS installer is launched. Permissions for the lnk in the Public Desktop are edited. Some INI files are copied:
Next the scripts pipes username and password information into a TXT and launches it. The RPMS updater is launched. Some OCX and DLL files are copied into System32 and SysWOW64 folders and registered:
RPMS is launched and exited by tech. INI files are moved. DLL and VOR files are copied to respective location. RPMS is launched for final time and the script cleansup some temp files:
PowerShell Uninstall Script:
RPMS installer is launched and tech selects uninstall. Updater is launched and tech selects uninstall. Some files are removed: