Jump to content

Run multithreaded function using while?


Recommended Posts

I have a problem where I am trying to install a program on Windows 7 Pro x64. This program will fail to install if the process mscorsvw.exe is running. My script is designed to install the program and reboot the computer. In a 64bit environment, there are two of these processes, mscorsvw.exe and mscorsvw.exe *32. I run 2 ProcessClose() commands which DO get these processes to disappear, but there is a problem. First, my code:

If FileExists ( "c:\temp\app\install.cmd") Then
    ProcessClose("msiexec.exe")
    ProcessClose("mscorsvw.exe")
    ProcessClose("mscorsvw.exe")
    sleep(1000)
    RunWait (@ComSpec & " /c c:\temp\app\install.cmd")
EndIf

The problem is that the beginning of the CMD is processed (I cannot post the contents of the CMD file) but before the CMD is processed, mscorsvw.exe starts itself up again.

Is there a way to keep this CMD running AND stop this process from opening until after it is done?

PS: What is interesting is that this code (without the ProcessClose statements) works fine on Windows 7 Pro x86. FYI, the mscorsvw.exe processes were started by the installation of another program. I require both of these programs to be installed one after another.

Link to comment
Share on other sites

mscorsvw.exe (Microsoft Common Language Runtime Service Host)

Just stop the service. When you reboot, it will startup again.

"The mediocre teacher tells. The Good teacher explains. The superior teacher demonstrates. The great teacher inspires." -William Arthur Ward

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...