I'm looking for a batch script that will query to see if a reg key of 'PendingFileRenameOperatio
ns' is present in the following location: "HKEY_LOCAL_MACHINE\SYSTEM
I don't want to know the value of this key, I just need it deleting if it exists, after this I need to trigger an software installation.
So in summary, query the key, delete it then install software, if the key does not exist then I still need the software to install. what I've got so far:
reg query /v "HKEY_LOCAL_MACHINE\SYSTEM
if %ERRORLEVEL% == 0 goto DELETE
if %ERRORLEVEL% == 1 goto Install
:DELETE reg delete "HKEY_LOCAL_MACHINE\SYSTEM
sion Manager" /v PendingFileRenameOperation
/s /v" SILENTINSTALLDIR=\"C:\Soft
t\" ACCOUNTTYPE=localsystem REGISTERWITHWEBCC=true AMPNWADDRESS=amp-proxy.its
.uk.com AMPUSERNAME="Username" AMPPASSWORD="Password" KEEPAMPREGISTRATION=true FEATURECLUSTER=ON FEATUREEXCHANGEMAPI=OFF FEATUREEXCHANGE=ON FEATUREEXCHANGE2010=ON FEATUREMAESTRO=OFF FEATUREORACLE=OFF FEATURESHAREPOINT=OFF FEATURESQL=ON FEATUREVOLUMEIMAGE=ON /qn"
The script does not need to include the path of the installation as it's in the same directory as the script.