We help IT Professionals succeed at work.

run a file from html page

bt707
bt707 asked
on
170 Views
Last Modified: 2010-04-09
I have a *.exe file I want users to run and install from a html page, I've had it setup to download or run from the page but I need to change it where they can only run the exe from the site and not download or save the file, forgot how to make it where it can only be executed and downloaded.

Thanks,

Comment
Watch Question

Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
guess I may be wrong then, I thought I had setup some a long time ago where the file could be run from the link but not downloaded. I'll look into it a bit more but have a feeling your right.
Top Expert 2007
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Commented:
I was thinking of something like:

OrignalFileName = "notepad.exe"
OrignalLocation = "http://127.0.0.1/"
CopyNotNeeded = False

Set WshShell = WScript.CreateObject("WScript.Shell")
      TempPath = WshShell.ExpandEnvironmentStrings("%TEMP%") & "\"
      FileToFind = TempPath & OrignalFileName
      Set FileSystemObject = CreateObject("Scripting.FileSystemObject")
            If (FileSystemObject.FileExists(FileToFind))=true Then CopyNotNeeded = True
            If CopyNotNeeded = False Then
                  'WshShell.Run "ftp " & OrignalLocation & OrignalFileName & " > " & TempPath & OrignalFileName
                  'I am not to sure of the real FTP Command
                  MsgBox "ftp " & OrignalLocation & OrignalFileName & " > " & TempPath & OrignalFileName
            End If
            'WshShell.Run TempPath & OrignalFileName
            MsgBox "at this point it would run:" & TempPath & OrignalFileName
      Set FileSystemObject = Nothing
Set WshShell = Nothing

Author

Commented:
Thanks for all the comments, I see I just have to stick with letting the users download and install, had thought about making a script to run it and delete it if I couldn't restrict the download but just isn't worth it for this issue.

No real way to do what I wanted to do, I'll close this and spit the points with all that commented.

Thanks,
Top Expert 2007

Commented:
One option comes to mind. If you create a webdav-share, people can connect to the share, and execute from there. The share looks like a local drive. You could limit access to the share via a login that works temporary.

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.