Question : VB script to open UNC application

i have thinapp's created and on a server, which we want users to be able to use, and not copy them to another drive or removeable media to take home etc.

one person said to create a VB file which runs the application from a hidden UNC path. then convert the vb file to an executable for distribution.

that way the users cant just right click the shortcut and get to the application directory.

i have been fiddling with some VB script i found on a few posts, which is below, no error comes up when i cscript it, but nothing happens all the same. i.e. the app doesnt run. it just gives the MS windows script host version speal.

can anyone help with whats wrong inside the code (i have no idea really, just trial and error, copying from different posts to try and understand)
am i going about this the right way, or is there another method?

1:
2:
3:
4:
5:
6:
Sub OpenFile
  Set objShell = WScript.CreateObject("Wscript.Shell")
  thinapp = """\\server\apps$\school\PSP8\jasc Paint Shop Pro 8.exe"""
  objShell.Run thinapp
end sub

Answer : VB script to open UNC application

Hi, you need to "execute" that Sub, or remove the Sub OpenFile and End Sub lines, and probably also you don't need the extra quotes.

  Set objShell = WScript.CreateObject("Wscript.Shell")
  thinapp = "\\server\apps$\school\PSP8\jasc Paint Shop Pro 8.exe"
  objShell.Run thinapp, 1, False


Regards,

Rob.
Random Solutions  
 
programming4us programming4us