473,396 Members | 1,608 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

PATH Environmental Variable start/run permission

I've created an application that I need to launch from a web browser.
So I tried these steps:

1. on the install I modified the PATH environmental variable to include
the path on the application directory.
2. on the web pages uses java script to call ShellExecute to call the
application.

This actually does launch the application; however there seems to be a
permission error. Because if I simply launch the application normally
(either by clicking the executable or the shortcut) the app launches
fine. However when I launch from the javascript shellexecute it errors
out at the line of code when I try to delete some temp files.

Bascially it doesn't have permission to delete the temp files when i
launch the app from the java script; but does when I lauch from the
shortcut.

Does anybody have any idea how I can remedy this?

Sep 26 '05 #1
4 4532


jt*****@eudoramail.com wrote:
I've created an application that I need to launch from a web browser.
So I tried these steps:

1. on the install I modified the PATH environmental variable to include
the path on the application directory.
2. on the web pages uses java script to call ShellExecute to call the
application.


"java script"? And "ShellExecute"? Is ShellExecute a function a browser
exposes to JavaScript? Which browser is that?
I think you need to be more specific, you might be targetting Windows
and IE and try to access the WSH shell object or the Windows shell
object but perhaps you are doing something completely different.
--

Martin Honnen
http://JavaScript.FAQTs.com/
Sep 26 '05 #2

Yes, he's ranting about WSH.exe calls through an activeX object in IE win32
ONLY.

On the specific matter, you're not supposed to be launching any
executables to begin with from js, and the permission issue is due to
settings on activeX scripts defaults on IE-win32, bear in mind that is good
only in win32 IE, not elsewhere, and for NTFS filesystems, it may also
encounter OS permission enforcements based on the account logged in.
Either way, if you need to run/access executables, use a server sided
language, ASP or PHP or if you need it for IE only, VBS.
Danny
Sep 27 '05 #3

Danny wrote:
Yes, he's ranting about WSH.exe calls through an activeX object in IE win32
ONLY.

On the specific matter, you're not supposed to be launching any
executables to begin with from js, and the permission issue is due to
settings on activeX scripts defaults on IE-win32, bear in mind that is good
only in win32 IE, not elsewhere, and for NTFS filesystems, it may also
encounter OS permission enforcements based on the account logged in.
Either way, if you need to run/access executables, use a server sided
language, ASP or PHP or if you need it for IE only, VBS.
Danny

Ok I figured this out what was our problem: it was NOT a permission
issue.

You can in fact use the ShellExecute in js to launch applications (no
prob). The problem was how we were determining the CurAppPath (or the
path of the directory where the application is currently installed).
When we launched the application normally this worked fine; but when we
tried to launch it from the shellexecute in js the path I got was wrong
(i'm not sure is it was the path where the browser was located or where
the scrun (?) was located). So when we fixed that it was ok; no
permission errors.

Thank you

Sep 27 '05 #4

jt*****@eudoramail.com wrote:
You can in fact use the ShellExecute in js to launch applications (no
prob).


If it works with your particular settings and requirements then fine,
but in general with normal security settings IE does not allow a web
page loaded via HTTP to do stuff like

var wshShell = new ActiveXObject('WScript.Shell');
wshShell.Run('notepad.exe');

the object creation will not be allowed.

And with Windows XP SP 2 and IE there script and ActiveX in HTML
documents loaded from the file system is disabled by default and only if
the user after a warning allows it the page is reloaded with script and
ActiveX enabled.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Sep 28 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: David Cook | last post by:
Windows (XP and NT) allows one to specify environmental variable (such as PATH and CLASSPATH) at both the SYSTEM-wide level as well as at the per-USER level. And the behavior has always been...
9
by: Bengt dePaulis | last post by:
I have a local directory that I want to include in my sys.path How to save it permanently? Regards /Bengt
6
by: Garfield | last post by:
We have written a small function to append a couple of paths to the path environmental variable. The code is: string PathValue = ""; string sAdd = ""; sAdd = ";" + <path1> + "Bin;" +...
0
by: Rob Meade | last post by:
Hi all, I've written a small app which firstly reads in from an xml config file to set some start parameters. once this is done, it takes the supplied path from the config file, iterates...
3
by: David Thielen | last post by:
Hi; I created a virtual directory in IIS 6.0 and my asp.net app runs fine. But when it tries to write a file I get: Access to the path is denied. - C:\Inetpub\wwwroot\RunReportASP\images ...
2
by: Kourosh | last post by:
I'm just wondering, is there a way I could use an environmental variable in an XML file to specify the path of its XSL file? something like <?xml-stylesheet type="text/xsl"...
17
by: mohan | last post by:
Hi Guys, I've been using the following IDE, "Pythonwin - Python IDE and GUI Framework for Windows. Copyright 1994-2001 Mark Hammond " With respect to my work, I had created my own modules...
2
by: dave6502 | last post by:
Struggling newbe here, some of my #includes work, some dont. Is it possible to list the include path ? (in BASH), I have looked at the environmental variables (loads of them) but cannot find a...
1
by: ender2012 | last post by:
I am trying to set up Rococoa and I need to add a value to the jna.library.path environmental variable, I know how to do this on Windows but I can't find anything about how to do so on OSX. Any...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.