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
;**************************************************************************** ;**** 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..."
;**************************************************************************** ;**** 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
;**************************************************************************** ;**** 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..."
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 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 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
#39707 - 2003-04-2904:38 PMRe: Problems with multiple groups, pop-up screen
Howard BullockHoward Bullock
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.
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.
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.
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
;**************************************************************************** ;**** 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..."
;**************************************************************************** ;**** 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
;**************************************************************************** ;**** 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..."
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 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 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
#39716 - 2003-04-2907:43 PMRe: Problems with multiple groups, pop-up screen
Howard BullockHoward Bullock
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
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?
#39718 - 2003-04-2908:09 PMRe: Problems with multiple groups, pop-up screen
Howard BullockHoward Bullock
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
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
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.
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
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.
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...