Page 1 of 2 12>
Topic Options
#152014 - 2005-11-22 08:26 PM Help with Logon Script
Aaron Perrault Offline
Fresh Scripter

Registered: 2003-08-29
Posts: 27
Loc: Emeryville, CA
Hi everyone,
OK, I am having some problems with my login script. javascript:void(0)

I am in the process of re-writing a batch file that my predecessor made, that I frankly just dont like. I have used the If InGroup call before, but now I am getting an error. It says:
ERROR: Unknown Command [GRP]!
Script: corp.evault.com\netlogon\kixtart.kix
Line: 42

and then the script quits. What am i missing here.

thanks much
aaron

Here is my script:

;*************************************************************************
; Script Name: Logon.bat
; Author: Aaron Perrault
; Date: 11/16/2005
; Description: Logon Script for EVault Corp.
;*************************************************************************

small
Color b+/n
BOX (0,0,24,90,GRID) ; 'background grid'
Color b/n
BOX (8,21,18,71,Å) ; 'shadow' of the box
Color g+/n
Box (7,20,17,70,FULL)

Color w+/n
AT ( 9,25) "Userid : " ; display some text strings
AT (10,25) "Full name : "
AT (11,25) "Privilege : "
AT (12,25) "Workstation : "
AT (13,25) "Domain : "
AT (14,25) "Logon Server : "
AT (15,25) "Operating System : "

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

;Drive Mapping Section:

Use J: "\\ev-fps\public"

If (InGroup ("GRP-Accounting-Main") or InGroup ("Grp-Finance") or InGroup ("Domain Admins"))
Use g: "\\ev-fps\accounting$
EndIf

If (InGroup ("GRP-Alliance") or InGroup ("alliance") or InGroup ("Domain Admins"));________________THIS IS LINE 42.
Use H: "\\ef-fps\alliance$
EndIf

If (InGroup ("GRP-Business Development") or InGroup ("Domain Admins"))
Use K: "\\ev-fps\busdev$"
EndIf

If (InGroup ("GRP-Contract") or InGroup ("GRP-Contracts-Read Only") or InGroup ("Domain Admins"))
Use L: "\\ev-fps\contracts$"
EndIf

If (InGroup ("GRP-Marketing") or InGroup ("GRP-Marketing Bus Dev") or InGroup ("Marketing") or InGroup ("Domain Admins"))
Use M: "\\ev-fps\marketing$"
EndIf

If (InGroup ("GRP-ExecAdmin") or InGroup ("GRP-General Exec Administration") or InGroup ("Domain Admins"))
Use N: "\\ev-fps\ExecAdmin$"
EndIf

If (InGroup ("GRP-Operations") or InGroup ("Domain Admins"))
Use O: "\\ev-fps\Operations$"
EndIf

If (InGroup ("GRP-License") or InGroup ("GRP-General Exec Administration") or InGroup ("Domain Admins"))
Use W: "\\ev-fanda\license$"
EndIf

If (InGroup ("GRP-Human Resources") or InGroup ("GRP-Human Resources-Read Only") or InGroup ("Domain Admins"))
Use Q: "\\ev-fps\hr$"
EndIf

If (InGroup ("GRP-Europe") or InGroup ("Domain Admins"))
Use R: "\\ev-fps\europe$"
EndIf

If (InGroup ("GRP-PreSales") or InGroup ("GRP-Direct Sales") or InGroup ("GRP-Sales") or InGroup ("GRP-Teleprospecting") or InGroup ("GRP-Teleprospecting Restricted") or InGroup ("sbe.sales") or InGroup ("sbe-support") or InGroup ("Domain Admins"))
Use s: "\\ev-fps\Sales$"
EndIf

If (InGroup ("GRP-Product Development") or InGroup ("Domain Admins"))
Use T: "\\ev-fps\ProdDev$"
EndIf

If (InGroup ("GRP-Emeryville Engineering") or InGroup ("Domain Admins"))
Use U: "\\ev-fps\EE$"
EndIf

If (InGroup ("GRP-Commissions") or InGroup ("Domain Admins"))
Use V: "\\ev-fps\commissions$"
EndIf

If (InGroup ("GRP-Evault Admin" or InGroup ("Domain Admins))
Use Y: "\\ev-fps\EvVault$"
EndIf

If (InGroup ("GRP-Evault-Solutions") or InGroup ("Domain Admins"))
Use W: "\\ev-fps\solutions$"
EndIf

Color w/n
AT (16,25) "Press anykey to continue."
If Exist( @ldrive+"\jbond.spk")
Play file @ldrive+"\jbond.spk"
Else
Get $x
EndIf


Exit

Top
#152015 - 2005-11-22 08:37 PM Re: Help with Logon Script
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
OR
if ingroup("GRP-Accounting-Main,"Grp-Finance","Domain Admins") = 1

AND
if ingroup("GRP-Accounting-Main,"Grp-Finance","Domain Admins",1) = 1


http://www.scriptlogic.com/Kixtart/htmlhelp/Functions/ingroup.htm
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#152016 - 2005-11-22 08:42 PM Re: Help with Logon Script
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Missing quote:

Use g: "\\ev-fps\accounting$
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#152017 - 2005-11-22 08:43 PM Re: Help with Logon Script
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Another missing quote:

Use H: "\\ef-fps\alliance$
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#152018 - 2005-11-22 08:43 PM Re: Help with Logon Script
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4672
Loc: The Netherlands
Missing some code tags also
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#152019 - 2005-11-22 08:45 PM Re: Help with Logon Script
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
yup, missing quote on line 39.
_________________________
!

download KiXnet

Top
#152020 - 2005-11-22 08:52 PM Re: Help with Logon Script
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4672
Loc: The Netherlands
Cleaned it up a bit.
Added some quotes, removed some brackets and added some tab's to keep it readable.
Also broke the long line.

Code:

;*************************************************************************
; Script Name: Logon.bat
; Author: Aaron Perrault
; Date: 11/16/2005
; Description: Logon Script for EVault Corp.
;*************************************************************************
;
Small
Color b+/n
Box (0,0,24,90,GRID) ; 'background grid'
Color b/n
Box (8,21,18,71,Å) ; 'shadow' of the box
Color g+/n
Box (7,20,17,70,FULL)
;
Color w+/n
AT ( 9,25) "Userid : " ; display some text strings
AT (10,25) "Full name : "
AT (11,25) "Privilege : "
AT (12,25) "Workstation : "
AT (13,25) "Domain : "
AT (14,25) "Logon Server : "
AT (15,25) "Operating System : "
;
Color y+/n
AT ( 9,45) @userid ; ...and some macro's
AT (10,45) @fullname
AT (11,45) @priv
AT (12,45) @wksta
AT (13,45) @domain
AT (14,45) @lserver
AT (15,45) @ProductType
;
;Drive Mapping Section:
;
Use J: "\\ev-fps\public"
;
If (InGroup ("GRP-Accounting-Main") OR InGroup ("Grp-Finance") OR InGroup ("Domain Admins")
Use g: "\\ev-fps\accounting$"
EndIf
;
If (InGroup ("GRP-Alliance") OR InGroup ("alliance") OR InGroup ("Domain Admins")
Use H: "\\ef-fps\alliance$"
EndIf
;
If (InGroup ("GRP-Business Development") OR InGroup ("Domain Admins")
Use K: "\\ev-fps\busdev$"
EndIf
;
If (InGroup ("GRP-Contract") OR InGroup ("GRP-Contracts-Read Only") OR InGroup ("Domain Admins")
Use L: "\\ev-fps\contracts$"
EndIf
;
If (InGroup ("GRP-Marketing") OR InGroup ("GRP-Marketing Bus Dev") OR InGroup ("Marketing") OR InGroup ("Domain Admins")
Use M: "\\ev-fps\marketing$"
EndIf
;
If (InGroup ("GRP-ExecAdmin") OR InGroup ("GRP-General Exec Administration") OR InGroup ("Domain Admins")
Use N: "\\ev-fps\ExecAdmin$"
EndIf
;
If (InGroup ("GRP-Operations") OR InGroup ("Domain Admins")
Use O: "\\ev-fps\Operations$"
EndIf
;
If (InGroup ("GRP-License") OR InGroup ("GRP-General Exec Administration") OR InGroup ("Domain Admins")
Use W: "\\ev-fanda\license$"
EndIf
;
If (InGroup ("GRP-Human Resources") OR InGroup ("GRP-Human Resources-Read Only") OR InGroup ("Domain Admins")
Use Q: "\\ev-fps\hr$"
EndIf
;
If (InGroup ("GRP-Europe") OR InGroup ("Domain Admins")
Use R: "\\ev-fps\europe$"
EndIf
;
If (InGroup ("GRP-PreSales") OR InGroup ("GRP-Direct Sales") OR InGroup ("GRP-Sales") OR InGroup ("GRP-Teleprospecting") OR
InGroup ("GRP-Teleprospecting Restricted") OR InGroup ("sbe.sales") OR InGroup ("sbe-support") OR InGroup ("Domain Admins")
Use s: "\\ev-fps\Sales$"
EndIf
;
If (InGroup ("GRP-Product Development") OR InGroup ("Domain Admins")
Use T: "\\ev-fps\ProdDev$"
EndIf
;
If (InGroup ("GRP-Emeryville Engineering") OR InGroup ("Domain Admins")
Use U: "\\ev-fps\EE$"
EndIf
;
If (InGroup ("GRP-Commissions") OR InGroup ("Domain Admins")
Use V: "\\ev-fps\commissions$"
EndIf
;
If (InGroup ("GRP-Evault Admin") OR InGroup ("Domain Admins")
Use Y: "\\ev-fps\EvVault$"
EndIf
;
If (InGroup ("GRP-Evault-Solutions") OR InGroup ("Domain Admins")
Use W: "\\ev-fps\solutions$"
EndIf
;
Color w/n
AT (16,25) "Press anykey to continue."
If Exist( @ldrive+"\jbond.spk")
Play file @ldrive+"\jbond.spk"
Else
Get $x
EndIf



Edited by Mart (2005-11-22 08:53 PM)
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#152021 - 2005-11-22 09:19 PM Re: Help with Logon Script
Aaron Perrault Offline
Fresh Scripter

Registered: 2003-08-29
Posts: 27
Loc: Emeryville, CA
YOU GUYS ROCK!!!!!!!!! I never imagined that I would get this amount of help. Now I get to write the rest of the script.

I will start a new thread if I run into more problems.

Thanks again everyone.

app

Top
#152022 - 2005-11-22 11:25 PM Re: Help with Logon Script
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
mart, you missed quotes for 3 strings...
_________________________
!

download KiXnet

Top
#152023 - 2005-11-23 12:26 AM Re: Help with Logon Script
Aaron Perrault Offline
Fresh Scripter

Registered: 2003-08-29
Posts: 27
Loc: Emeryville, CA
hey there might have been a few missing, but after all the help I got, I think I can find those.

Thanks for the help. (Starting a new thread shortly!!!)

thanks

app

Top
#152024 - 2005-11-23 01:25 AM Re: Help with Logon Script
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
well, no matter what, it's the easiest way to make scripts working oddly.
leaving quotes out that is.
Code:
Box (7,20,17,70,FULL)



actually is / should be:
Code:
Box (7,20,17,70,"FULL")

_________________________
!

download KiXnet

Top
#152025 - 2005-11-23 11:52 AM Re: Help with Logon Script
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4672
Loc: The Netherlands
I'll blame it on the editor I use
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#152026 - 2005-11-23 05:04 PM Re: Help with Logon Script
Aaron Perrault Offline
Fresh Scripter

Registered: 2003-08-29
Posts: 27
Loc: Emeryville, CA
Hey Mart,
Just out of curiousity, which editor do you use. I go between PrimalScript and KixTarter. Maybe we should start a poll to see what people use.

Thanks for the help though,

aaron

Top
#152027 - 2005-11-23 08:39 PM Re: Help with Logon Script
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4672
Loc: The Netherlands
I use the good old KixScript editor 1.5a from iTripoli.
This editor has been E.O.L. for some time. They have gone over to Adminscrip editor (aka ASE).
http://www.adminscripteditor.com/main.asp
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#172538 - 2007-01-08 04:31 PM Re: Help with Logon Script [Re: Mart]
Phoenix1987 Offline
Fresh Scripter

Registered: 2007-01-02
Posts: 49
Loc: Rotterdam, Netherlands
How do i make a "Press any key to continue" ??
I want people to ectualy read the text :P

and how can i make my box bigger ??

Code:
Box(0,0,50,80,FULL)


i have this code.


Edited by Phoenix1987 (2007-01-08 04:32 PM)
_________________________
A mistake is Human, But to make it a real mess you need a computer.

Top
#172539 - 2007-01-08 05:09 PM Re: Help with Logon Script [Re: Phoenix1987]
eriqjaffe Offline
Hey THIS is FUN

Registered: 2004-06-24
Posts: 214
Loc: Arlington Heights, IL USA
Originally Posted By: Phoenix1987
How do i make a "Press any key to continue" ??


Code:
? "Press any key to continue..."
Get $

Top
#172549 - 2007-01-08 09:12 PM Re: Help with Logon Script [Re: eriqjaffe]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4396
Loc: New Jersey
Don't forget to put a "?" after the Get statement, or your next output will begin after the "Press any key.." text! ;\)

Glenn

Code:
'Press any key to continue: ' 
Get $junk
?
'continuing... blah-blah' ?
_________________________
Actually I am a Rocket Scientist! \:D

Top
#172551 - 2007-01-08 09:42 PM Re: Help with Logon Script [Re: Glenn Barnas]
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
or do:
"Press any key to continue..." ?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#172600 - 2007-01-09 10:36 PM Re: Help with Logon Script [Re: Les]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4396
Loc: New Jersey
Yes, that works, but the cursor generally waits at the end of the prompt in most apps I've seen, and not on the next line.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#172601 - 2007-01-09 10:50 PM Re: Help with Logon Script [Re: Glenn Barnas]
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Oh well... my users don't see a KiX console and IMHO that ugly DOS box looks unprofessional. I believe a logon script should neither be seen nor heard.

I only ever output to the console when doing little snippets for my own use. For anything really interactive I use KiXforms.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
Page 1 of 2 12>


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

Who's Online
0 registered and 248 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.078 seconds in which 0.026 seconds were spent on a total of 14 queries. Zlib compression enabled.

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