Repair/configure not using MSI in C:\Windows\installer folder
As you have mentioned that in you case you have got single MSI it should work with the cached MSI but you would need to change few registry values. I'm assuming that you are creating a package for Win7 or later as prior to Windows Installer 5.0 (prior to Windows 7), the cab file is stripped from the MSI when windows creates a copy into C:\windows\installer\.
You need to consider if it is worth to mess up in Windows Installer registry keys. In such cases I'm copying the MSI locally (eg. C:\ProgramData\Installers\) and triggers the installation from the local copy or I'm deploying packages directly from the distribution point (users have got read access on those network shares). Anyway if you decide to make a script, here are the registry keys to change:
HKCR\Installer\Products\<<COMPRESSED_GUID>>\SourceList\PackageName = <Name_of_the_MSI_in_the_C:\Windows\Installer\_folder>
HKCR\Installer\Products\<<COMPRESSED_GUID>>\SourceList\Net\"1" or "2" etc. = "C:\WIndows\Installer\"You can get the MSI name from:
Details on the conversion can be found here. Some time ago, I posted some QAD code to do the conversions back and forth here on ITN.
Describes how to configure the locally cached MSI as the repair source. It's almost 5 years since I wrote it but still should help you in your quest.
There are also articles about GUID/Packed GUID converters and also a Darwin Descriptor utility.