Closed Thread Icon

Topic awaiting preservation: Intranet Dev - show locally installed applications in html? Pages that link to <a href="https://ozoneasylum.com/backlink?for=13111" title="Pages that link to Topic awaiting preservation: Intranet Dev - show locally installed applications in html?" rel="nofollow" >Topic awaiting preservation: Intranet Dev - show locally installed applications in html?\

 
Author Thread
smonkey
Paranoid (IV) Inmate

From: Northumberland, England
Insane since: Apr 2003

posted posted 03-26-2004 15:43

Hi guys,

Basically I'm working on a small intranet test project and would like to show a list of all installed programs and their original icons from a specific directory on the users machine, obviously each user will have different apps installed, so basically I'm looking for a way to access the user's local drive and imparticular a specific directory containing their program shortcuts. Then retrieve the folders contents (nested folders too) and display those apps and with their icons in a html page - clicking the icons should start the apps.

So anybody know how this can be done? I know about .hta files for running unsigned ActiveX controls but I need to actually know the method for using JScript and ActiveX controls to do the above.

Or is there a different way to do this?

Please help, have a short timescale with this one.

Thanks guys,

Jon

<A HREF="http://www.cryokinesis.co.uk" TARGET=_blank>visit

Pugzly
Paranoid (IV) Inmate

From: 127.0.0.1
Insane since: Apr 2000

posted posted 03-26-2004 16:33

Good luck!

Due to security constraints, I don't see that being possible, and it certainly would be client side, not server side.

norm
Paranoid (IV) Inmate

From: [s]underwater[/s] under-snow in Juneau
Insane since: Sep 2002

posted posted 03-26-2004 16:40

Yes, there is a way to view and control all the programs installed on a computer over the web.... but not from a browser. You are talking about VNC.

smonkey
Paranoid (IV) Inmate

From: Northumberland, England
Insane since: Apr 2003

posted posted 03-26-2004 16:59

sorry guys, kinda gave out the wrong vibe.

basically it doesn'y need to work over the - it can be clientside, but it has to run from the browser since that is how the 'client' is is accessing the intranet. The main intranet server doesn't need to know the apps on the local machines, the only reason they apps need to appear in the intranet interface is a visual continuity thing.

So clientside is fine. Now ActiveX can access the local folders (special folders even) and if used within a .hta (M$ proprietry html application - basically just an html file) on the local machine it is then viewed as a trusted source and will run without prompts or problems.

The trouble I need to actually know how to use ActiveX and JScript to do this.

Or if a different method is available that is cool too, I just need to know it asap.

Thanks guys,

Jon

<A HREF="http://www.cryokinesis.co.uk" TARGET=_blank>visit

Tyberius Prime
Paranoid (IV) Mad Scientist with Finglongers

From: Germany
Insane since: Sep 2001

posted posted 03-26-2004 20:24

well... I guess you could also do it with a tiny web server (possibly in delphi and using ICS), sitting on the user's machine displaying that.
Not that that isn't at least half a days work either.

smonkey
Paranoid (IV) Inmate

From: Northumberland, England
Insane since: Apr 2003

posted posted 03-26-2004 22:13

InI, I NEED YOU AGAIN!



<A HREF="http://www.cryokinesis.co.uk" TARGET=_blank>visit

norm
Paranoid (IV) Inmate

From: [s]underwater[/s] under-snow in Juneau
Insane since: Sep 2002

posted posted 03-27-2004 03:57

I must admit, you have me confused. I understand that you are talking about an intranet and not the Internet. But let's examine this 'clientside' concept....

A browser IS clientside, it runs on the enduser's computer. And yes, it can be used to browse your local file structure, the way that Konqueror is used for file management and such on Linux. But if you are talking about making files and applications available to other machines, you are talking about a Server. As a matter of fact, that is the definition of a server.

The ways of remotely accessing another machine(that I know of) are thru VNC or some variation thereof like MS Terminal Services, Citrix, or a Remote X session. Of course if you are handy with C or C++, have knowlege of OpenGL or ActiveX , and know your networking protocols; there is no reason why you couldn't roll your own.

But I'm thinking that it will be a bit more involved than building a web application.

poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

posted posted 03-27-2004 05:20

Ubber quick reply.
I think you could use the File_object in Jscript. Anyhow I don't know if it'll recognize the environment variables/paths like %ProgramFiles% or %SystemRoot%

Hope it'll be of any help.

smonkey
Paranoid (IV) Inmate

From: Northumberland, England
Insane since: Apr 2003

posted posted 03-27-2004 14:00

arg...

ok Norm, basically the apps don't need to be available across the network, absolutely no sharing of anything local is important, the basics being shared content is stored on the intranet server, but the user needs to access the local applications on their own local machine, now obviously they could use the very complete and well designed 'start' menu to do this, and to be honest I can't see why they can't do that, but the people I'm building the the test project for are wanting to show the installed apps and enable launching them from intranet interface - nothing remoting happening, no connecting to the server or different machines, infact forget the whole intranet thing and just imagine you opening an html file that shows what apps you have on your machine and lets you launch them.

Poi, yes I agree here, I have already done some cursory research and the 'FileSystemObject' and other Windows Scripting Host ActiveX methods allow you to access folders on your computer from html run in Internet Explorer - also by using this route there is a method to retrieve the system 'Special Folders' ( http://www.winguides.com/scripting/reference.php?id=139 ), eg. 'Start Menu', 'Program Files', 'Fonts', etc.

code:
//JScript to access Special Folders
var WshShell = WScript.CreateObject("WScript.Shell");
strDesktop = WshShell.SpecialFolders("Desktop");



But the problem I am having is this:

Firstly I am unfamiliar with the way in which JScript or VBScript should be used to loop through a local directory (lets say 'Start Menu') picking up the application shortcuts and recursing through directories then resolving these shortcuts so I don't actually link to the shortcut, but instead the full application path and then retrieving the icons from the applications and displaying those within the html page (probably would involve locally caching icons as .gif or .png format)

Secondly I am having problems when I try and run HTML pages containing script to access the local file system - it works fine if I run stuff locally froma local HTML file, but if the HTML is first requested from a server on a network or the internet it doesn't allow the creation of the ActiveX Object - I figure this is a security thing. But If I open the said same HTML file from server after having renamed it's extension to .HTA (HTML Application) it works fine, because as M$ puts it, an HTA is like an exe, it download to the user's computer before running locally - also HTA files completely sidestep all the security issues and run as trusted applications. But it may not be possible to go this route so even if it pops up security prompts (which the network admin can disable anyway) I need to find a HTML from an server method - this is where the WshRemote method comes in I think: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/wslrfRemote_WSHObject.asp http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/wstsksetupofremotewsh.asp

Now it is not enabled by default, but that isn't a problem as it can be one of the setup tasks required to access the intranet. But I can't quite figure out how to use properly to run scripts locally, basically it looks as if I have to instanciate it, then tell it create a script on the remote machine (the remote machine being the local client when looking from the perspective of the intranet server) and then tell it to execute that script, but I'm still a little lost with how to script all this correctly, and how to specify the remote machine by name (what sort of name? IP Address? Workstation Name? or would a simple generic 'localmachine' type name work?).

So Anybody willing to take a look at the MSDN appalling confusing docs and see if they can figure it out? you guys are smarter than me and so I'm hoping if I can get this far then you guys can crack the insanely complicated world of M$ Scripting, documentation is so rough and sketchy and crap - cross-browser, opensource, stuff is so much easier, but not really an option here.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/wsoriObjects.asp
http://www.winguides.com/scripting/
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/wsconwindowsscripthostobjectmodel.asp

Thanks guys, I really appreciate all your assistance,

Jon

P.S. at the bottom of this page: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/wscondrivingapplications.asp
there is three code snippets which apparently list the 'fullpath' contents of the current directory and all sub directories, it then say about piping this info into another applictaion or something - well how about piping this info into html layer using Javascript?

Actually, just thinking, since what I want to do is predominantly client side it was probably a little silly to post in the serverside section, however my main reason for doing so was that I figured people who develop intranets are more likely to view this section.

<A HREF="http://www.cryokinesis.co.uk" TARGET=_blank>visit

« BackwardsOnwards »

Show Forum Drop Down Menu