determining if user has shell access

Florian von Walter fvwalter at web.de
Thu Oct 14 10:44:34 CDT 2010


 Monte,

the shell under Windows is cmd.exe which usually is located in
C:\Windows\system32 for most recent versions of Windows.
This path (i.e. "C:\Windows") is actually dependent on systems and
locales so there is an environment variable "WINDIR" which returns the
path on the current system. There is also a Windows registry variable
that points to the Windows directory but it is easier to access the
environment.
The correct way to determine if you have permissions to execute shell
scripts then is probably to find out if you have execute access to
%WINDIR%\system32\cmd.exe. This usually involves some Win32 API
massaging messing around with ACLs.
Maybe it suffices to open %WINDIR%\system32\cmd.exe as a file for
read-only access to see if you can access cmd.exe.

Regards, Florian

On 14.10.2010 07:53, Monte Goulding wrote:
> No ideas anyone?
>
>> How is it possible to determine if shell access is available? One of my apps is being run where the command line is restricted on Windows and shell calls aren't being returned. I think this is a bug in the engine in that a call to shell should return "Error: no shell access" or something logical rather than not returning but has anyone worked around this before.
> Cheers
>
> --
> Monte Goulding
> M E R Goulding Software Development
> Bespoke application development for vertical markets
>
> InstallGadget - How to create an installer in 10 seconds
> revObjective  - Making behavior scripts behave
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>



More information about the use-livecode mailing list