VB "automation error" or "unable to locate program Input Point doopenpipestream on Dynamic Link Library scrrun. dll"

Source: Internet
Author: User

Note: "automation error" is actually an error returned by a program or component when VB calls the program or component. Therefore, whether these components can run properly must be considered.

For example, when you run the following code on some machines:

Dim wshshell as object <br/> set wshshell = Createobject ("wscript. Shell") <br/> runandwaitexe = wshshell. Run (strcommand, 0, true)

"Automation error" occurs because "wscript. Shell" cannot run properly.

 

Bytes -------------------------------------------------------------------------------------------------------------------------

The following method is switched from the network, and the problem has been solved successfully!

 

The following error message is returned: wsript.exe cannot find the entry. You cannot create an object named "wscript. Shell. So I started to go crazy about Baidu because either the script is disabled (not possible, because the pop-up message is coming), or the file is changed. On the Internet, it is generally okay to register two components, as shown below:

Regsvr32 srcrun. dll (command successful)
Regsvr32 wshom. ocx (error prompt: unable to locate the program Input Point doopenpipestream on the Dynamic Link Library scrrun. dll)

If the previous execution is successful and the last one is an error, the message is "loadlibary (" wshom ") failed and the specified program cannot be found". Then, I checked the system 32 directory and wshom. OCX does. Later, I realized that wshom. ocx was damaged, so I found a computer of the same version (My XP SP3), wrote a script, and copied the following files:

Mkdir C:/Repair
Set Source = % WINDIR %/system32
Set target = C:/Repair
Copy % source %/cscript.exe % target %
Copy % source %/jscript. dll % target %
Copy % source %/scrobj. dll % target %
Copy % source %/scrrun. dll % target %
Copy % source %/VBScript. dll % target %
Copy % source %/wscript.exe % target %
Copy % source %/wshext. dll % target %
Copy % source %/wshom. ocx % target %
Pause

And copy the C:/repair directory on the other machine to my C:/, and then update it with the following script:

Set Source = C:/Repair
Set target = % WINDIR %/system32
Copy % source %/cscript.exe % target %
Copy % source %/jscript. dll % target %
Copy % source %/scrobj. dll % target %
Copy % source %/scrrun. dll % target %
Copy % source %/VBScript. dll % target %
Copy % source %/wscript.exe % target %
Copy % source %/wshext. dll % target %
Copy % source %/wshom. ocx % target %
Regsvr32 % target %/jscript. dll
Regsvr32 % target %/scrobj. dll
Regsvr32 % target %/scrrun. dll
Regsvr32 % target %/VBScript. dll
Regsvr32 % target %/wshext. dll
Regsvr32 % target %/wshom. ocx
Pause

Then, run the script to test Createobject ("wscript. Shell,

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.