Recently, I made a program for querying Unicom numbers. Because it is an automatic query, I Need To screen the js pop-up prompt box on the webpage page to avoid program suspension, So I referenced microsoft mshtml. dll assembly, after the program is released, it is found that it can only be installed on machines with the VS runtime environment, and machines without this environment will receive an error message indicating that the microsoft mshtml assembly is missing and cannot be installed, after finding some information on the Internet and finally solving the problem, I will write down the process and share it with you:
Because Microsoft. mshtmal. dll. This dll is from the mshtml In the system32 folder. tlb (COM-type library file), so we only need to use the TlbImp.exe COM-Type Library export tool that comes with VS2008 to export this tlb file again. Use the following script to export data:
Tlbimp mshtml. tlb/out: mshtml. dll
Finally, an mshtml is obtained. dll Assembly file. mshtmal. replace dll with mshtml. dll, and then the dll can be added to the installation project.
Specific Method: "Start" | "program" | "VS 2008" | "VS tools" | "VS command prompt" input: tlbimp mshtml. tlb/out: C: \ WINDOWS \ system32 \ mshtml. dll after running is complete, find: D: \ Program Files \ Microsoft Visual Studio 9.0 \ VC \ mshtml in the disk area where VS is installed (my security is in D. dll replaces the original program reference set Microsoft. mshtmal. dll.