Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Launch VBS on file server from HTML

Launch VBS on file server from HTML

Launch VBS on file server from HTML


I have seen some posts about this but nothing that seems to address my situation.

Copy file from a file server to a local PC location from an HTML link
Launch application after copy of files

We use a Java app hosted offsite. When an update is made, new JAVA cache is downloaded to the client stressing the MPLS circuit between us and host.

I can stage the java cache and copy it if changed using a script. The script below works from a desktop icon. I need to do this process from an HTML link because many of our users launch this app from a link on our intranet. Yes, I could eliminate the launch from intranet option but reconditioning 1000 users is not a task I take lightly.

Code in the script checks a trigger file. If the trigger file says update, files are copied and then the app is launched. If there is no update, the app just launches.

'Launch APP from Local Network cache
'avoid large downloads over MPLS circuit

'Script wide variables
strUser = CreateObject("Wscript.Network").Username
strLocalPath = "C:\Users\" & strUser & "\appdata\locallow\Sun\Java\Deployment\"
strRemotePath = "\\company.org\network\data\app_stage\cache"

'Read trigger file. 0=No_Update 1=Update
set objFSO = CreateObject("Scripting.FileSystemObject")
set objTriggerFile = objFSO.OpenTextFile("\\company.org\network\data\app_stage\trigger.txt")
strTrigger = objTriggerFile.ReadLine
set objFSO = nothing

'Determine if update of local cache is needed
Select Case strTrigger
Case "0"
set objShell = CreateObject("wscript.shell")
objShell.run "https://app.host.com/application.jnlp"
set objShell = nothing
Case "1"
resp=MsgBox("There will be slight delay while APP is updated",0,"APP Update")
'Code to update
set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.CopyFolder strRemotePath, strLocalPath
'Code to launch
set objShell = CreateObject("wscript.shell")
objShell.run "https://app.host.com/application.jnlp"
'Clear var's
set objFSO = nothing
set objShell = nothing
End Select

Any help in getting this or something like this to run from intranet would be REALLY appreciated!

-Mike M

RE: Launch VBS on file server from HTML

What does the user do? Do they go on to a site and click on a link to run this code?

I'm just wondering whether this can be an hta that they can download and run.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close