Copying DLL and OCX files to System32 and SysWOW64 folders and registering them
cd /d %~dp0
for %%i in ("C:\Windows\System32","C:\Windows\SysWOW64") do copy /Y /V "dmimage_alt.dll" "%%i\"
for %%i in ("C:\Windows\System32","C:\Windows\SysWOW64") do copy /Y /V "OBXAltViewer.ocx" "%%i\"
for %%i in ("C:\Windows\System32","C:\Windows\SysWOW64") do copy /Y /V "OBXAltViewer.inf" "%%i\"
for /f %%i in ("C:\Windows\System32\dmimage_alt.dll","C:\Windows\SysWOW64\dmimage_alt.dll") do regsvr32 /s %%i
for /f %%i in ("C:\Windows\System32\OBXAltViewer.ocx","C:\Windows\SysWOW64\OBXAltViewer.ocx") do regsvr32 /s %%i
This is a great community, with a lot of immensely smart and helpful people.
Thanks in advance for any insight into my issue here, and for any pointers in the right direction!
AFAIK there are two version of regsvr32, a 32bit version and a 64bit version. If you start the command prompt / batch file in a 32bit process, it should use the correct one (32bit).
I must also ask, why are you copying them to both the 64bit AND 32bit file system. If they are 32bit then just copying them to the 32bit file system should suffice (SysWOW64), and using the 32bit regsvr32 to register them...
Thanks for the response, Phil. But this is for many PCs which include both 32 and 64 bit machines. I'm more concerned about getting these files to show up in the appropriate system directories(depending on whether it is a 32 or 64 bit machine), than registering them. Since the first part itself isn't working as it should, I didn't expect the registration part to function anyway. Attached is a screenshot of the second iteration of this script where it is told to unzip the zipped DLL folder into the System32/SysWOW64 folders, and then "Run a batch file..." that I created within KACE itself and appears as another dependency[with a KACE-assigned name].
Thanks again for your question.