open associated file with explorer.exe

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
User avatar
rosch
Level 2
Level 2
Posts: 11
Joined: Wed Oct 06, 2010 4:55 am

open associated file with explorer.exe

Post by rosch »

I all Windows versions you can open a file with its associated program using explorer:

Code: Select all

explorer.exe c:\myfile.pdf
Now test.pdf is opened with e.g. Adobe or whatever..

I tried this in wine-1.1.42 but I cannot get it work. I only get the wine file explorer.

Now

Code: Select all

start.exe c:\myfile.pdf
work just fine but unfortunately I need the explorer version to work.

many thanks,
User avatar
rosch
Level 2
Level 2
Posts: 11
Joined: Wed Oct 06, 2010 4:55 am

test in wine 1.2

Post by rosch »

Tried in wine 1.2 too with the same results..
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Re: open associated file with explorer.exe

Post by vitamin »

rosch wrote:I all Windows versions you can open a file with its associated program using explorer:

Code: Select all

explorer.exe c:\myfile.pdf
This is wrong. Explorer has nothing to do with file associations. You should be using "start <foo>" instead. Regardless Wine's explorer doesn't support this.
User avatar
rosch
Level 2
Level 2
Posts: 11
Joined: Wed Oct 06, 2010 4:55 am

explorer vs start

Post by rosch »

I do agree with you although I could not locate any more or less official documentation on that from Microsoft..
Unfortunately I am not the author of the program running in wine that shoots this "explorer.exe" command to open associated files.
The "start.exe" command did not work with the program although it works perfectly in cmd.
I'll dig deeper into why the start.exe didn't do it's job.

thanks.
User avatar
rosch
Level 2
Level 2
Posts: 11
Joined: Wed Oct 06, 2010 4:55 am

Re: open associated file with explorer.exe

Post by rosch »

Code: Select all

explorer.exe c:\myfile.pdf
This is wrong. Explorer has nothing to do with file associations. You should be using "start <foo>" instead. Regardless Wine's explorer doesn't support this.
I would rather say that this is bad usage :) ..
Anyway, for some strange reason the explorer version does work in Windows..but I don't even want to know why :wink:

I'll post the outcome as soon as I can.

cheers.
doh123
Level 8
Level 8
Posts: 1227
Joined: Tue Jul 14, 2009 1:21 pm

Post by doh123 »

you have some program made for Wine that is using Explorer? or its some windows program thats using that as a command line argument to open files? Sounds like a really lazy programmer to do something like that....

heck you could always try to make a dedicated bottle just for this one program and rename start over to explorer and see what happens :-)
User avatar
rosch
Level 2
Level 2
Posts: 11
Joined: Wed Oct 06, 2010 4:55 am

start.exe -> start

Post by rosch »

doh123 wrote:you have some program made for Wine that is using Explorer? or its some windows program thats using that as a command line argument to open files? Sounds like a really lazy programmer to do something like that....
It's a windows program, in fact it's SBClient (SystemBuilder from http://www.rocketsoftware.com/u2/) and yes it shoots a pdf opening command using explorer.exe.
doh123 wrote:heck you could always try to make a dedicated bottle just for this one program and rename start over to explorer and see what happens :-)
I could but I don't think I have to..I think I've found the troublemaking piece: start.exe was called but this is non-existent on Windows..hence the trouble. start is an internal MSDOS command and hence is called by just typing

Code: Select all

start c:\myfile.pdf
.

cheers.
User avatar
rosch
Level 2
Level 2
Posts: 11
Joined: Wed Oct 06, 2010 4:55 am

[solved] it works

Post by rosch »

It works nicely :-)
By the way, the file path has to be converted from "windows style" and then you can call your Linux program, but these are details.. :

Code: Select all

upath=$(winepath -u $wpath)
$cmd $upath & 
cheers.
Locked