script open a selected file with shared application

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
7iben
Posts: 123
Joined: 04 Apr 2019 18:22

script open a selected file with shared application

Post by 7iben »

I have a problem. I need a script that lets me open a selected file with a shared application.

The problem is that the "Open with" command only lets me select Windows applications. Since my file is an .app file on a Mac, it doesn't appear in "Open with."

I can drag the file from Xyplorer into the program or set the program as the default. That all works.

Because I use Illustrator 2024 and Illustrator 2026 simultaneously, I'd like to create two buttons for each program. In Windows, both programs appear under "Parallels shared applications" in the Start menu (see screenshot).

Is there a way to implement this with a script?
You do not have the required permissions to view the files attached to this post.
(OS: Windows 11 Pro on Parallels ARM Virtual Machine - XY: Current x64 beta - Display: 3440x1440 @ 125%)

highend
Posts: 14923
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: script open a selected file with shared application

Post by highend »

If it's set as default the path to use should be in the registry, search for (Illustrator) and show it...
One of my scripts helped you out? Please donate via Paypal

7iben
Posts: 123
Joined: 04 Apr 2019 18:22

Re: script open a selected file with shared application

Post by 7iben »

Unfortunately, I can't find anything in the Windows registry.
However, I did find the following two paths.
When I enter either of these paths in Windows Explorer, Illustrator starts. It starts with both paths.

C:\Users\admin\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Parallels Shared Applications\Adobe Illustrator 2024 (Mac)
(The file is a .lnk file.) If I add .ink to the end of the filename, Windows Explorer does not open Illustrator.

C:\Windows\System32\rundll32.exe "C:\Program Files\Parallels\Parallels Tools\Plugins\SharedHostApps.dll",Launch 5919f138425a1941b61b211e81092319

Would that be sufficient for a script?
When I enter the paths in xyplorer, I get the following error message:
You do not have the required permissions to view the files attached to this post.
(OS: Windows 11 Pro on Parallels ARM Virtual Machine - XY: Current x64 beta - Display: 3440x1440 @ 125%)

highend
Posts: 14923
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: script open a selected file with shared application

Post by highend »

Code: Select all

text property("#LinkTarget");
Run this with the .lnk file selected (e.g. from XY's address bar) and show the output
One of my scripts helped you out? Please donate via Paypal

7iben
Posts: 123
Joined: 04 Apr 2019 18:22

Re: script open a selected file with shared application

Post by 7iben »

C:\Windows\System32\rundll32.exe
You do not have the required permissions to view the files attached to this post.
(OS: Windows 11 Pro on Parallels ARM Virtual Machine - XY: Current x64 beta - Display: 3440x1440 @ 125%)

highend
Posts: 14923
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: script open a selected file with shared application

Post by highend »

Interesting...

Try to run this from the address bar, having a file selected that you would like to open in Illustrator 2024:

Code: Select all

run """%SystemRoot%\System32\rundll32.exe"" ""%ProgramW6432%\Parallels\Parallels Tools\Plugins\SharedHostApps.dll"", Launch 5919f138425a1941b61b211e81092319 <curitem>";
One of my scripts helped you out? Please donate via Paypal

7iben
Posts: 123
Joined: 04 Apr 2019 18:22

Re: script open a selected file with shared application

Post by 7iben »

Unfortunately not. After 5 minutes of loading, this message appeared:
You do not have the required permissions to view the files attached to this post.
(OS: Windows 11 Pro on Parallels ARM Virtual Machine - XY: Current x64 beta - Display: 3440x1440 @ 125%)

highend
Posts: 14923
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: script open a selected file with shared application

Post by highend »

But using this in a command prompt works?

Code: Select all

C:\Windows\System32\rundll32.exe "C:\Program Files\Parallels\Parallels Tools\Plugins\SharedHostApps.dll",Launch 5919f138425a1941b61b211e81092319
One of my scripts helped you out? Please donate via Paypal

7iben
Posts: 123
Joined: 04 Apr 2019 18:22

Re: script open a selected file with shared application

Post by 7iben »

Yes, Illustrator starts immediately from the command prompt.
(OS: Windows 11 Pro on Parallels ARM Virtual Machine - XY: Current x64 beta - Display: 3440x1440 @ 125%)

highend
Posts: 14923
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: script open a selected file with shared application

Post by highend »

And without a file to open from XY again?

Try both variants...

Code: Select all

run """%SystemRoot%\System32\rundll32.exe"" ""%ProgramW6432%\Parallels\Parallels Tools\Plugins\SharedHostApps.dll"", Launch 5919f138425a1941b61b211e81092319";

Code: Select all

run """%SystemRoot%\Sysnative\rundll32.exe"" ""%ProgramW6432%\Parallels\Parallels Tools\Plugins\SharedHostApps.dll"", Launch 5919f138425a1941b61b211e81092319";
One of my scripts helped you out? Please donate via Paypal

7iben
Posts: 123
Joined: 04 Apr 2019 18:22

Re: script open a selected file with shared application

Post by 7iben »

Unfortunately not. Option 1: Xyplorer loads and then stops at some point without any message; nothing happens.

Option 2: This message appears, and unfortunately, it also doesn't open.
Bildschirmfoto 2026-04-17 um 07.47.05.png
You do not have the required permissions to view the files attached to this post.
(OS: Windows 11 Pro on Parallels ARM Virtual Machine - XY: Current x64 beta - Display: 3440x1440 @ 125%)

jupe
Posts: 3446
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: script open a selected file with shared application

Post by jupe »

I'd try the top one again without the space before "Launch", depending on dll sometimes it isn't tolerated.

7iben
Posts: 123
Joined: 04 Apr 2019 18:22

Re: script open a selected file with shared application

Post by 7iben »

No, unfortunately not with both.
You do not have the required permissions to view the files attached to this post.
(OS: Windows 11 Pro on Parallels ARM Virtual Machine - XY: Current x64 beta - Display: 3440x1440 @ 125%)

7iben
Posts: 123
Joined: 04 Apr 2019 18:22

Re: script open a selected file with shared application

Post by 7iben »

I've now installed the 32-bit version of Xyplorer.

The first suggestion works: `run """%SystemRoot%\System32\rundll32.exe"" ""%ProgramW6432%\Parallels\Parallels Tools\Plugins\SharedHostApps.dll"", Launch 5919f138425a1941b61b211e81092319 <curitem>";`

The file opens in the program.
(OS: Windows 11 Pro on Parallels ARM Virtual Machine - XY: Current x64 beta - Display: 3440x1440 @ 125%)

7iben
Posts: 123
Joined: 04 Apr 2019 18:22

Re: script open a selected file with shared application

Post by 7iben »

I'll use the 32-bit version for now until the 64-bit version works. I've also noticed that it only works if the file to be opened is located on drive C. Opening a file from a network drive doesn't work, even in the 32-bit version. Is there a solution for this?
(OS: Windows 11 Pro on Parallels ARM Virtual Machine - XY: Current x64 beta - Display: 3440x1440 @ 125%)

Post Reply