VDesk icon indicating copy to clipboard operation
VDesk copied to clipboard

Running all in the same desktop

Open arnyeinstein opened this issue 7 years ago • 4 comments

Hi I tried the following, but instead of running the programs in two separate desktops, they run both in desktop 2:

vdesk create:2 vdesk on:1 run:"C:\Program Files (x86)\Microsoft Office\root\Office16\OUTLOOK.EXE" vdesk on:2 run:notepad.exe

What am I doing wrong? Cheers Renger

arnyeinstein avatar May 07 '17 17:05 arnyeinstein

This may be happening because of the way outlook creates windows.

When VDesk launches a program it gives it a grace period (of about 8 seconds) to create a main window. I think what is happening in this case is that Outlook creates a "main window" instantly, but the actual main screen of the program launches on the current desktop when it's finished loading - by which time you've already switched to desktop 2.

If the second application you're running is notepad then you could try:

vdesk on:1 run:"C:\Program Files (x86)\Microsoft Office\root\Office16\OUTLOOK.EXE"
vdesk on:2 noswitch:true run:notepad.exe

This runs outlook on desktop one, and switches to it, then runs notepad on desktop two, but does not switch to desktop 2.

The noswitch:true parameter only works with certain applications however.

You could also try running Outlook as the last command, in which case it should also work.

Additionally, the vdesk create:2 at the start is also not required; if a desktop index does not exist, it is created.

Let me know if any of the above is effective.

eksime avatar May 07 '17 17:05 eksime

If you using batch file. You can use "timeout" function so give time in between launching apps. I have no issues with my startup script opening Outlook, Firefox, notepad++ and rdp manager

Example:

vdesk on:x run:x1command timeout 5 vdesk on:x run:x2command timeout 10 vdesk on:x run:x3command

cruzer619 avatar May 08 '17 00:05 cruzer619

Hi! As cruzer619 said, with some timeouts between running apps, they all opened correctly on their desktops! :)

The noswitch:true argument doesn't seem to work with excel or word. In fact it returns an error.

Thanks a lot!

Rimbaldo avatar May 09 '17 00:05 Rimbaldo

Thanks! I had the same issue start happening on a file that had previously been working (I can only assume a Windows or Office update cause the problem. Adding timeout 3 after each Office component that was being sent to a specific desktop solved the issue.

chriscrob avatar Dec 01 '17 14:12 chriscrob