Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Waiting for install to finish before returning?

Status
Not open for further replies.

KRPGroup

MIS
Jun 22, 2005
317
CA
?bWaitOnReturn?
Can someone help me modify my code?

I am using a script to install a few .exe applications silently and want my vb to wait until the previous install has completed before moving on to the next. Below is a snipet of what is sucessfully installing the app(s).


exeCwcInstall = "\\fsbes-01\software$\Caseware\Connector\2006\Setup.exe /s /f2c:\temp\CW" & CwcInstall & "_Install.log"
WSHShell.Run(exeCwcInstall)
 
Have you tried this ?
WSHShell.Run exeCwcInstall, , True

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
thanks that worked.

Can you tell me how to look for a Reg Key. I have code that will find the Value or Data but not just a Key itself.

I have a program that only has the (Default) value which my code will not find? I want to use it to confirm if it is installed and then remove it if it is but I need to check for this reg Key.

This is just a fragment of the full code for testing. The reg key I'm looking for is as follows
[HKEY_LOCAL_MACHINE\SOFTWARE\CaseWare International\CaseWare Connector\2005.00.000]
Code:
On Error Resume Next
 
Dim Cw2005,Cwc2005,Cw2006,Cwc2006,CwInstall,CwcInstall,etc...
 
Set WshShell=CreateObject("WScript.Shell")
scomputername = createobject("wscript.network").computername 

Cwc2005 = "HKEY_LOCAL_MACHINE\SOFTWARE\CaseWare International\CaseWare Connector\2005.00.000"

'---Reading registry to see if CW2005 Connector is installed 
	err.clear

	WSHShell.RegRead(Cwc2005)
	 
	If Err Then
    		'Already been run, exit IF
    		WScript.Echo "CaseWare Connector 2005 Program not found" '---For Testing Only
    
	Else
    		'---Removing CwConnector2005
    		WScript.Echo "CaseWare Connector 2005 found, Un-install required" '---For Testing Only
    		WSHShell.Run exeCwcUninstall, , True

	End If


Set WSHSHell = Nothing
WScript.Quit
 
Try this:
Cwc2005 = "HKLM\SOFTWARE\CaseWare International\CaseWare Connector\2005.00.000[!]\[/!]"

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
I tried this and when it runs it is still running the IF statement. I thought maybe I have it backwards so for testing I deleted the "CaseWare Connector\2005.00.000\" key from the registry and it still is running the IF.

any suggestions?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top