Hi Gary,

The following script has worked for me from IE 5 through IE 7:
   <script language=JScript>
      function mkdir(str) 
        {var wshshell = new ActiveXObject('WScript.Shell');
         wshshell.Run('cmd /c md "'+str+'"', 1, true);}
   </script>

   <a HREF=JavaScript:mkdir('\\test')>Make Directory</a>

The JavaScript, JScript, or wsh sandboxes do not generally provide access to 
the underlying operating system if they are called from a browser.  So the 
trick here is to call them from a browser, but not allow the sandbox to know it 
was called from a browser.

This works because IE executes JavaScript, which calls JScript, and in turn 
calls wsh, using the ActiveXObject method.  Wsh is unable to tell it was 
ultimately initiated by IE, so it makes an assumption that it must have been 
called by the operating system, as JScript was the last thing to touch it.  
This provides the script the needed access to the operating system from the wsh 
sandbox.

Depending on the versions of IE, the installed patches, and a given user's 
settings within IE, they may receive a prompt as to whether they want to allow 
a control to run.  If they do, they can click OK.  It is possible to disable 
this prompt by adding the Mid-Tier server to the user's Trusted Sites.

Eric Cleereman

-----Original Message-----
From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] Behalf Of Axton
Sent: Tuesday, May 08, 2007 4:44 PM
To: [email protected]
Subject: Re: Mid-Tier and run process


I suggest you find another way to do whatever it is you are trying to do.

I've visited websites that downloaded files and created folders on my
pc, it was through an browser vulnerability and it typically installs
a trojan or virus.

If you really need to do this, look into writing an active x control
(preferably signed) that you can somehow embed in your remedy form if
accessed from the mid-tier:

http://en.wikipedia.org/wiki/ActiveX_control
http://msdn2.microsoft.com/en-us/library/aa751972.aspx

Axton Grams

On 5/8/07, Opela, Gary L Contr OC-ALC/ITMA <[EMAIL PROTECTED]> wrote:
> **
>
>
>
> Mid Tier 6.3
>
> Windows 2k server
>
> Windows XP clients
>
> User/Server 6.3
>
>
>
> Error:
>
> active link run process not supported (ARERR 9366)
>
>
>
> All, I'm trying to do a run process via an active link on a button from the
> mid tier. The run process does the following:
>
>
>
> c:\windows\system32\cmd.exe /c md \\<remedy server>\<remedy share>\$Upload
> File Path$
>
>
>
> I am presented with the above error. Upon investigation, we found that on
> the mid tier, you cannot do a run-process action that returns a value. We
> are not asking that the cmd command return a value, however this appears to
> be what the system is thinking. I'm guessing it is the standard output if
> you run the MD command in a shell window that the system is catching as a
> return, or maybe the command does send a return code if successful or
> whatever. Any how, the directory is not getting created.
>
>
>
> Has anyone ever used a button on the mid tier to create a folder directory?
> If so, how did you get it to work?
>
>
>  Thanks,
>
>
>  Gary __20060125_______________________This posting was
> submitted with HTML in it___

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org ARSlist:"Where the 
Answers Are"

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org ARSlist:"Where the 
Answers Are"

Reply via email to