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
Schedule manual rule application?
Re: Schedule manual rule application?

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.
Re: Schedule manual rule application?
Oh cool. Can't wait ;]
Thanks.
Thanks.
Re: Schedule manual rule application?
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?
Is there a way to apply rules to all windows on all desktops?
Re: Schedule manual rule application?
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?
Anyone?
Re: Schedule manual rule application?

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?
Re: Schedule manual rule application?
Thanks.
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.
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.
Re: Schedule manual rule application?
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.
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.
Re: Schedule manual rule application?
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?
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?
Re: Schedule manual rule application?
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.
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.
Who is online
Users browsing this forum: Ahrefs [Bot] and 0 guests