Re: How to call an windows program with ActiveXObject and load a file as well?
- From: Don84 <tatata9999@xxxxxxxxx>
- Date: Wed, 1 Jul 2009 07:56:47 -0700 (PDT)
On Jul 1, 2:55 am, Stevo <n...@xxxxxxxxxxxx> wrote:
Don84 wrote:
On Jun 30, 6:15 pm, Don84 <tatata9...@xxxxxxxxx> wrote:
On Jun 30, 6:00 pm, "Paul E. Schoen" <p...@xxxxxxxxxxxx> wrote:
"DL" <tatata9...@xxxxxxxxx> wrote in messageSorry, it were double quoted. Somehow the copy/paste got messed up,
news:46d3176d-e468-45ad-8fa6-458d74500bb9@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
prog = "mspaint.exe C:\\'Program Files'\\myProgram\\myImageFiles'+f;^ ^
I think these need to be both double quotes
prog = "mspaint.exe C:\\Paint\\myImageFiles'+f;^ ^
Same here?
Paul
it were like the following:
prog = "mspaint.exe C:\\'Program Files'\\myProgram\\myImageFiles"+f;
Just thought of old DOS 8.2 convention, tried the following instead,
prog = "mspaint.exe C:\\Progra~1\\myProgram\\myImageFiles"+f;
it works with IE7 on XP SP3 but not Firefox 3.0.11 on the same
machine. so, it's only half good.
It's actually called DOS 8.3 convention, but you can avoid that by using
%20 instead of spaces. So this would work on IE:
prog = "mspaint.exe C:\\Program%20Files\\myProgram\\myImageFiles"+f;
All non-IE browsers (that I know of) prefer a different format though.
Instead of C:\\ and backslashes throughout, you'd want file:///c:/ and
forward slashes throughout.
Finding your perfect string to use is easy. Just put an image into your
desired folder, and then drag/drop it onto Firefox. You'll see in the
address bar a URL like this:
file:///C:/Program%20Files/some%20folder/deleteme.gif
The good news is that IE will accept that URL also.
Warning #1
Putting images in the program files folder is a bad idea. I believe
Vista won't let mspaint save them there. It's been a "best practice" for
a long time, going back to the old Petzold books for Windows programmers
to not write anything into the program files folder. Only the installer
should write there. For already installed programs that want to store
data, they should use the local settings application data folders
instead. When Vista came along, instead of that just being a recommended
practice, it became enforced. This was one of the big reasons that a lot
of software needed updating for Vista.
Warning #2
The folder named "Program Files" is a localized name. In other languages
it's called something else - usually the foreign translation of one or
both of those english words.- Hide quoted text -
- Show quoted text -
Sorry,
prog = "mspaint.exe C:\\Program%20Files\\myProgram\\myImageFiles"+f;
did not work for neither IE7 nor Firefox 3.0.11.
On DOS convention, possibly my typo, 8.3 or my post has been hijacked.
On not placing images into "Program Files" folder, I'm with you,
however, the images are associated with a given program under "PF" ...
Thanks though.
.
- Follow-Ups:
- Re: How to call an windows program with ActiveXObject and load a file as well?
- From: Richard Cornford
- Re: How to call an windows program with ActiveXObject and load a file as well?
- References:
- Re: How to call an windows program with ActiveXObject and load a file as well?
- From: Paul E. Schoen
- Re: How to call an windows program with ActiveXObject and load a file as well?
- From: Don84
- Re: How to call an windows program with ActiveXObject and load a file as well?
- From: Don84
- Re: How to call an windows program with ActiveXObject and load a file as well?
- From: Stevo
- Re: How to call an windows program with ActiveXObject and load a file as well?
- Prev by Date: Re: web worker threads and window.settimeout
- Next by Date: Re: How to call an windows program with ActiveXObject and load a file as well?
- Previous by thread: Re: How to call an windows program with ActiveXObject and load a file as well?
- Next by thread: Re: How to call an windows program with ActiveXObject and load a file as well?
- Index(es):
Relevant Pages
|