GetObject 
Author Message
 GetObject

Hi,

I have tried to get this to wirk but still gt a syntax error.  What could I
have misytyped?

Set UserObj = GetObject("WinNT://Your_Domain/" & u & ",User")

I did insert my server name.  Is there anyway to have the script insert my
server name for me?


Thanks

Tim

  http://www.*-*-*.com/



Thu, 10 May 2001 03:00:00 GMT  
 GetObject

Actually his syntax is fine I tested it on my machine, the only difference I made to it was to change User to user. Something else must be going on.

Clarence

You can get the latest info on ADSI from...
http://www.microsoft.com/ntserver/windowsnt5/exec/feature/ADSIintro.asp

You can get the domain name from
WshNetwork.UserDomain

It may be a problem with the quotes. I build the string first, then just ref the string in the GetObject line.
e.g.
adsPath = "WinNT://" & strDomain & "/" & strUser
set adsObj = GetObject(adsPath)

Regards,
Ian
WSH FAQ http://wsh.glazier.co.nz/frame.htm

    Hi,

    I have tried to get this to wirk but still gt a syntax error.  What could I
    have misytyped?

    Set UserObj = GetObject("WinNT://Your_Domain/" & u & ",User")

    I did insert my server name.  Is there anyway to have the script insert my
    server name for me?


    Thanks

    Tim

      http://wsh.glazier.co.nz



Thu, 10 May 2001 03:00:00 GMT  
 GetObject

You can get the latest info on ADSI from...
http://www.microsoft.com/ntserver/windowsnt5/exec/feature/ADSIintro.asp

You can get the domain name from
WshNetwork.UserDomain

It may be a problem with the quotes. I build the string first, then just ref the string in the GetObject line.
e.g.
adsPath = "WinNT://" & strDomain & "/" & strUser
set adsObj = GetObject(adsPath)

Regards,
Ian
WSH FAQ http://wsh.glazier.co.nz/frame.htm

    Hi,

    I have tried to get this to wirk but still gt a syntax error.  What could I
    have misytyped?

    Set UserObj = GetObject("WinNT://Your_Domain/" & u & ",User")

    I did insert my server name.  Is there anyway to have the script insert my
    server name for me?


    Thanks

    Tim

      http://wsh.glazier.co.nz



Fri, 11 May 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. GetObject() in VBScript on web page doesn't work

2. getobject inside html file

3. Error with CreateObject/GetObject

4. GetObject Syntax Error?

5. ActiveXObject/GetObject

6. Use of GetObject in client browser script

7. GETOBJECT Fails from Intranet Page

8. getobject does not work in vbscript

9. _NEED HELP WITH CREATEOBJECT AND GETOBJECT SCRIPT

10. GetObject problem

11. VBScript 3 GetObject behaviour change?

12. getObject error

 

 
Powered by phpBB® Forum Software