Indigo Rose Software
  #1  
Old 10-07-2004
Martin_SBT's Avatar
Martin_SBT Martin_SBT is offline
Forum Member
 
Join Date: Jun 2002
Location: Montreal, Canada
Posts: 173
need help

cant find how to do the following things:

read a reg key that contain the install path and make %AppFolder% equal to that value.

Read a reg key that contain actual software revision and display it into a dialog.

check to see if a process "test.exe" is running and if so force it to close, even if there are many instances of this process that are running.

thanks in advance for any help you can provide

Martin
Reply With Quote
  #2  
Old 10-07-2004
Jason Pate Jason Pate is offline
Forum Member
 
Join Date: Jan 2002
Location: Nashville TN
Posts: 328
ProductVer = INIFile.GetValue(_SourceDrive.."\\ver.inf", "Section", "Value");
SessionVar.Set("%MySessionVar%",ProductVer);

Is how I am doing it out of an INI for the vers

ProductVer = Registry.GetValue(HKEY_LOCAL_MACHINE, "\\software\\Product Name", "ver") Reg I take it would look something like this but ProductVer is what is on the screen at design time.
Reply With Quote
  #3  
Old 10-07-2004
Martin_SBT's Avatar
Martin_SBT Martin_SBT is offline
Forum Member
 
Join Date: Jun 2002
Location: Montreal, Canada
Posts: 173
Thanks much Jason, it did helped!

Now what about the processes part of my question? Anyone?

thanks

MT
Reply With Quote
  #4  
Old 10-07-2004
Brett's Avatar
Brett Brett is offline
Indigo Rose Staff Member
 
Join Date: Jan 2000
Posts: 2,001
Here is a function that will find and close a process by name:

Code:
function FindAndCloseProcessByName(strName)
	tblProcesses = Window.EnumerateProcesses();
	local bProcessFound = false;
	local nProcessHandle = nil;
	if(tblProcesses)then
		for nHandle, strProcessName in tblProcesses do
			if(String.Find(strProcessName,strName,1,false) ~= -1)then
				nProcessHandle = nHandle;
				bProcessFound = true;
			end
		end
	end
	
	if(bProcessFound and nProcessHandle)then
		Window.Close(nProcessHandle,CLOSEWND_SENDMESSAGE);
	end
end
To use:

Code:
FindAndCloseProcessByName("test.exe");
Reply With Quote
  #5  
Old 10-07-2004
Martin_SBT's Avatar
Martin_SBT Martin_SBT is offline
Forum Member
 
Join Date: Jun 2002
Location: Montreal, Canada
Posts: 173


This is too cool Brett!

This works great!


Thanks so much
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -6. The time now is 06:36 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright © 2000 - 2009 Indigo Rose Corporation. All rights reserved.
Indigo Rose Software