Source language: Translate to:

IsAppRunning and Windows 2003

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

IsAppRunning and Windows 2003

Postby WinMacLyn » Tue Jan 30, 2007 2:55 am

Hi everyone,

I want to know if IsAppRunning command runs ok on Windows 2003 ?

I have Windows XP, and I did some tests of my new project App. in Windows 2003 without success!
User avatar
WinMacLyn
 
Posts: 110
Joined: Wed Jan 17, 2007 7:30 pm

Re: IsAppRunning and Windows 2003

Postby dpayer » Tue Jan 30, 2007 7:42 am

WinMacLyn wrote:Hi everyone,

I want to know if IsAppRunning command runs ok on Windows 2003 ?

I have Windows XP, and I did some tests of my new project App. in Windows 2003 without success!


Permissions are very specific in Win2003.

Does the logged on user have access to the file? Does that user have permission to execute and to write to the registry (if needed)? Does this application expect to write in a folder for which it has not been given permission to write?

These are a few points to consider.

David P.
User avatar
dpayer
 
Posts: 1384
Joined: Mon Apr 11, 2005 5:55 am
Location: Iowa - USA

Postby Neosoft Support » Tue Jan 30, 2007 11:53 am

Windows 2003 is a server OS. NeoBook's IsAppRunning action does things differently depending on which version of Windows is running. Windows NT uses one method, all other versions use another method - Thanks Microsoft! I suppose it's possible that NeoBook is attempting to use the wrong method for Windows 2003. It may also be as David suggested, an issue with permissions.

Since we don't have a copy of Windows 2003, can you tell me what the following NeoBook variables return on that OS?

[WindowsPlatform]
[WindowsVer]
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5605
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Postby WinMacLyn » Tue Jan 30, 2007 8:22 pm

Hi everyone,

Thank you dpayer and NeoSoftware Support for trying to help me with this.
The Windows 2003 that I test the App. was in my cousin's PC so I don’t have available [WindowsPlatform] [WindowsVer] at this time, but I can tell you this information on next Saturday.
The code did not detect the other running tray App., when it was running!

Code: Select all
 
IsAppRunning "![PubDir]Carpeta 1\11.exe" "[1ProgramaAbierto11]"
If "[1ProgramaAbierto11]" "=" "True"
CloseCustomWindow "GrupoAviso1Salida"
CustomWindow "Aviso importante de salida" "-1" "-1" "GrupoAviso2Salida" "DialogBox+Exclusive+NoCloseBtn"
EndIf


Even if Windows 2003 does not run the code of my app. it is ok with me. Almost no home or business PC's have Windows 2003.

Anyway, I am taking the opportunity to say that I am very, very happy with NeoBook.
NeoBook is a rock solid program, and it is all I need for making great applications! With all plug-ins available and with all the tools that NeoBook offers I can say THE SKY IS THE LIMIT !
-------
I am editing this post at later time to add the following lines.

I will test also hpwAutoItIfWinActive next Saturday.
It can do the same job.
User avatar
WinMacLyn
 
Posts: 110
Joined: Wed Jan 17, 2007 7:30 pm

Postby edunaway » Wed Jan 31, 2007 9:04 am

Dave,

We have two Windows 2003 servers at my office, Release 1 and a newly installed Release 2.

Both versions report the following:

WindowsPlatform: 2
WindowsVer: 5.2

-eric
edunaway
 
Posts: 88
Joined: Wed May 04, 2005 9:17 am

Postby Neosoft Support » Wed Jan 31, 2007 12:18 pm

Thanks WinMacLyn and Eric.

From what I can tell, NeoBook should be detecting Windows 2003 correctly, so IsAppRunning should work correctly unless there is something unusual about the program you're trying to detect. You might try calling IsAppRunning without the path and see if that makes any difference. For example:

IsAppRunning "11.exe"

If the program was launched from NeoBook you might also try using the AppID variable returned by the Run action instead. For example:

IsAppRunning "[AppID]"
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5605
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Postby WinMacLyn » Wed Jan 31, 2007 2:00 pm

Thanks a lot Dave and Eric,

I never should have posted this until I worked more over around the problem!
Sorry for that.

I think the problem comes because the App. with the code IsAppRunning is one Folder down (a sub Folder) than the App. trying to detect.
So as Dave mentioned, if I use IsAppRunning "11.exe" without the path or IsAppRunning "[AppID]" it should work fine.

Code: Select all
IsAppRunning "![PubDir]1.exe" "[1Cerrado2]"
If "[1Cerrado2]" "=" "False"
CloseCustomWindow "GrupoAcceso2"
CustomWindow "Aviso" "-1" "-1" "GrupoPermiso1" "DialogBox+Exclusive+NoCloseBtn"
EndIf


The code above is where the problem was, not on the code previously posted.
The file 1.exe is not on the same Folder than 11.exe It is on an Upper Folder.
The question is, why was working ok in my PC with Windows XP ?

Wilson
User avatar
WinMacLyn
 
Posts: 110
Joined: Wed Jan 17, 2007 7:30 pm

Postby Neosoft Support » Thu Feb 01, 2007 11:11 am

The question is, why was working ok in my PC with Windows XP ?


The file's location shouldn't really make any difference because NeoBook examines a list of running processes to determine if the app is running or not. That's why it works on your XP system. Windows 2003 may function slightly differently since it's not intended to be used as a desktop operating system.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5605
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA


Return to NeoBook Action Commands

Who is online

Users browsing this forum: Bing [Bot] and 1 guest