Page 1 of 1 1
Topic Options
#198447 - 2010-04-24 09:23 AM GPO assigned script only runs for admins
John_Ross Offline
Just in Town

Registered: 2010-04-22
Posts: 4
Loc: Abu Dhabi, UAE
i made a script and add it in the group policy, but its only working in domain admin or administrator group? why so?

Edited by Mart (2010-04-24 08:13 PM)

Top
#198448 - 2010-04-24 08:11 PM Re: GPO assigned scrip only runs for admins [Re: John_Ross]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
Hi John,

I moved your script from the suggestions forum to here because it has nothing to do with the post you replied to.
I also changed the title to fit your issue with the script.


Does the script run for non admins and skip parts or doesn't it run at all for them?
Can you post the script so we can see what you are trying to do?
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#198450 - 2010-04-25 12:33 AM Re: GPO assigned scrip only runs for admins [Re: Mart]
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
and is the gpo assigned to the users you want it to run against
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#198451 - 2010-04-26 06:22 AM Re: GPO assigned scrip only runs for admins [Re: Radimus]
John_Ross Offline
Just in Town

Registered: 2010-04-22
Posts: 4
Loc: Abu Dhabi, UAE
 Code:
;  KIXTART.SCR
;
;**** Last Modified on 22/04/2010 at 2:32:16 PM by JOHN ****

;*** ÖÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ·
;*** º                                                                       º
;*** º Windows 2008 Server Login Scripts for Trianon Hotel, Abu Dhabi        º
;*** º Created by/when : IT Dept.,Trianon Hotel, Abu Dhabi / 1 Jan 2010      º
;*** º Updated by/when : ................                                    º
;*** º                                                                       º
;*** ÓÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĽ

; ÖÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ·
; ºINITIALITIATIONº
; ÓÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĽ

  $domsvr = "\\TrianonSERV"   ;Trianon Hotel, Abu Dhabi
  $appsvr = "\\TrianonSERV"   ;Application Server

; ÖÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ·
; º PROCEDURE TO DISPLAY A WELCOME MESSAGE º
; ÓÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĽ
CLS


Small
Color c/n
Box (0,0,24,79,GRID)            ; 'background grid'
Color c+/n
Box (7,21,18,71,Å)              ; 'shadow of the box'
Color y/n			
Box (6,20,17,70,FULL)		; 'the box'

Color w+/n
AT ( 7,25) "Welcome to IT Dept., Have a Nice Day"
AT ( 9,25) "Full name    : "    ; display some text strings
AT (10,25) "Userid       : "
AT (11,25) "Privilege    : "
AT (12,25) "Workstation  : "
AT (13,25) "Domain       : "
AT (14,25) "Logon Server : "
AT (15,25) "Current Time : "
AT (16,25) "Current Date : "

Color y+/n
AT ( 9,43) @fullname            ; ...and some macro's
AT (10,43) @userid
AT (11,43) @priv
AT (12,43) @wksta
AT (13,43) @domain
AT (14,43) @lserver
AT (15,43) @time
AT (16,43) @date

sleep 5                         ; Wait for 5 secs (or key)

CLS

Color w+/n
AT (0,0) "Please wait....Checking for your Domain Group Memberships..."

Color b+/n
Box (1,0,5,79,full)

Color w+/n

AT (2,5) "Welcome " @fullname " "
AT (4,5) "Please wait while the appropriate drives are Mapped..."
 
;Drive_Mappings

Use * /delete /persistent
      
		
        
If InGroup("A&G")=1

        Use S: "\\TrianonSERV\A&G"
                 AT (16,12) "S: Drive mapped to A&G on TrianonSERV"
	Use P: "\\TrianonSERV\public drive"
	         AT (11,12) "P: Drive mapped to A&G on TrianonSERV"
        
EndIf
If InGroup("F&B")=1 

       Use S: "\\TrianonSERV\F&B"
		AT (19,12) "S: Drive mapped to F&B on TrianonSERV"
       Use P: "\\TrianonSERV\public drive"
	        AT (11,12) "P: Drive mapped to F&B on TrianonSERV"
       Use H: "\\TrianonSERV\F&B Manager"
	        AT (15,12) "P: Drive mapped to F&B Manager on TrianonSERV"

EndIf
If InGroup("ENGINEERING")=1 

       Use S: "\\TrianonSERV\Engineering"
		AT (19,12) "S: Drive mapped to ENGINEERING on TrianonSERV"
       Use P: "\\TrianonSERV\Public Drive"
	        AT (11,12) "P: Drive mapped to ENGINEERING on TrianonSERV"

EndIf
If InGroup("Front Office")=1 

       Use S: "\\TrianonSERV\Front Office"
		AT (19,12) "S: Drive mapped to FRONT OFFICE on TrianonSERV"
       Use P: "\\TrianonSERV\Public Drive"
	        AT (11,12) "P: Drive mapped to FRONT OFFICE on TrianonSERV"
       Use H: "\\TrianonSERV\Front Office Manager"
	        AT (15,12) "P: Drive mapped to Front Office Manager on TrianonSERV"

EndIf
If InGroup("Housekeeping")=1 

       Use S: "\\TrianonSERV\Housekeeping"
		AT (19,12) "S: Drive mapped to HOUSEKEEPING on TrianonSERV"
       Use P: "\\TrianonSERV\Public Drive"
	        AT (11,12) "P: Drive mapped to HOUSEKEEPING on TrianonSERV"
       Use H: "\\TrianonSERV\Housekeeping Manager"
	        AT (15,12) "P: Drive mapped to Housekeeping Manager on TrianonSERV"

EndIf
If InGroup("HR")=1 

       Use S: "\\TrianonSERV\HR"
		AT (19,12) "S: Drive mapped to HR on TrianonSERV"
       Use P: "\\TrianonSERV\Public Drive"
	        AT (11,12) "P: Drive mapped to HR on TrianonSERV"
       Use H: "\\TrianonSERV\HR Manager"
	        AT (15,12) "P: Drive mapped to HR Manager on TrianonSERV"

EndIf
If InGroup("IT")=1 

       Use S: "\\TrianonSERV\IT"
		AT (19,12) "S: Drive mapped to IT on TrianonSERV"
       Use P: "\\TrianonSERV\Public Drive"
	        AT (11,12) "P: Drive mapped to IT on TrianonSERV"

EndIf
If InGroup("Reservation")=1 

       Use s: "\\TrianonSERV\Reservation"
		AT (19,12) "S: Drive mapped to Reservation on TrianonSERV"
       Use P: "\\TrianonSERV\Public Drive"
	        AT (11,12) "P: Drive mapped to Reservation on TrianonSERV"
       Use H: "\\TrianonSERV\Reservation Manager"
	        AT (15,12) "H: Drive mapped to Reservation Manager on TrianonSERV"

EndIf
If InGroup("SALES")=1 

       Use S: "\\TrianonSERV\sales"
		AT (19,12) "S: Drive mapped to Sales on TrianonSERV"
       Use P: "\\TrianonSERV\Public Drive"
	        AT (11,12) "P: Drive mapped to Sales on TrianonSERV"
       Use H: "\\TrianonSERV\Sales Manager"
	        AT (15,12) "H: Drive mapped to Sales Manager on TrianonSERV"

EndIf
If InGroup("Finance")=1 

       Use s: "\\TrianonSERV\Finance"
		AT (19,12) "S: Drive mapped to Finance on TrianonSERV"
       Use P: "\\TrianonSERV\Public Drive"
	        AT (11,12) "P: Drive mapped to Finance on TrianonSERV"

EndIf
If InGroup("Administrators")=1 

       Use P: "\\TrianonSERV\Public Drive"
	        AT (11,12) "P: Drive mapped to Administrators on TrianonSERV"


sleep 5                         ; Wait for 5 secs (or key)

Exit






this is attached with the groups that i made in the domain which are:
front desk
f&b
kitchen
haousekeeeping
finance
etch.

please see and advice


Edited by Richard H. (2010-04-26 12:47 PM)
Edit Reason: Code tags

Top
#198455 - 2010-04-26 12:32 PM Re: GPO assigned scrip only runs for admins [Re: John_Ross]
BradV Offline
Seasoned Scripter
****

Registered: 2006-08-16
Posts: 686
Loc: Maryland, USA
This looks like the same script you posted in Login Script , correct? You didn't answer any of the questions. Did you get rid of the errors?
Top
#198462 - 2010-04-27 08:13 PM Re: GPO assigned scrip only runs for admins [Re: BradV]
John_Ross Offline
Just in Town

Registered: 2010-04-22
Posts: 4
Loc: Abu Dhabi, UAE
yes its actually the same script, i got it running but now the problem is, the gpo (windows server 2008) whe i attached the login script is only running on domain admin or administrator groups, but when i log in using the users under the group F&b, reception etch which i mentioneb above, its not running... whats with the administrators group that makes it run????

plese advice

Top
#198464 - 2010-04-28 09:05 AM Re: GPO assigned scrip only runs for admins [Re: John_Ross]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
Your Ingorup statements can be changed to (drop the =1 at the end):
 Code:
If InGroup("F&B")


You are mapping drives at every logon. If the drive is already there mapping it again will fail. Checking if it exists, if it does exists check if it links to the correct resource and take action or not on the outcome would be a nicer way to map drives. You can also just delete all network drives before mapping them. That also works but I prefer the "see and check link" option myself.

Starting the script with the /f parameter will clear the kixtart tokencahce so all groups a user belongs to should be recognized by kixtart.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 496 anonymous users online.
Newest Members
Raoul, Timothy, Jojo67, MaikSimon, kvn317
17875 Registered Users

Generated in 0.195 seconds in which 0.118 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org