Re: OT:WSH / VBS on Intranet web .aspx page, help please
- From: "Antoine" <mfns-spam15@xxxxxxxxxxxxx>
- Date: Mon, 24 Oct 2005 19:11:50 GMT
"Antoine" <mfns-spam15@xxxxxxxxxxxxx> wrote in message
news:g_87f.11506$6i4.2572@xxxxxxxxxxxxxxxxxxxxxxx
> I am hoping to embed somehow Windows scripting into a server side ASPX
page,
> but I am struggling a bit to identify whether what I am doing is possible
> (or requires something like remote WSH). Wscript itself does not appear to
> supported in the same format on the .NET I am using as it is in Access etc
> with references to scrrun.dll, but I can just replace it with
"createobject"
> or server.createobject and without using any references - though this only
> works for WINDOWS forms not Web.
>
> Although the webpage runs on the context of the websever, I want to run
some
> code ( that comes off an application SDK ) to alter settings within a
> currently running Windows application that the user happens to have
running.
> By coincidence the ASPX page I am using is a tab of that very application,
> but the two are not directly linked except that I am doing stuff related
to
> that contact on the page (sql server oledb queries).
> It is only intended to run within the context of an Intranet.
>
> I think I am close to working around this in a naff way by allowing the
> actual download of the script file, and using parameters to achieve
changing
> the name to the one I want in the file. I didn't manage to get params to
> work, but the file downloads and runs if run on a web link eg
> //10.10.10.10/Relations/changecontact.vbs
>
> But really I would like to do this better and seamlessly. I don't suppose
> there are any WSH gurus here that could point blank indicate whether its
> possible or not, and steer me in the right direction in terms of running
> CreateObject on a webserver but within the context of the user who is
> accessing the page - to change his settings within his instance of the
> application ?
>
> Remote WSH seems a bit of a knightmare because of having to look up the
> remote computer name, ensuring the script that runs has the right
parameter
> in it etc.
> I'd love to do it by just calling create object on the IIS side, but this
> only seems to work for Windows forms and I can see the reasoning behind
> this.
> Any help greatly appreciated.
>
> example VBS (will run locally to achieve the example of what is required -
I
> would change the identity to a parameter value which can be easily done
with
> params in VBScript).
>
> Dim objSO
> Set objSO = WScript.CreateObject("SuperOffice.Application")
> if IsObject(objSO) then
> name = objSO.CurrentContact.Name
> name = name & vbCrLf & vbCrLf
> name = name & "...now changing to contact 1 (SuperOffice)"
> MsgBox name, vbInformation + vbOKOnly, "Current Contact Name"
> objSO.CurrentContact.ChangeIdentity(1)
> else
> MsgBox "Unable to connect"
> end if
>
> Set objSO = Nothing
Sorted, I think with some advice from another forum. I need client side
processing (java or vbscript) instead of server side aspx. A bit fiddly but
I have come up with something similar yonks ago using reflection
container.dataitem.
.
- Follow-Ups:
- References:
- OT:WSH / VBS on Intranet web .aspx page, help please
- From: Antoine
- OT:WSH / VBS on Intranet web .aspx page, help please
- Prev by Date: Re: paging Bear
- Next by Date: Re: not even a newbie to biking...
- Previous by thread: OT:WSH / VBS on Intranet web .aspx page, help please
- Next by thread: Re: OT:WSH / VBS on Intranet web .aspx page, help please
- Index(es):
Relevant Pages
|