WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

How To
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Detect Interact with Desktop


Question:

In a WinBatch script, is there any way I can detect if the script has the ability to interact with the Windows XP desktop? For example, if my script was launched via AT vs AT /interactive, I want to be able to detect the difference. In all cases, it will be running via the SYSTEM account.

Answer:

You might play around with IntControl 84. It can itemize desktops. If p1 is a blank string (""), this returns a tab-delimited list of desktops.

IntControl 84 will return an empty string if run from a service that does not have interactive desktop access enabled. If interactive desktop access is enabled, then a valid list of desktop names is returned in a @TAB delimited list.


Article ID:   W17417
File Created: 2008:04:10:15:09:42
Last Updated: 2008:04:10:15:09:42