How to launch program without opening dialog

S

SK

I am calling an exe thru' href, but when it executes,
I get the message if I want to open the file(exe file).
Is there any way I can suppress this from appearing
and open the program?

Thank you,
SK
 
L

ljb

Probably not an ASP question...

<script language="vbscript">
function RunFile(TheFile)
CreateObject("WScript.Shell").Run """" & TheFile & """, 0, False"
end function
</script>
<body>
<A href='vbscript:RunFile("\\server\path\program.exe")'>Run this program</A>
</body>
 
C

Curt_C [MVP]

No, thank heavens....
It's a HUGE security risk. The user will have to alter their settings to
allow this.
Think about it. I could send a user to a link with a virus.exe on it and
install it automatically... NOT a good thing.
 
S

SK

ljb,

Thanks for the reply!

I am able to run my program, however when its launched,
I get window "Some files can harm your computer....

YOu want to Open/Save/Cancel ...

How to avoid this message from appearing so that it
runs the program.
Next thing is it should open the file using the name
that I pass on. For eg. you want to open an excel
file using excel.

Thanks again for your help!
-SK
 
D

Dan Boylett

SK said:
How to avoid this message from appearing so that it
runs the program.

This requires a very low security model - 'non-existant'.
As Curt mentions, allowing this to occur is a potentially huge security
risk, even in a trusted environment.
You may just have to live with the Open/Save/Cancel box.
Next thing is it should open the file using the name
that I pass on. For eg. you want to open an excel
file using excel.

If Excel is installed, and the file associations haven't been altered, Excel
will automatically open .xls files - you don't need to specify this.
 
R

Ray at

Link to the .xls file, and the file will open (depending on the user's
settings). Are you trying to link to excel.exe on your server or something?
That wouldn't work. Excel can be executed without being installed but it
needs 7 or 8 dependent files in the startup directory or %path% even for
that to work. If the person has Excel on his machine, the xls file will
open in it (or in the browser with an execl.exe process or the user will be
prompted to download the file). This is all determined by the user's
settings for the .xls filetype.

Ray at work
 
S

SK

Curt,

Or if there is flag I can specify like NOCHECK, NOPROMPT,
SECURITY=OFF.

Thank you,
-SK
 
R

Ray at

The same risk would still exist then, would it not?

''code to change user's settings
''code to execute virus

?

Ray at work
 
C

Curt_C [MVP]

no... again this would be a huge security risk and by default it not
allowed.
If it's programmatically alterable I could easily infect any person who
visit a site.
 
S

SK

Ray,

Sorry if I mislead you. The program I am executing is
an .exe file by another vendor. I want to open
a file using this program. I am able to launch it
but I get the dialog box as I mentioned as a result
it doesn't even store the file name.

Users click on the file name to open so it is will
be inconvenient to remember the path and filename.

Thank you,
-SK
 
S

SK

Dan,

Just for testing purpose, can you let me know where
should I specify. I want to ensure that it works as
I want. 'cause I want to make sure that the file
name is being passed over to this app.

Note, I am not using excel, it was just and example
I am using an .exe to open up file.

Thanks for your help!

-SK
 
D

Dan Boylett

SK said:
Dan,

Just for testing purpose, can you let me know where
should I specify. I want to ensure that it works as
I want. 'cause I want to make sure that the file
name is being passed over to this app.

Note, I am not using excel, it was just and example
I am using an .exe to open up file.

Thanks for your help!

Hi SK,

In Internet Explorer, browse to your site, then click on Tools -> Internet
Options -> Security.

Move the security slider to the lowest option - note the warnings it will
give you.

Click on Apply (Yes if promoted) and then ok - try clicking on your link
again.

If it still doens't work there might be a option under the custom level you
can specify, but TBH I've never actually
done what you're trying.

My instinct would be that if it still doesnt' work with security set to
'Low' then it will never work.

The other possible solution is for you to write your own Browser that your
users use - not sure if that's possible or feasible for you to do,
but then you would have full control over what the application does.
 
R

Ray at

You cannot avoid this dialog.

Ray at work

SK said:
Ray,

Sorry if I mislead you. The program I am executing is
an .exe file by another vendor. I want to open
a file using this program. I am able to launch it
but I get the dialog box as I mentioned as a result
it doesn't even store the file name.

Users click on the file name to open so it is will
be inconvenient to remember the path and filename.

Thank you,
-SK
 
S

SK

Dan,

Thank you for the reply!

Can you send me your email id so that if I find a
workaround I can convey it to you.

Appreciate your help!

Thanks again,
SK
 
S

sk

Curt,

I forgot to add this - why is it not storing the
names of files to open? After I click on open in dialog
box, it should open the file, but it doesn't. Can you
help me on that?

Thank you,
-SK
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top