Schedule manual rule application?

Post any technical problems or questions you have while using or configuring Dexpot.
Bug-Tracker
mmseng
Posts: 10
Joined: 11.10.2009 02:46:48

Schedule manual rule application?

Postby mmseng » 11.10.2009 02:55:36

Hey guys, I love your app. I've tried lots and this is by far the best virtual desktop app out there. And the rule system isn't the least of its high points.

Unfortunately, the majority of purposes I'd have for applying automatic rules to newly-opened windows would be for command prompt windows, which, sadly, are not supported, as I've read. However manually applying existing rules to existing command prompt windows works fine, so I was hoping to implement a work-around.

If there was a way to automate the manual application of rules, I could simply schedule this task and have the rules applied, say, every 15 minutes or something like that. This would actually serve my purposes.

So would it be possible to make a batch script or somehow send a command to a running instance of Dexpot, telling it to apply its rules (to all desktops)? If this is not currently possible, then consider this a feature request for either sending command-prompt commands to Dexpot, or for the scheduling of rule-application.

Thanks in advance,
== Matt

User avatar
Patrick
Developer
Posts: 7380
Joined: 04.03.2003 14:51:26

Re: Schedule manual rule application?

Postby Patrick » 12.10.2009 15:09:52

:dex:

mmseng wrote:Unfortunately, the majority of purposes I'd have for applying automatic rules to newly-opened windows would be for command prompt windows, which, sadly, are not supported, as I've read.

That's only true for versions of Windows prior to Windows 7. Apart from this, Dexpot 1.5 will indeed have a command line switch to apply the rules manually.

mmseng
Posts: 10
Joined: 11.10.2009 02:46:48

Re: Schedule manual rule application?

Postby mmseng » 12.10.2009 20:21:53

Oh cool. Can't wait ;]

Thanks.

mmseng
Posts: 10
Joined: 11.10.2009 02:46:48

Re: Schedule manual rule application?

Postby mmseng » 06.11.2009 19:43:51

Ok, so I see the switch in the 1.5 release notes now. I've tried it out and it works just like pressing the "Apply Rules" button in the Dexpot Rules manager. However this behavior still seems to apply rules only to windows on the active desktop.

Is there a way to apply rules to all windows on all desktops?

mmseng
Posts: 10
Joined: 11.10.2009 02:46:48

Re: Schedule manual rule application?

Postby mmseng » 08.11.2009 02:55:51

Another option would be to have a way to switch desktops from the commandline. So I could cycle through the desktops and apply rules to each one after I've activated it. But that would be much less preferable.

Anyone?

User avatar
Patrick
Developer
Posts: 7380
Joined: 04.03.2003 14:51:26

Re: Schedule manual rule application?

Postby Patrick » 08.11.2009 20:57:27

:dex:

That's already possible. The (somewhat messed up) syntax for switching to desktop 2 is

Code: Select all

dexpot.exe /w: 2


mmseng wrote:But that would be much less preferable.

Why would you want to apply rules to windows that are not on the active desktop anyway?

mmseng
Posts: 10
Joined: 11.10.2009 02:46:48

Re: Schedule manual rule application?

Postby mmseng » 09.11.2009 04:49:06

Thanks.

Patrick wrote:Why would you want to apply rules to windows that are not on the active desktop anyway?


I think the real question is why wouldn't you want this ability?

I run three gameservers on a Server 2003 machine (i.e. no console window hooking). They run in console windows. Each one is scheduled to be killed and restarted every day, as well as whenever I feel like restarting it (usually remotely). So I've been looking for a way to get each of these console windows sent to their particular desktop. I can't have them placed automatically because of the lack of console window hooking, but the rules DO work for existing console windows if you apply them manually. I've made a scheduled task that runs every so often which automatically applies the rules. But there's no telling which desktop will be active or which desktop the gameserver windows will be on when this scheduled task kicks off.

So you can see my options are either:
- switch to Server 2008 (just for this? yeah right),
- apply rules to all desktops at once (apparently not possible), or
- switch to desktop 1 + apply rules, switch to desktop 2 + apply rules, etc.

I was really hoping I wouldn't have to resort to the latter option, because that means having to deal with graphical issues, desktops switching automatically while I'm working on one, and possibly having to account for a needed delay to compensate for the lag of changing desktops. And now that I think about it, just the possibility of desktops switching while I'm working is actually a deal breaker for me.

Consider this a feature request for a switch that applies rules to all desktops at once. Just think, with a feature like this, you have a viable workaround for the console window problem ;]

P.S. I guess a fourth option would be to apply rules every few seconds to ensure that, if a console window did pop up, it would MOST LIKELY have rules applied to it before the desktop could be switched. But this seems like massive overkill to catch a simple event that happens once or twice a day.

mmseng
Posts: 10
Joined: 11.10.2009 02:46:48

Re: Schedule manual rule application?

Postby mmseng » 10.11.2009 20:42:16

I'm actually wondering if there might be another way to do this.

I haven't used it much, but Microsoft has that new command console interface, called Powershell. I'm wondering if there might be a way to run console applications, such as my gameserver, and/or batch scripts, in Powershell by default, instead of using cmd.exe.

Maybe Dexpot could hook Powershell windows.

User avatar
Patrick
Developer
Posts: 7380
Joined: 04.03.2003 14:51:26

Re: Schedule manual rule application?

Postby Patrick » 10.11.2009 21:28:48

Powershell is still using the console subsystem, so I don't think it would make a difference.

I had another idea though. In Configure Sesktops, Start-Up you could create an entry for every desktop, using the Dexpot command line option, to automatically apply the rules on every desktop switch. Would that help?

mmseng
Posts: 10
Joined: 11.10.2009 02:46:48

Re: Schedule manual rule application?

Postby mmseng » 11.11.2009 07:12:22

I suppose that would work almost as well as my "run rules every few seconds" idea...

Ultimately though, I'd like to get these windows moved to their respective desktops as soon as possible after they are spawned.

There are a couple of other admins that connect to this server via RDP, and they aren't as familiar with virtual desktop functionality as I am. I really want to be able to tell them "Okay, server 1 will always be on desktop 1, server 2 will be on desktop 2, etc." to minimize confusion.

I don't doubt you're right about Powershell, but I think I'll give it a whirl when I get some time anyway. I need to get more familiar with powershell anyway, it seems like a good tool, or at least, a much better tool than cmd.exe.

If nothing else works I will probably settle on running rules every few seconds, as that most closely emulates the functionality I'm striving for. I hate to do it, because it seems like bad practice, but applying rules, especially only a few simple ones, seems fairly unobtrusive, resource-wise.


Return to “Support”

Who is online

Users browsing this forum: No registered users and 1 guest