Re: Torgeir Bakken

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Al Dunbar [MS-MVP] (alan-no-drub-spam_at_hotmail.com)
Date: 01/18/05


Date: Mon, 17 Jan 2005 23:01:08 -0700


"Al Dunbar [MS-MVP]" <alan-no-drub-spam@hotmail.com> wrote in message
news:OsSwPRz%23EHA.4092@TK2MSFTNGP09.phx.gbl...
>
> "Leon Cripps" <LeonCripps@discussions.microsoft.com> wrote in message
> news:B5B8BE63-610D-4E82-AFAA-661C6C79B8B4@microsoft.com...
> > I recieved your comment on another forum to look at some other login
> scripts,
> > none of the links you gave me seem to do the trick. Maybe Im being
really
> > stupid ( wouldnt surprise me) but I can map easily using groups that
USERS
> > are members of its just mapping by groups that COMPUTERS are members of.
> Ive
> > even seen somewhere that this may not even be possible. Like I said I
> would
> > like to do it even if its by what OU the computer is in.

<snip>

> I don't have access to our domain from here, but if you would like, I
could
> get a copy of the code (probably slightly edited) to share with you next
> week.

In case it is of interest or will help, below is a snippet of the code.
"CompDN" is a function that returns the distinguished name of the computer.

/Al

 ' determine which unit, if any, this workstation belongs to
 share = ""
 sgcount = 0
 with GetObject( "LDAP://" & CompDN() )
  For Each groupob In .groups
   If ( groupob.description <> "" ) Then
    sgcount = sgcount + 1
    If ( sgcount = 1 ) Then
     share = groupob.description
    else
     share = ""
    End if
   End if
  Next
 End With

 ' unit affiliation is valid?
 If ( share = "" ) Then
  ' not valid, advise user
  MsgBox "Workstation " & WNO.ComputerName & " has" _
   &vbnewline & "not been assigned a unit file
folder" _
   & vbnewline & vbnewline & "Contact Informatics",
, "Unit File Folders"
 Else
  ' valid. map share if necessary
  If ( not FSO.DriveExists( drive ) ) Then
    WNO.MapNetworkDrive drive, share
  End If
  ' open up explorer on the drive
  WSO.run "explorer.exe " & drive
 End if



Relevant Pages

  • Re: ANN: JavaScript Debug Library
    ... It looks like s) Opera does not create ... >> scripts expect a new object to not have any enumerable properties. ... as assigning functions to members of objects is ... also a fundamental part of the language, you would have to check the ...
    (comp.lang.javascript)
  • Re: Login control and restricted member pages
    ... As you said the login dialog prompts each time the page loading a image, ... protected folder. ... When a page display some images file, ... the root members folder isn't. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: sp_revoke login is not working as expected.
    ... when I use DROP LOGIN and subsequently try to connect i get the folloiwng ... Since sysadmin role members are mapped to the dbo user in all databases, ... SQL Server MVP ... All of them are also a part of a windows group which has required ...
    (microsoft.public.sqlserver.security)
  • Re: Prevent Users interactive login, but allow them to run batch jobs
    ... run batch jobs but they should not be able to login to domain by pressing ... Domain Users as well as Authenticated Users are made members ... Just how you effect it so that the account meets those depends on ... Authenticated Users would still allow local login to the account. ...
    (microsoft.public.win2000.security)
  • Re: Group Policy - How powerful is it really?
    ... Scripts - Startup/Shutdown: Use this extension to specify the scripts ... The two properties are Members and Member Of. ... specifies which other groups the restricted group should belong to. ...
    (microsoft.public.security)