I have some processess (EHLAPPI) and dlls (custom DLLs to
get contents of encrypted files) that I want to call from
a web page. All of the stuff I've read indicates that I
can only do this using VBScript executed on the client
side (which makes sense given you don't want hackers
regisering COM objects and formatting your drive, etc.).

The exe's and dlls I've created as COM server objects
(using the ATL wizard in .NET)

I've created a COM Server using .NET for instance for the
Ehlappi process that I want to start, the COM info is: [
module(EXE, uuid = "{22CA2E94-69A2-4386-9161-
6E797F93E4C8}",
name = "EhllapiServer",
helpstring = "EhllapiServer 1.0 Type
Library",
resource_name = "IDR_EHLLAPISERVER") ];

It mentions that it creates a WinMain method for you

I've created a simple HTML page:
<html><head><title>My Test</title></head>
<body>
<script language="vbscript" type="text/vbscript">
Dim objEhlappi
Set objEhlappi = CreateObject("EhllapiServer")
document.write("<b>Is the COM object launched??</b>")
</script>
</body></html>

Bringing up this page in IE though I get a VBScript Error:
Error: ActiveX component can't create
object 'EhllapiServer'

I'm not much of a VBScript person, I don't know if this
is because it can't find the COM objects, or because of
some security issue (I'm logged in as an administrator).
Some questions I would REALLY apprciate some help on:

1) Is the approach that I'm taking correct?
2) What Registry settings can I check to see if the COM
object is registered, how would I register this on
another local PC?
3) How can I get more information about the error? Can I
get lasterror via VBScript for instance. Where can I
look this error up
4) To actually invoke the process I'm assuming I would do
a objEhlappi.WinMain() does anyone have any examples of
this (I assume I'd pass in my command line parameters
here as a string??)

Any suggestions would be GREATLY appreciated, I've been
hunting around on the web and can't find much information
on how to do this. THANKS!!

Re: Calling client side COM objects from a web page by Atrax

Atrax
Wed Dec 03 20:30:53 CST 2003

This is a multi-part message in MIME format

------=_NextPart_000_24703337
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit

Security restriction prevent client-side scripts from doing quite a lot
of things unless the user specifically allows it. I'd say this is the
problem.





________________________________________
Atrax. MVP, IIS
http://rtfm.atrax.co.uk/

newsflash : Atrax.Richedit 1.0 now released.
http://rtfm.atrax.co.uk/infinitemonkeys/components/Atrax.RichEdit/

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

------=_NextPart_000_24703337
Content-Type: text/html; name="_alt.0"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment; filename="_alt.0"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4=2E0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html;=
charset=3Diso-8859-1">
<META content=3D"MSHTML 6=2E00=2E2800=2E1276" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2>Hi,</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>I have an example program to modify user=
objects with values
from a spreadsheet linked on this page:</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2><A
href=3D"http://www=2Erlmueller=2Enet/UpdateUserProfile=2Ehtm">http://www=2E=
rlmueller=2Enet/UpdateUserProfile=2Ehtm</A></FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>The program reads the user Distinguished Name=
from the first
column of the spreadsheet=2E This example modifies the=
"profilePath" attribute,
but almost any attribute, including sAMAccountName,&nbsp;can be=
updated this
way=2E The program also shows how to "null" an attribute (remove=
any value)=2E If
you plan to modify the "cn" attribute, of course, you will have=
to use the
MoveHere method of the parent container object=2E</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>Also, you are correct about the=
SID's=2E</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>Does your spreadsheet identify users by DN or=
sAMAccountName?
Are the first name (givenName) and last name (sn) attributes=
populated with
values in your AD, so you can use these values to construct the=
new names, or
will everything be supplied in the spreadsheet? Is your intention=
that the value
of sAMAccountName be the same as the value of cn?</FONT></DIV>
<DIV><FONT size=3D2><BR>-- <BR>Richard<BR>Microsoft MVP Scripting=
and
ADSI<BR>HilltopLab web site - <A
href=3D"http://www=2Erlmueller=2Enet">http://www=2Erlmueller=2Enet</A><BR>-=
-</FONT></DIV>
<BLOCKQUOTE dir=3Dltr
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px;=
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Roger" &lt;<A
=
href=3D"mailto:hainesr3@nationwide=2Ecom">hainesr3@nationwide=2Ecom</A=
>&gt; wrote in
message <A
=
href=3D"news:umTKOveuDHA=2E2352@TK2MSFTNGP09=2Ephx=2Egbl">news:umTKOveuD=
HA=2E2352@TK2MSFTNGP09=2Ephx=2Egbl</A>=2E=2E=2E</DIV>
<DIV><FONT face=3DArial size=3D2>Thanks for your reply=
Richard=2E</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Just to give you a little=
background=2E&nbsp; It's
been mandated by our parent company that we change our domain=
user IDs to
match our Lotus Notes logon name (called the short=
name)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I've tested renaming a user=
account in Active
Directory users and computers and it works great=2E&nbsp; Once=
renamed it
maintains the same SID so any permissions to resources will not=
need to be
changed=2E</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I thought I could automate this=
process via a
script=2E&nbsp; My thinking is that I could reference a=
spreadsheet containing
all the attribute values that need to be changed by the script=
including the
"cn" and the <FONT=
size=3D3>"sAMAccountName"=2E</FONT></FONT></DIV>
<DIV><FONT face=3DArial></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial>Can I do this using your example?&nbsp;=
If so, what is
the next step in your example that would actually change the
value?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2><FONT=
size=3D3></FONT></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><FONT size=3D3><FONT size=3D2>How far=
out on a limb
am I here?</FONT></FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><