James
Thu Dec 04 09:20:32 CST 2003
Ray,
Thanks for that - that's the way I would have done it originally.
Unfortunately we are not using IIS with ASP, we're using Apache with PHP.
If you have any idea how to do it that way then let me know! :-)
Other than that, the only way I can think of doing it is client sided...
Any other ideas?
Cheers,
Jamie.
"Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
news:eKvyAlnuDHA.2340@TK2MSFTNGP12.phx.gbl...
> This would be much better accomplished using server-side code. Since all
of
> your users are using IE, it will, by default, send the user's logon
> credentials to an intranet site (a domain with no dots in the name,
>
http://yourintranet, for example) if the server requests logon
credentials.
> Turn off anonymous access for your site or the directory with this page
and
> enable integrated authentication in IIS. You can then get the username
> with:
>
> <% sUsername = Request.SErverVariables("AUTH_USER") %>
>
> Ray at work
>
>
> "James Brown" <james.brown@nospam.com> wrote in message
> news:uPzqIhnuDHA.1760@TK2MSFTNGP10.phx.gbl...
> > Hi,
> >
> > On our intranet checkout page (used for telephone orders) we want to
know
> > which person placed an order. Everybody is using Internet Explorer. We
> > have tried the following code to get the Windows username:
> >
> > <script language="VBScript">
> >
> > Set objWinShell = CreateObject("WScript.Shell")
> > document.checkout.added_by.value=
> > objWinShell.ExpandEnvironmentStrings("%USERNAME%")
> >
> > </script>
> >
> > But it doesn't seem to work, even when "Initialise and script ActiveX
> > controls not marked as safe" on the Local Intranet security settings is
> set
> > to Enable. We get "ActiveX component cannot create object:
WScript.Shell"
> > errors. Windows Script Host is installed.
> >
> > Does anyone have any ideas how we can implement this functionality? It
> > doesn't have to use WScript but it would be ideal if it could pick up on
> the
> > Windows username, instead of our users having to log in a second time.
> >
> > Cheers,
> >
> > Jamie.
> >
> >
>
>