|
#1
|
||||
|
||||
|
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 |
|
#2
|
|||
|
|||
|
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. |
|
#3
|
||||
|
||||
|
Thanks much Jason, it did helped!
Now what about the processes part of my question? Anyone? thanks MT |
|
#4
|
||||
|
||||
|
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 Code:
FindAndCloseProcessByName("test.exe");
|
|
#5
|
||||
|
||||
|
This is too cool Brett! This works great! Thanks so much |
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
All times are GMT -6. The time now is 06:36 AM.








Linear Mode
