Sign in to follow this  
Followers 0
JerichoJones

EXE calling EXE. Windows thinks an "installation program" is still running

9 posts in this topic

I wrote a wrapper in AutoIt to remove Trend's anti-virus. The script calls trends AutoPCC.exe to remove Trend. I verify that the process is no longer running yet when I invoke the Symantec client installer Windows complains that an installation is still running. I get around it by exiting the wrapper using Run instead of RunWait. Unfortunately that causes another annoying issue when trying to deploy it through PDQDeploy.

Is there a way to tell/force Windows that there is no installation running?

Share this post


Link to post
Share on other sites



#4 ·  Posted (edited)

Perhaps some service or other is still running until after a reboot.

I make sure that the process I have invoked is no longer running I also include checking for the only other EXE in the folder. In addition I delete the folder where AutoPCC.exe resides prior to starting the SEP installer. I'm pretty certain that I have that part covered since the install works if I invoke it via Run  (and exit the script) instead of RunWait. I think Windows perceives my AutoIt script as an installer. I tried renaming it to something nonsensical but still no joy. 

Edited by JerichoJones

Share this post


Link to post
Share on other sites

I make sure that the process I have invoked is no longer running I also include checking for the only other EXE in the folder. In addition I delete the folder where AutoPCC.exe resides prior to starting the SEP installer. I'm pretty certain that I have that part covered since the install works if I invoke it via Run  (and exit the script) instead of RunWait. I think Windows perceives my AutoIt script as an installer. I tried renaming it to something nonsensical but still no joy. 

Then perhaps you need to re-run the script once the uninstall has finished.

For example...

If $cmdlime[0] > 1 Then
    _Install()
Else
    _Uninstall()
EndIf

Func _Install()
    ;Install code
EndFunc

Func _Uninstall()
    ;Uninstall code
    Run(@ScriptFullPath & " someparam")
    Exit
EndFunc

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites

Might even be a good idea to pass the pid of current script to new instance as the param.

If $cmdlime[0] > 1 Then
    _Install(Int($cmdlime[1]))
Else
    _Uninstall()
EndIf

Func _Install($pid)
    ProcessWaitClose($pid)
    ;Install code
EndFunc

Func _Uninstall()
    ;Uninstall code
    Run(@ScriptFullPath & " " & @AutoItPID)
    Exit
EndFunc

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites

 

Then perhaps you need to re-run the script once the uninstall has finished.

For example...

If $cmdlime[0] > 1 Then
    _Install()
Else
    _Uninstall()
EndIf

Func _Install()
    ;Install code
EndFunc

Func _Uninstall()
    ;Uninstall code
    Run(@ScriptFullPath & " someparam")
    Exit
EndFunc

It is worth a shot but PDQDeploy will probably see the initial script exit, assume completion, and proceed to delete the installer files. I'm getting around it now by using a batch file.

I'm posting in the MS forums as well. Maybe they can help (unlikely).

Share this post


Link to post
Share on other sites

You are closing the process you create, but many installers are only wrappers around microsoft installers, which start an additional process.

Could be a disconnect there.


IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

You are closing the process you create, but many installers are only wrappers around microsoft installers, which start an additional process.

Could be a disconnect there.

I am closing all processes that I spawn plus one that never seems to be invoked. I did watch the processes that are extracted and run from the Trend uninstall process and they are all cleaned up prior to my attempt to run the next install.

Stopping the Windows Installer Service seems to have resolved the issue. It is a sledgehammer solution but it works without any adverse effects.

Edited by JerichoJones

Share this post


Link to post
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
Sign in to follow this  
Followers 0