[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 255
  • Last Modified:

Logon scripts for groups

Hi,

I have a w2K server with some xp and 98se pcs.  I need to apply 1 logon script to a group of users that use a mixture of these pcs.  Am I right in saying that 98se doesn't use the group policy and I don't want to have to go into each user and alter each logon script.  I don't seem to be able to apply a logon script to a group.

Any ideas?
0
WannabeNerd
Asked:
WannabeNerd
1 Solution
 
Lee W, MVPTechnology and Business Process AdvisorCommented:
No, you can't apply a logon script to a group, nor can 98SE use group policy.  But if this group has access to something the others don't you could write a seperate script (placed in the netlogon share) and add a line to the existing logon script that checks for access to the specific resource. If there, it executes the other script, if not, then it skips it.  For example:

IF EXIST X:\SERVER\SHARE\PATH\TO\A\SECURE\FILE.TXT CALL ThisGroupsSpecialScript.bat
0
 
CiaranDolanCommented:
Your best bet is to investigate KIXTART (http://www.kixtart.org/). This has been used by thousands of administrators worldwide for deploying logon scripts when working with heterogeneous clients. It's pretty simple to learn when you want to do simple things like execute commands based upon group memberships. There is a very large (and busy) bulletin board system there as well although I'm sure if you get stuck you can just come back here and we'll help you out.
0
 
LongbowCommented:
You can with an AD script
Save it as a .vbs and change the variables as needed

Set WshShell = WScript.CreateObject("WScript.Shell")

DomainString = "DomainName"
UserString = "UserName"
GroupString = "GroupName"
CommandString = "CommandToExecute"

Set UserObj = GetObject("WinNT://" & DomainString & "/" & UserString)
   
    For Each GroupObj In UserObj.Groups
      If GroupObj.Name = GroupString Then
         Wscript.Echo GroupObj.Name
         WshShell.Run CommandString, 1, false
      End If
    Next

For Windows 98 systems you maybe need to have :
Windows Script 5.6 for Windows 98, Windows Millennium Edition, and Windows NT 4.0
http://www.microsoft.com/downloads/details.aspx?FamilyId=0A8A18F6-249C-4A72-BFCF-FC6AF26DC390&displaylang=en
0
New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

 
LongbowCommented:
If you need to find the version of Windows before running some script :
http://groups.google.com/groups?selm=3F87357D.5C0F1FD1@hydro.com
0
 
Leandro IaconoCommented:
I imagine you refer logon script  as logon scripts in Group Policys. If so, GP can only be set at an OU level. What you would simply have to do is put the group of users inside a specific OU and link the GP with the logon scripts to that OU.

It won't work on w98 PCs ... it will only work on the XP computers ...


For windows 98 Computers ...

"Windows 95 and Windows 98 clients need to be managed with the System Policy Editor.

Client computers that are running Windows NT 4.0, Windows 95, or Windows 98 need to have the .pol file (Config.pol for Windows 98 or Windows 95, or Ntconfig.pol for Windows NT 4.0) created on the client computer's operating system copied to the domain's NETLOGON share. This is: %systemroot%\SYSVOL\sysvol\<domain name>\SCRIPTS under Windows 2000, or %systemroot%\winnt\system32\Repl\Import\Scripts under Windows NT 4.0."

http://www.microsoft.com/resources/documentation/windows/2000/server/reskit/en-us/distrib/dsec_pol_JUBA.asp?frame=true

System Policys:

http://www.microsoft.com/resources/documentation/windows/98/all/reskit/en-us/part2/wrkc08.mspx
0
 
craylordCommented:
I have to agree with CiaranDolan. KiXtart is the program you want to learn. We use it in our company and it has variables to see if it is being run on a Windows 98, 2000, XP, etc. Great way to have use scripts for users that may log on to pc's with varying OS's. Run XP, but then the user may login to a server with Terminal Services.

@ProductType  
The above command will return the OS type. Possible values:
"Windows 95"
"Windows 98"
"Windows Me"
"Windows NT Workstation"
"Windows NT Server"
"Windows NT Domain Controller"
"Windows 2000 Professional"
"Windows 2000 Server"
"Windows 2000 Domain Controller"
"Windows XP Home Edition"
"Windows XP Professional"
"Windows XP Server"
"Windows XP Domain Controller"
0
 
WannabeNerdAuthor Commented:
In the end for the single task I just did it all manually but sounds like KiXtart will do the job.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now