Page 1 of 2 12>
Topic Options
#39706 - 2003-04-29 04:33 PM Problems with multiple groups, pop-up screen
BB Miami Offline
Fresh Scripter

Registered: 2003-04-29
Posts: 12
Loc: Miami, Florida, USA
I am experiencing the following problems with the two scripts (*) below, but first a description of the environment: Win2K Server, Win2K Pro clients, TCP/IP only, users in at least two global groups each.

The problems: Minor: Pop-up greeting screen does not open in Win2K, it shows as a minimized bar on the "taskbar".

Major: Mapping only occurs to first group an user is a member of. Example: User is member of Mgt and Mgr groups, and script call for mapping of two different drives for each group, in this order: Mgt first, Mgr later. It only maps the drive for the Mgt, and ignores the Mgr membership.

I ran the "Kixstrip" application and it did not find any errors. Please advise. Thanks in advance for all your help.

(*) The first one is the one working now. Still has problems but I can somewhat manage to live with it for now. The second was an updated to accomodate another groups, but it failed so I am still using the first one.

Script1:
;****************************************************************************
;**** Script: Banco do Brasil Miami Agency
;**** Created: March 20, 2001
;**** Last Change: April 25, 2003
;**** Author: Hilton Palma Lima
;**** Purpose: Log in Network clients
;****************************************************************************

;****************************************************************************
;**** Common defines
;****
DIM $FileServer
DIM $TimeServer

$FileServer = "bbmiamisrv2"
$TimeServer = "bbmiamisrv1"

;****************************************************************************
;**** Script Start
;****
color b/+y ;blue + bright yellow, the Bank's colors
cls
break off

;****************************************************************************
;**** Synchronizes the system clock of the local computer
;****
settime "\\$timeServer"

;****************************************************************************
;**** Greet User
;****
?
? "You are connecting to a monitored proprietary system of"
? "Banco do Brasil Miami Agency. Access by unauthorized"
? "individuals is prohibited. Only users authorized by"
? "Banco do Brasil Miami Agency may access this system."
? "Usage is restricted to business use."
?
?
? "Login Server: " + @lserver
?
? "Hello, "
?
? " " + @fullname
?
?
? "Press any key to continue..."

sleep 10

;****************************************************************************
;**** Anti-Virus Share Folder (H:)
;****

if exist("h:")
use h: /del

if @error
? Error disconnecting H: drive
sleep 30
endif
endif

use h: "\\$FileServer\AV"

if @error
? Error connecting H: drive
sleep 30
endif

;****************************************************************************
;**** Applications Share Folder (M:)
;****

if exist("m:")
use m: /del

if @error
? Error disconnecting M: drive
sleep 30
endif
endif

use m: "\\$FileServer\Apps"

if @error
? Error connecting M: drive
sleep 30
endif

;****************************************************************************
;**** User Home Share Folder (N:)
;****

if exist("n:")
use n: /del

if @error
? Error disconnecting N: drive
sleep 30
endif
endif

;use n: "\\$FileServer\@homedir$$"
; userid works for both Win95 and win98.

use n: "\\$FileServer\@userid$$"

if @error
? Error connecting N: drive
sleep 30
endif

;****************************************************************************
;**** Department Share Folder (O:)
;****

if exist("o:")
use o: /del

if @error
? Error disconnecting O: drive
sleep 30
endif
endif

Select
Case InGroup ("Act") = 1
Use o: "\\$FileServer\act$"

if @error
? Error connecting O: drive
sleep 30
endif

Case InGroup ("Adm") = 1
Use o: "\\$FileServer\adm$"

if @error
? Error connecting O: drive
sleep 30
endif

Case InGroup ("Aud") = 1
Use o: "\\$FileServer\aud$"

if @error
? Error connecting O: drive
sleep 30
endif

Case InGroup ("Col") = 1
Use o: "\\$FileServer\col$"

if @error
? Error connecting O: drive
sleep 30
endif

Case InGroup ("CSr") = 1
Use o: "\\$FileServer\csr$"

if @error
? Error connecting O: drive
sleep 30
endif
Case InGroup ("INv") = 1
Use o: "\\$FileServer\inv$"

if @error
? Error connecting O: drive
sleep 30
endif

Case InGroup ("IPB") = 1
Use o: "\\$FileServer\ipb$"

if @error
? Error connecting O: drive
sleep 30
endif

Case InGroup ("Prm") = 1
Use o: "\\$FileServer\prm$"

if @error
? Error connecting O: drive
sleep 30
endif

Case InGroup ("LCr") = 1
Use o: "\\$FileServer\lcr$"

if @error
? Error connecting O: drive
sleep 30
endif

Case InGroup ("Lns") = 1
Use o: "\\$FileServer\lns$"

if @error
? Error connecting O: drive
sleep 30
endif

Case InGroup ("Mgt") = 1
Use o: "\\$FileServer\mgt$"

if @error
? Error connecting O: drive
sleep 30
endif

Case InGroup ("MIS") = 1
Use o: "\\$FileServer\mis$"

if @error
? Error connecting O: drive
sleep 30
endif

Case InGroup ("Opr") = 1
Use o: "\\$FileServer\opr$"

if @error
? Error connecting O: drive
sleep 30
endif

Case InGroup ("SER") = 1
Use o: "\\$FileServer\ser$"

if @error
? Error connecting O: drive
sleep 30
endif

Case InGroup ("WTr") = 1
Use o: "\\$FileServer\wtr$"

if @error
? Error connecting O: drive
sleep 30
endif

Case InGroup ("COM") = 1
Use o: "\\$FileServer\com$"

if @error
? Error connecting O: drive
sleep 30
endif
EndSelect

;****************************************************************************
;**** Corporate Data Share Folder (P:)
;****

if exist("p:")
use p: /del

if @error
? Error disconnecting P: drive
sleep 30
endif
endif

use p: "\\$FileServer\CorpData"

if @error
? Error connecting P: drive
sleep 30
endif

;****************************************************************************
;**** Departments Data Share Folder (R:)
;****

if InGroup ("Mgr") = 1

if exist("r:")
use r: /del

if @error
? Error disconnecting R: drive
sleep 30
endif
endif

use r: "\\$FileServer\Work"

if @error
? Error connecting R: drive
sleep 30
endif
endif

;****************************************************************************
;**** Script End
;****

color w/n ;reset colors
exit

Script2: (Which I tried to use, but failed so miserably that I decided to use Script1 again)

;****************************************************************************
;**** Script: Banco do Brasil Miami Agency
;**** Created: March 20, 2001
;**** Last Change: April 25, 2003
;**** Author: Hilton Palma Lima
;**** Purpose: Log in Network clients
;****************************************************************************

;****************************************************************************
;**** Common defines
;****
DIM $FileServer
DIM $TimeServer

$FileServer = "bbmiamisrv2"
$TimeServer = "bbmiamisrv1"

;****************************************************************************
;**** Script Start
;****
color b/+y ;blue + bright yellow, the Bank's colors
cls
break off

;****************************************************************************
;**** Synchronizes the system clock of the local computer
;****
settime "\\$timeServer"

;****************************************************************************
;**** Greet User
;****
?
? "You are connecting to a monitored proprietary system of"
? "Banco do Brasil Miami Agency. Access by unauthorized"
? "individuals is prohibited. Only users authorized by"
? "Banco do Brasil Miami Agency may access this system."
? "Usage is restricted to business use."
?
?
? "Login Server: " + @lserver
?
? "Hello, "
?
? " " + @fullname
?
?
? "Press any key to continue..."

sleep 10

;****************************************************************************
;**** Anti-Virus Share Folder (H:)
;****

if exist("h:")
use h: /del

if @error
? Error disconnecting H: drive
sleep 30
endif
endif

use h: "\\$FileServer\AV"

if @error
? Error connecting H: drive
sleep 30
endif

;****************************************************************************
;**** Applications Share Folder (M:)
;****

if exist("m:")
use m: /del

if @error
? Error disconnecting M: drive
sleep 30
endif
endif

use m: "\\$FileServer\Apps"

if @error
? Error connecting M: drive
sleep 30
endif

;****************************************************************************
;**** User Home Share Folder (N:)
;****

if exist("n:")
use n: /del

if @error
? Error disconnecting N: drive
sleep 30
endif
endif

;use n: "\\$FileServer\@homedir$$"
; userid works for both Win95 and win98.

use n: "\\$FileServer\@userid$$"

if @error
? Error connecting N: drive
sleep 30
endif

;****************************************************************************
;**** Corporate Data Share Folder (P:)
;****

if exist("p:")
use p: /del

if @error
? Error disconnecting P: drive
sleep 30
endif
endif

use p: "\\$FileServer\CorpData"

if @error
? Error connecting P: drive
sleep 30
endif

;****************************************************************************
;**** Department Share Folder (O:)
;****

if exist("o:")
use o: /del

if @error
? Error disconnecting O: drive
sleep 30
endif
endif

Select
Case InGroup ("Act") = 1
Use o: "\\$FileServer\act$"

if @error
? Error connecting O: drive
sleep 30
endif

Case InGroup ("Adm") = 1
Use o: "\\$FileServer\adm$"

if @error
? Error connecting O: drive
sleep 30
endif

Case InGroup ("Aud") = 1
Use o: "\\$FileServer\aud$"

if @error
? Error connecting O: drive
sleep 30
endif

Case InGroup ("Col") = 1
Use o: "\\$FileServer\col$"

if @error
? Error connecting O: drive
sleep 30
endif

;****************************************************************************
;**** Test if in CSr and Blotter groups
;****
Case InGroup ("CSr", "Blotter", 1) = 1
Use o: "\\$FileServer\csr$"

if @error
? Error connecting O: drive
sleep 30
endif

;****************************************************************************
;**** BB Fund Share Folder (I:)
;****
if exist("i:")
use i: /del

if @error
? Error disconnecting I: drive
sleep 30
endif
endif

use i: "\\$FileServer\BB Fund$"

if @error
? Error connecting I: drive
sleep 30
endif

;****************************************************************************
;**** Securities Share Folder (J:)
;****
if exist("j:")
use j: /del

if @error
? Error disconnecting J: drive
sleep 30
endif
endif

use j: "\\$FileServer\Securities$"

if @error
? Error connecting J: drive
sleep 30
endif

Case InGroup ("CSr") = 1
Use o: "\\$FileServer\csr$"

if @error
? Error connecting O: drive
sleep 30
endif

Case InGroup ("INv") = 1
Use o: "\\$FileServer\inv$"

if @error
? Error connecting O: drive
sleep 30
endif

Case InGroup ("IPB") = 1
Use o: "\\$FileServer\ipb$"

if @error
? Error connecting O: drive
sleep 30
endif

;****************************************************************************
;**** Test if in Prm and Blotter groups
;****
Case InGroup ("Prm", "Blotter", 1) = 1
Use o: "\\$FileServer\prm$"

if @error
? Error connecting O: drive
sleep 30
endif

;****************************************************************************
;**** BB Fund Share Folder (I:)
;****
if exist("i:")
use i: /del

if @error
? Error disconnecting I: drive
sleep 30
endif
endif

use i: "\\$FileServer\BB Fund$"

if @error
? Error connecting I: drive
sleep 30
endif

;****************************************************************************
;**** Securities Share Folder (J:)
;****
if exist("j:")
use j: /del

if @error
? Error disconnecting J: drive
sleep 30
endif
endif

use j: "\\$FileServer\Securities$"

if @error
? Error connecting J: drive
sleep 30
endif

Case InGroup ("Prm") = 1
Use o: "\\$FileServer\prm$"

if @error
? Error connecting O: drive
sleep 30
endif

Case InGroup ("LCr") = 1
Use o: "\\$FileServer\lcr$"

if @error
? Error connecting O: drive
sleep 30
endif

Case InGroup ("Lns") = 1
Use o: "\\$FileServer\lns$"

if @error
? Error connecting O: drive
sleep 30
endif

;****************************************************************************
;**** Test if in Mgt and Mgr groups
;****
Case InGroup ("Mgt", "Mgr", 1) = 1
Use o: "\\$FileServer\mgt$"

if @error
? Error connecting O: drive
sleep 30
endif

;****************************************************************************
;**** Departments Data Share Folder (R:)
;****
if exist("r:")
use r: /del

if @error
? Error disconnecting R: drive
sleep 30
endif
endif

use r: "\\$FileServer\Work"

if @error
? Error connecting R: drive
sleep 30
endif

Case InGroup ("Mgt") = 1
Use o: "\\$FileServer\mgt$"

if @error
? Error connecting O: drive
sleep 30
endif

Case InGroup ("MIS") = 1
Use o: "\\$FileServer\mis$"

if @error
? Error connecting O: drive
sleep 30
endif

Case InGroup ("Opr") = 1
Use o: "\\$FileServer\opr$"

if @error
? Error connecting O: drive
sleep 30
endif

Case InGroup ("SER") = 1
Use o: "\\$FileServer\ser$"

if @error
? Error connecting O: drive
sleep 30
endif

Case InGroup ("WTr") = 1
Use o: "\\$FileServer\wtr$"

if @error
? Error connecting O: drive
sleep 30
endif

Case InGroup ("COM") = 1
Use o: "\\$FileServer\com$"

if @error
? Error connecting O: drive
sleep 30
endif
EndSelect


;****************************************************************************
;**** QuickView Program and Files Share Folder (Q:)
;****

;if exist("q:")
; use q: /del
;
; if @error
; ? Error disconnecting Q: drive
; sleep 30
; endif
;endif

;use q: "\\$FileServer\QView5"
;use q: "\\$FileServer\QView"

;if @error
; ? Error connecting Q: drive
; sleep 30
;endif

;****************************************************************************
;**** Departments Data Share Folder (R:)
;****

;if InGroup ("Mgr") = 1
;
; if exist("r:")
; use r: /del
;
; if @error
; ? Error disconnecting R: drive
; sleep 30
; endif
; endif
;
; use r: "\\$FileServer\Work"
;
; if @error
; ? Error connecting R: drive
; sleep 30
; endif
;endif

;****************************************************************************
;**** BB Funds Share Folder (I:)
;****

;if InGroup ("Blotter") = 1
;
; if exist("i:")
; use i: /del
;
; if @error
; ? Error disconnecting I: drive
; sleep 30
; endif
; endif
;
; use i: "\\$FileServer\BB Fund$"
;
; if @error
; ? Error connecting I: drive
; sleep 30
; endif
;endif

;****************************************************************************
;**** BB Funds Share Folder (J:)
;****

;if InGroup ("Blotter") = 1
;
; if exist("j:")
; use j: /del
;
; if @error
; ? Error disconnecting J: drive
; sleep 30
; endif
; endif
;
; use j: "\\$FileServer\Securities$"
;
; if @error
; ? Error connecting J: drive
; sleep 30
; endif
;endif

;****************************************************************************
;**** Script End
;****

color w/n ;reset colors
exit

Top
#39707 - 2003-04-29 04:38 PM Re: Problems with multiple groups, pop-up screen
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Your script at first glance seems to be processing your groups as you have instructed it to do. You used a SELECT...CASE...ENDSELECT construct. Only one case command will ever execute (see the manual). Use the SELECT..CASE structure when you have mutually exclusive events you wish to process.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#39708 - 2003-04-29 04:43 PM Re: Problems with multiple groups, pop-up screen
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
quote:
Minor: Pop-up greeting screen does not open in Win2K, it shows as a minimized bar on the "taskbar".
Search the FAQ for "RunLogonScriptSync".
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#39709 - 2003-04-29 05:41 PM Re: Problems with multiple groups, pop-up screen
BB Miami Offline
Fresh Scripter

Registered: 2003-04-29
Posts: 12
Loc: Miami, Florida, USA
Howard:

Thanks for the help. I did not notice how while pasting the script, it lost all the format.

But back to the problem, I know that CASE would only take one at a time, but I put the next mapping based on group membership (R:, in the first script) after the ENDCASE, to no avail. It simply ignored the IF Ingroup clause. What I was trying to accomplish is that users who are members of Mgt will have a drive O:, but members of Mgr (a sub-grouping of the first one) will have an extra drive, R:. It just does not work, as it ignores that a user could be a member of both Mgt and Mgr groups.

The same applies to the second script, where I had to create a group called "Blotter", that would be populated with individuals that are already members of other groups (departments) such as Private Banking, etc. It ignored completely the selection by group after the ENDCASE command. I tried to move the selection up in the script, prior to the call to SELECT, but then I lost the mapping that used to happen inside de SELECT CASE and ENDCASE. It behaves as it could only understand one group per script. I even tried to use the InGroup command to select two groups at a time (using 1 as last parameter) results were even worse.

If you want I can try to post again, this time minding the format (tabulation) of the entries.

Top
#39710 - 2003-04-29 05:42 PM Re: Problems with multiple groups, pop-up screen
BB Miami Offline
Fresh Scripter

Registered: 2003-04-29
Posts: 12
Loc: Miami, Florida, USA
Lligetfa:

I will check out the FAQ you mention and get back to you. Thanks for the help.

Top
#39711 - 2003-04-29 05:43 PM Re: Problems with multiple groups, pop-up screen
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Pleas read HOWTO: Submit code to / copy code from the board in the FAQ Forum.
_________________________
There are two types of vessels, submarines and targets.

Top
#39712 - 2003-04-29 05:44 PM Re: Problems with multiple groups, pop-up screen
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
use the CODE button below the edit window to insert CODE tags, then paste between the tags.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#39713 - 2003-04-29 07:16 PM Re: Problems with multiple groups, pop-up screen
BB Miami Offline
Fresh Scripter

Registered: 2003-04-29
Posts: 12
Loc: Miami, Florida, USA
LLigetfa:

It took me a while to find it, but I finally found the RunLogonScriptSync FAQ, actually an exchange of messages between users, including yourself. I have a certain aversion to modify Win2K call unless absolutely necessary (old story) but the search might prove helpful, as I will try the MODE command in the batch file first. If it works, that will do just fine (for what it is, just a disclaimer requested by our auditors).

Now I will try to resend the scripts using your instructions, as the major problem is still an issue. Thank you for your help.

Top
#39714 - 2003-04-29 07:25 PM Re: Problems with multiple groups, pop-up screen
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
I don't know why it would take you long to find it. [Confused]

1. Click on the Search The Friendly Board link

2. Type RunLogonScriptSync in the Search Words: field

3. Select >>KiXtart FAQ & How to's for the Search Forum

4. Hit the Search button

In a matter of seconds, several hits will show. Bob's your uncle.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#39715 - 2003-04-29 07:29 PM Re: Problems with multiple groups, pop-up screen
BB Miami Offline
Fresh Scripter

Registered: 2003-04-29
Posts: 12
Loc: Miami, Florida, USA
Here are the scripts again, this time using the proper method to maintain the format intact.

Script 1:
code:
 ;****************************************************************************
;**** Script: Banco do Brasil Miami Agency
;**** Created: March 20, 2001
;**** Last Change: April 25, 2003
;**** Author: Hilton Palma Lima
;**** Purpose: Log in Network clients
;****************************************************************************

;****************************************************************************
;**** Common defines
;****
DIM $FileServer
DIM $TimeServer

$FileServer = "bbmiamisrv2"
$TimeServer = "bbmiamisrv1"

;****************************************************************************
;**** Script Start
;****
color b/+y ;blue + bright yellow, the Bank's colors
cls
break off

;****************************************************************************
;**** Synchronizes the system clock of the local computer
;****
settime "\\$timeServer"


;****************************************************************************
;**** Greet User
;****
?
? "You are connecting to a monitored proprietary system of"
? "Banco do Brasil Miami Agency. Access by unauthorized"
? "individuals is prohibited. Only users authorized by"
? "Banco do Brasil Miami Agency may access this system."
? "Usage is restricted to business use."
?
?
? "Login Server: " + @lserver
?
? "Hello, "
?
? " " + @fullname
?
?
? "Press any key to continue..."



sleep 10

;****************************************************************************
;**** Anti-Virus Share Folder (H:)
;****

if exist("h:")
use h: /del

if @error
? Error disconnecting H: drive
sleep 30
endif
endif

use h: "\\$FileServer\AV"

if @error
? Error connecting H: drive
sleep 30
endif

;****************************************************************************
;**** Applications Share Folder (M:)
;****

if exist("m:")
use m: /del

if @error
? Error disconnecting M: drive
sleep 30
endif
endif

use m: "\\$FileServer\Apps"

if @error
? Error connecting M: drive
sleep 30
endif

;****************************************************************************
;**** User Home Share Folder (N:)
;****

if exist("n:")
use n: /del

if @error
? Error disconnecting N: drive
sleep 30
endif
endif

;use n: "\\$FileServer\@homedir$$"
; userid works for both Win95 and win98.

use n: "\\$FileServer\@userid$$"

if @error
? Error connecting N: drive
sleep 30
endif

;****************************************************************************
;**** Department Share Folder (O:)
;****

if exist("o:")
use o: /del

if @error
? Error disconnecting O: drive
sleep 30
endif
endif

Select
Case InGroup ("Act") = 1
Use o: "\\$FileServer\act$"


if @error
? Error connecting O: drive
sleep 30
endif

Case InGroup ("Adm") = 1
Use o: "\\$FileServer\adm$"


if @error
? Error connecting O: drive
sleep 30
endif

Case InGroup ("Aud") = 1
Use o: "\\$FileServer\aud$"


if @error
? Error connecting O: drive
sleep 30
endif

Case InGroup ("Col") = 1
Use o: "\\$FileServer\col$"


if @error
? Error connecting O: drive
sleep 30
endif

Case InGroup ("CSr") = 1
Use o: "\\$FileServer\csr$"


if @error
? Error connecting O: drive
sleep 30
endif
Case InGroup ("INv") = 1
Use o: "\\$FileServer\inv$"


if @error
? Error connecting O: drive
sleep 30
endif


Case InGroup ("IPB") = 1
Use o: "\\$FileServer\ipb$"


if @error
? Error connecting O: drive
sleep 30
endif

Case InGroup ("Prm") = 1
Use o: "\\$FileServer\prm$"


if @error
? Error connecting O: drive
sleep 30
endif

Case InGroup ("LCr") = 1
Use o: "\\$FileServer\lcr$"


if @error
? Error connecting O: drive
sleep 30
endif

Case InGroup ("Lns") = 1
Use o: "\\$FileServer\lns$"


if @error
? Error connecting O: drive
sleep 30
endif

Case InGroup ("Mgt") = 1
Use o: "\\$FileServer\mgt$"


if @error
? Error connecting O: drive
sleep 30
endif

Case InGroup ("MIS") = 1
Use o: "\\$FileServer\mis$"


if @error
? Error connecting O: drive
sleep 30
endif

Case InGroup ("Opr") = 1
Use o: "\\$FileServer\opr$"


if @error
? Error connecting O: drive
sleep 30
endif

Case InGroup ("SER") = 1
Use o: "\\$FileServer\ser$"


if @error
? Error connecting O: drive
sleep 30
endif

Case InGroup ("WTr") = 1
Use o: "\\$FileServer\wtr$"


if @error
? Error connecting O: drive
sleep 30
endif

Case InGroup ("COM") = 1
Use o: "\\$FileServer\com$"


if @error
? Error connecting O: drive
sleep 30
endif
EndSelect

;****************************************************************************
;**** Corporate Data Share Folder (P:)
;****

if exist("p:")
use p: /del

if @error
? Error disconnecting P: drive
sleep 30
endif
endif

use p: "\\$FileServer\CorpData"

if @error
? Error connecting P: drive
sleep 30
endif

;****************************************************************************
;**** Departments Data Share Folder (R:)
;****

if InGroup ("Mgr") = 1

if exist("r:")
use r: /del

if @error
? Error disconnecting R: drive
sleep 30
endif
endif

use r: "\\$FileServer\Work"

if @error
? Error connecting R: drive
sleep 30
endif
endif

;****************************************************************************
;**** Script End
;****

color w/n ;reset colors
exit

Here is script # 2:

code:
 ;****************************************************************************
;**** Script: Banco do Brasil Miami Agency
;**** Created: March 20, 2001
;**** Last Change: April 25, 2003
;**** Author: Hilton Palma Lima
;**** Purpose: Log in Network clients
;****************************************************************************

;****************************************************************************
;**** Common defines
;****
DIM $FileServer
DIM $TimeServer

$FileServer = "bbmiamisrv2"
$TimeServer = "bbmiamisrv1"

;****************************************************************************
;**** Script Start
;****
color b/+y ;blue + bright yellow, the Bank's colors
cls
break off

;****************************************************************************
;**** Synchronizes the system clock of the local computer
;****
settime "\\$timeServer"


;****************************************************************************
;**** Greet User
;****
?
? "You are connecting to a monitored proprietary system of"
? "Banco do Brasil Miami Agency. Access by unauthorized"
? "individuals is prohibited. Only users authorized by"
? "Banco do Brasil Miami Agency may access this system."
? "Usage is restricted to business use."
?
?
? "Login Server: " + @lserver
?
? "Hello, "
?
? " " + @fullname
?
?
? "Press any key to continue..."



sleep 10

;****************************************************************************
;**** Anti-Virus Share Folder (H:)
;****

if exist("h:")
use h: /del

if @error
? Error disconnecting H: drive
sleep 30
endif
endif

use h: "\\$FileServer\AV"

if @error
? Error connecting H: drive
sleep 30
endif

;****************************************************************************
;**** Applications Share Folder (M:)
;****

if exist("m:")
use m: /del

if @error
? Error disconnecting M: drive
sleep 30
endif
endif

use m: "\\$FileServer\Apps"

if @error
? Error connecting M: drive
sleep 30
endif

;****************************************************************************
;**** User Home Share Folder (N:)
;****

if exist("n:")
use n: /del

if @error
? Error disconnecting N: drive
sleep 30
endif
endif

;use n: "\\$FileServer\@homedir$$"
; userid works for both Win95 and win98.

use n: "\\$FileServer\@userid$$"

if @error
? Error connecting N: drive
sleep 30
endif

;****************************************************************************
;**** Corporate Data Share Folder (P:)
;****

if exist("p:")
use p: /del

if @error
? Error disconnecting P: drive
sleep 30
endif
endif

use p: "\\$FileServer\CorpData"

if @error
? Error connecting P: drive
sleep 30
endif

;****************************************************************************
;**** Department Share Folder (O:)
;****

if exist("o:")
use o: /del

if @error
? Error disconnecting O: drive
sleep 30
endif
endif

Select
Case InGroup ("Act") = 1
Use o: "\\$FileServer\act$"


if @error
? Error connecting O: drive
sleep 30
endif

Case InGroup ("Adm") = 1
Use o: "\\$FileServer\adm$"


if @error
? Error connecting O: drive
sleep 30
endif

Case InGroup ("Aud") = 1
Use o: "\\$FileServer\aud$"


if @error
? Error connecting O: drive
sleep 30
endif

Case InGroup ("Col") = 1
Use o: "\\$FileServer\col$"


if @error
? Error connecting O: drive
sleep 30
endif

;****************************************************************************
;**** Test if in CSr and Blotter groups
;****
Case InGroup ("CSr", "Blotter", 1) = 1
Use o: "\\$FileServer\csr$"


if @error
? Error connecting O: drive
sleep 30
endif

;****************************************************************************
;**** BB Fund Share Folder (I:)
;****
if exist("i:")
use i: /del

if @error
? Error disconnecting I: drive
sleep 30
endif
endif

use i: "\\$FileServer\BB Fund$"

if @error
? Error connecting I: drive
sleep 30
endif

;****************************************************************************
;**** Securities Share Folder (J:)
;****
if exist("j:")
use j: /del

if @error
? Error disconnecting J: drive
sleep 30
endif
endif

use j: "\\$FileServer\Securities$"

if @error
? Error connecting J: drive
sleep 30
endif


Case InGroup ("CSr") = 1
Use o: "\\$FileServer\csr$"


if @error
? Error connecting O: drive
sleep 30
endif

Case InGroup ("INv") = 1
Use o: "\\$FileServer\inv$"


if @error
? Error connecting O: drive
sleep 30
endif


Case InGroup ("IPB") = 1
Use o: "\\$FileServer\ipb$"


if @error
? Error connecting O: drive
sleep 30
endif

;****************************************************************************
;**** Test if in Prm and Blotter groups
;****
Case InGroup ("Prm", "Blotter", 1) = 1
Use o: "\\$FileServer\prm$"


if @error
? Error connecting O: drive
sleep 30
endif

;****************************************************************************
;**** BB Fund Share Folder (I:)
;****
if exist("i:")
use i: /del

if @error
? Error disconnecting I: drive
sleep 30
endif
endif

use i: "\\$FileServer\BB Fund$"

if @error
? Error connecting I: drive
sleep 30
endif

;****************************************************************************
;**** Securities Share Folder (J:)
;****
if exist("j:")
use j: /del

if @error
? Error disconnecting J: drive
sleep 30
endif
endif

use j: "\\$FileServer\Securities$"

if @error
? Error connecting J: drive
sleep 30
endif


Case InGroup ("Prm") = 1
Use o: "\\$FileServer\prm$"


if @error
? Error connecting O: drive
sleep 30
endif

Case InGroup ("LCr") = 1
Use o: "\\$FileServer\lcr$"


if @error
? Error connecting O: drive
sleep 30
endif

Case InGroup ("Lns") = 1
Use o: "\\$FileServer\lns$"


if @error
? Error connecting O: drive
sleep 30
endif

;****************************************************************************
;**** Test if in Mgt and Mgr groups
;****
Case InGroup ("Mgt", "Mgr", 1) = 1
Use o: "\\$FileServer\mgt$"


if @error
? Error connecting O: drive
sleep 30
endif

;****************************************************************************
;**** Departments Data Share Folder (R:)
;****
if exist("r:")
use r: /del

if @error
? Error disconnecting R: drive
sleep 30
endif
endif

use r: "\\$FileServer\Work"

if @error
? Error connecting R: drive
sleep 30
endif

Case InGroup ("Mgt") = 1
Use o: "\\$FileServer\mgt$"


if @error
? Error connecting O: drive
sleep 30
endif

Case InGroup ("MIS") = 1
Use o: "\\$FileServer\mis$"


if @error
? Error connecting O: drive
sleep 30
endif

Case InGroup ("Opr") = 1
Use o: "\\$FileServer\opr$"


if @error
? Error connecting O: drive
sleep 30
endif

Case InGroup ("SER") = 1
Use o: "\\$FileServer\ser$"


if @error
? Error connecting O: drive
sleep 30
endif

Case InGroup ("WTr") = 1
Use o: "\\$FileServer\wtr$"


if @error
? Error connecting O: drive
sleep 30
endif

Case InGroup ("COM") = 1
Use o: "\\$FileServer\com$"


if @error
? Error connecting O: drive
sleep 30
endif
EndSelect


;****************************************************************************
;**** QuickView Program and Files Share Folder (Q:)
;****

;if exist("q:")
; use q: /del
;
; if @error
; ? Error disconnecting Q: drive
; sleep 30
; endif
;endif

;use q: "\\$FileServer\QView5"
;use q: "\\$FileServer\QView"

;if @error
; ? Error connecting Q: drive
; sleep 30
;endif

;****************************************************************************
;**** Departments Data Share Folder (R:)
;****

;if InGroup ("Mgr") = 1
;
; if exist("r:")
; use r: /del
;
; if @error
; ? Error disconnecting R: drive
; sleep 30
; endif
; endif
;
; use r: "\\$FileServer\Work"
;
; if @error
; ? Error connecting R: drive
; sleep 30
; endif
;endif

;****************************************************************************
;**** BB Funds Share Folder (I:)
;****

;if InGroup ("Blotter") = 1
;
; if exist("i:")
; use i: /del
;
; if @error
; ? Error disconnecting I: drive
; sleep 30
; endif
; endif
;
; use i: "\\$FileServer\BB Fund$"
;
; if @error
; ? Error connecting I: drive
; sleep 30
; endif
;endif

;****************************************************************************
;**** BB Funds Share Folder (J:)
;****

;if InGroup ("Blotter") = 1
;
; if exist("j:")
; use j: /del
;
; if @error
; ? Error disconnecting J: drive
; sleep 30
; endif
; endif
;
; use j: "\\$FileServer\Securities$"
;
; if @error
; ? Error connecting J: drive
; sleep 30
; endif
;endif

;****************************************************************************
;**** Script End
;****

color w/n ;reset colors
exit


Top
#39716 - 2003-04-29 07:43 PM Re: Problems with multiple groups, pop-up screen
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Let only work with small pieces of code that are manageable and demonstrate your issue.

Is the code segment that is causing you a problem?
code:
    Case InGroup ("Mgt", "Mgr", 1) = 1 
Use o: "\\$FileServer\mgt$"


if @error
? Error connecting O: drive
sleep 30
endif

;****************************************************************************
;**** Departments Data Share Folder (R:)
;****
if exist("r:")
use r: /del

if @error
? Error disconnecting R: drive
sleep 30
endif
endif

use r: "\\$FileServer\Work"

if @error
? Error connecting R: drive
sleep 30
endif

Case InGroup ("Mgt") = 1
Use o: "\\$FileServer\mgt$"


if @error
? Error connecting O: drive
sleep 30
endif

Let's change the structure to something that we can test.

Use this as test code and execute it in a DOS window. What is the result?


if InGroup ("Mgt", "Mgr", 1)
? "Success : InGroup (Mgt, Mgr, 1)"
else
? "Failed : InGroup (Mgt, Mgr, 1)"
endif

if InGroup ("Mgt")
? "Success : InGroup (Mgt)"
else
? "Failed : InGroup (Mgt)"
endif


Are Mgt and Mgr global or local groups?

[ 29. April 2003, 19:48: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#39717 - 2003-04-29 08:03 PM Re: Problems with multiple groups, pop-up screen
BB Miami Offline
Fresh Scripter

Registered: 2003-04-29
Posts: 12
Loc: Miami, Florida, USA
Both groups are global.
I will try the batch.
The problem, at least as I perceive it is that I have to assume in the script all the combination of groups any user might have, and act accordingly to said combination.
It seems to ignore if I try to make selections based on one membership at a time.
I might be wrong, but what I sense it is happening is as follows:

User A is a member of both groups Mgt and Mgr.

Tests in my script:

If member of Mgt, map O:

If member of Mgr, map R:

When user A signs, he only gets dribe O:, as the script seems to ignore any other membership once it acts upon a previous selection. Am I wrong?

Top
#39718 - 2003-04-29 08:09 PM Re: Problems with multiple groups, pop-up screen
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Your description in the previous post is NOT what your code does.

You have mutually exclusive CASE statements: one that checks for membership in two groups and maps two drives and a CASE statement that check for the membership of a single group and map one drive.

I think that the INGROUP that checks both groups is failing and the one that checks one group is succeeding. The test code will tell us if that is the situation
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#39719 - 2003-04-29 08:40 PM Re: Problems with multiple groups, pop-up screen
BB Miami Offline
Fresh Scripter

Registered: 2003-04-29
Posts: 12
Loc: Miami, Florida, USA
Howard:

I knew I was not clear when I hit the "Add Reply" button. What I meant is not having one selection per CASE. I understand how SELECT CASE works. What I meant was:
SELECT CASE
CASE member of some group, map some drive
END CASE

IF member of another goup, map some other drive

The second test, outside the CASE ENDCASE, seems to be ignored.

Regarding the batch. I just tested, changing the membership and got the following results:

First test, member of Mgt only
Failure on first, success on second

Second test, member of Mgt and Mgr
Success on first, success on second

Top
#39720 - 2003-04-29 08:54 PM Re: Problems with multiple groups, pop-up screen
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
not sure this has any difference (as didn't read the whole thread and thus don't know your kix-ver) but anyway...

instead of:
if InGroup ("Mgr") = 1

you probably should:
if InGroup ("Mgr")
_________________________
!

download KiXnet

Top
#39721 - 2003-04-29 08:58 PM Re: Problems with multiple groups, pop-up screen
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
BB,

Why wait 30 seconds?

If I were logging in and had to wait 30 seconds for my script to complete. Ughh.. Much less a Manager or Supervisor having to wait.

Thanks,

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#39722 - 2003-04-29 09:18 PM Re: Problems with multiple groups, pop-up screen
BB Miami Offline
Fresh Scripter

Registered: 2003-04-29
Posts: 12
Loc: Miami, Florida, USA
Lokero:

Kixtart is the latest version. Just downloaded it about 3 days ago. Previously, I was using the 3.63 version, with same results. I am not quite sure what you mean by removing the 1.

KDyer:

The "30 seconds" are something we call here "B.S. for auditors", also known as "compromise." In reality, they wanted us to stop the login until the user hit the Enter key or similar, to act as an "confirmation" that the user understood and accepted the disclaimer.

Top
#39723 - 2003-04-30 12:23 AM Re: Problems with multiple groups, pop-up screen
kholm Offline
Korg Regular
*****

Registered: 2000-06-19
Posts: 714
Loc: Randers, Denmark
The minor problem (Disclaimer):

Have you tried to maximize the console
code:
$RC = SetConsole('Maximize')

Minor problem second solution:
I don't understand the need for a discalimer.
If you are logged on, You must have a valid username with a corresponding correct password.

But if you want the user to confirm that he/she is logging on for only buissness usage you could use a messagebox with a
Yes/no button, and force a shutdown, if the user presses no:
code:
$Msg = "You are connecting to a monitored proprietary system of" + @CRLF +
"Banco do Brasil Miami Agency. Access by unauthorized" + @CRLF +
"individuals is prohibited. Only users authorized by" + @CRLF +
"Banco do Brasil Miami Agency may access this system." + @CRLF +
"Usage is restricted to business use." + @CRLF
@CRLF +
"Pres yes to continue if you agree" + @CRLF +
"Pres no to logoff if you disagree" + @CRLF
$RC = Messagebox($Msg,'Disclaimer',4 + 256 + 4096)

If $RC = 7 ; User pressed no, force a shutdown of the system
$RC = ShutDown('','Shutting down',0,1,2)
Quit
EndIf

Major problem:

Could you try changing this code:
code:
Case InGroup ("Mgt", "Mgr", 1) = 1 
Use o: "\\$FileServer\mgt$"

if @error
? Error connecting O: drive
sleep 30
endif

;****************************************************************************
;**** Departments Data Share Folder (R:)
if exist("r:")
use r: /del
if @error
? Error disconnecting R: drive
sleep 30
endif
endif

use r: "\\$FileServer\Work"
if @error
? Error connecting R: drive
sleep 30
endif

Case InGroup ("Mgt") = 1
Use o: "\\$FileServer\mgt$"


if @error
? Error connecting O: drive
sleep 30
endif

To this code:
code:
Case InGroup ("Mgt")
Use o: "\\$FileServer\mgt$"

if @error
? Error connecting O: drive
sleep 30
endif

;****************************************************************************
;**** Departments Data Share Folder (R:)
If InGroup("Mgr")
if exist("r:")
use r: /del
if @error
? Error disconnecting R: drive
sleep 30
endif
endif

use r: "\\$FileServer\Work"
if @error
? Error connecting R: drive
sleep 30
endif
EndIf

-Erik

Top
#39724 - 2003-04-30 01:02 AM Re: Problems with multiple groups, pop-up screen
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
One could also use the LegalNoticeCaption/LegalNoticeText registry keys. However, I do question the validity of such statements. Most users will just click okay without reading the text and it only covers interactive logins, not remote access.
_________________________
There are two types of vessels, submarines and targets.

Top
#39725 - 2003-04-30 09:14 PM Re: Problems with multiple groups, pop-up screen
BB Miami Offline
Fresh Scripter

Registered: 2003-04-29
Posts: 12
Loc: Miami, Florida, USA
KHolm, sealeopard:

I did not understand the need for such disclaimer too, but Comptrollers, auditors, and corporate lawyers seem to belive that they can take a stand in a court of law against users that for one reason or another abused the network. I asked, and they say it does not even matter if the user never actually paid attention to the disclaimer itself, that would be their problem, they said.

Thanks for the help. I am going to try your suggestions and will keep you posted on the progress. I am still not out of the woods...

Top
Page 1 of 2 12>


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

Who's Online
1 registered (Allen) and 675 anonymous users online.
Newest Members
batdk82, StuTheCoder, M_Moore, BeeEm, min_seow
17885 Registered Users

Generated in 0.138 seconds in which 0.1 seconds were spent on a total of 12 queries. Zlib compression enabled.

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