Page 1 of 2 12>
Topic Options
#2954 - 2000-05-17 10:31 AM select case for Win95
Anonymous
Unregistered


I have my script working on NT and Win2000 machines, but for some reason, Win95 PC's are not recognizing the select case. Does anyone have any ideas as to what I'm doing wrong?? I'd really appreciate any help you could give me!! Thanks,
Sunnie
code:
Break Off

SETTIME \\Server2 ;synchronize time with Server1 Server

use t: "\\Server1\" + @userid + "$$" ;map Drive T to Personal User Directory
use v: "\\Server1\Everyone" ;map Drive V to Department Directory

Select

Case ingroup ("\\Server1\Accounting") = 2
use u: "\\Server1\Acct$$" ;map Drive U to Department Directory

Case ingroup ("\\Server1\Administrators") = 2
use u: "\\Server1\InfoSys$$" ;map Drive U to Department Directory
use s: "\\Server2\Scouting$$" ;map Drive S to Scouting Directory
use w: "\\Server3\Install" ;map Drive W to Install Directory
use x: "\\Server1\Departments" ;map Drive X to Install Directory
use y: "\\Server1\Users" ;map Drive Y to Install Directory
use z: "\\Server1\D$$" ;map drive Z to D$ Root Directory

Case ingroup ("\\Server1\Alumni") = 2
use u: "\\Server1\Alumni$$" ;map Drive U to Department Directory

Case ingroup ("\\Server1\Baseball") = 2
use u: "\\Server1\Bball$$" ;map Drive U to Department Directory

Case ingroup ("\\Server1\BROADCASTING") = 2
?"Sunnie, I made it to the Broadcasting Case"
use u: "\\Server1\BROAD$$" ;map Drive U to Department Directory

Case ingroup ("\\Server1\Scouting") = 2
use u: "\\Server1\Scoutng$$" ;map Drive U to Department Directory
use s: "\\Server2\Scouting$$" ;map Drive S to Scouting Directory

Case ingroup ("\\Server1\Information Systems") = 2
use u: "\\Server1\InfoSys$$" ;map Drive U to Department Directory
use w: "\\Server3\Install" ;map Drive W to Install Directory

Case ingroup ("\\Server1\Customer Serive") = 2
use u: "\\Server1\CustSrv$$" ;map Drive U to Department Directory

Case ingroup ("\\Server1\Trainers") = 2
use u: "\\Server1\Trainers$$" ;map Drive U to Department Directory

Case ingroup ("\\Server1\Diamond Club") = 2
use u: "\\Server1\Dmndclb$$" ;map Drive U to Department Directory

Case ingroup ("\\Server1\Human Resources") = 2
use u: "\\Server1\HumanR$$" ;map Drive U to Department Directory


Case ingroup ("\\Server1\Merchandising") = 2
use u: "\\Server1\Merch$$" ;map Drive U to Department Directory

Case ingroup ("\\Server1\PNC Park") = 2
use u: "\\Server1\Project$$" ;map Drive U to Department Directory

Case ingroup ("\\Server1\Fitness") = 2
use u: "\\Server1\Fitness$$" ;map Drive U to Department Directory

Case ingroup ("\\Server1\Intern") = 2
use u: "\\Server1\Intern$$" ;map Drive U to Department Directory

Case ingroup ("\\Server1\Pirate City") = 2
use u: "\\Server1\PirCity$$" ;map Drive U to Department Directory

Case ingroup ("\\Server1\Executive") = 2
use u: "\\Server1\Exec$$" ;map Drive U to Department Directory

Case ingroup ("\\Server1\Media Relations") = 2
use u: "\\Server1\Media$$" ;map Drive U to Department Directory

Case ingroup ("\\Server1\Public Relations") = 2
use u: "\\Server1\PR$$" ;map Drive U to Department Directory

Case ingroup ("\\Server1\Operations") = 2
use u: "\\Server1\Oper$$" ;map Drive U to Department Directory

Case ingroup ("\\Server1\Ticket Office") = 2
use u: "\\Server1\TcktOf$$" ;map Drive U to Department Directory

Case ingroup ("\\Server1\Telemarketing") = 2
use u: "\\Server1\Tele$$" ;map Drive U to Department Directory

Case ingroup ("\\Server1\Marketing") = 2
use u: "\\Server1\Mrktg$$" ;map Drive U to Department Directory

Case ingroup ("\\Server1\Minor Leagues") = 2
use u: "\\Server1\Minor$$" ;map Drive U to Department Directory

Case 1
?"Error...Please contact the help desk immediately - extension 6021"
?
?"Hit Any Key To Continue..." get $C

EndSelect

Exit




Top
#2955 - 2000-05-17 11:29 AM Re: select case for Win95
Jack Lothian Offline
MM club member
*****

Registered: 1999-10-22
Posts: 1169
Loc: Ottawa,Ontario, Canada
My guess is the kxrpc service is not running or the version is incompatible with the kix client. You must install it on all PDC & BDC.
_________________________
Jack

Top
#2956 - 2000-05-18 12:48 AM Re: select case for Win95
Anonymous
Unregistered


THANK YOU, THANK YOU, THANK YOU!!!!

A simple thing like that I accidentally overlooked. I'm sure that's the reason!!! Jack, you're a doll!!!

Thanks,
Sunnie

Top
#2957 - 2000-05-17 01:09 PM Re: select case for Win95
Anonymous
Unregistered


Yep...that was it!!! So all you newbees to this software: REMEMBER THE KXRPC FOR WIN95!!

Have a great day!!

Sunnie

[This message has been edited by sunnie4747 (edited 17 May 2000).]

Top
#2958 - 2000-05-17 02:08 PM Re: select case for Win95
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Sunnie:

So - now that you're an "old hand" at KiX ... what's with the "4747" after you're name dar stranger ?

Shawn.

Top
#2959 - 2000-05-17 02:11 PM Re: select case for Win95
Anonymous
Unregistered


Shawn...

I just use my aol screen name ~ it makes it easier to remember all of my login names and passwords. The 4747 was given to me by aol...I guess I was the 4,747th Sunnie on aol!!

And don't yell at me for using aol...it's just easier for me to stay with them instead of changing my email address with everyone!!

Sunnie

[This message has been edited by sunnie4747 (edited 17 May 2000).]

Top
#2960 - 2000-05-17 02:30 PM Re: select case for Win95
Anonymous
Unregistered


I am having the same type of problem except that my KXRPC is installed and running. When i try to do if statements or ingroup statements i always get 0 no matter what as the return value. Do you have to install and start the KXRPC from the NETLOGON directory? Or can it be installed and started in another directory?
Top
#2961 - 2000-05-17 02:33 PM Re: select case for Win95
Anonymous
Unregistered


Carl:

We have it installed and running on each of the servers in the same directory that the KiX files are saved. We had to manually go into the control panel and start the RPC service (did you do that? - it sounds like you may have).

Other than that, I would check to make sure you're using the right code for the group number - global groups (1) or local groups (2).

Does that help??

Sunnie

[This message has been edited by sunnie4747 (edited 17 May 2000).]

Top
#2962 - 2000-05-17 02:52 PM Re: select case for Win95
Anonymous
Unregistered


Hi everyone...

I was just asked to include an if else into my select case script. It looks fine to me, but does anyone know why this won't work???:

code:
Case ingroup ("\\Server\Baseball") = 2 
use u: "\\Server\Bball$$" ;map Drive U to Department Directory
if ingroup ("\\Server\Scouting") = 2
use s: "\\Server2\Scouting$$" ;map Drive S to Scouting Directory
endif

[This message has been edited by sunnie4747 (edited 17 May 2000).]

Top
#2963 - 2000-05-17 02:59 PM Re: select case for Win95
Anonymous
Unregistered


ok I got the rpc service installed and running. I got the kix32 and the three dll's in the netlogon dir along with the script. This is what the bat looks like:

@ECHO OFF
REM Login Script for the LSBN
NET TIME \\SCOOBY /SET /YES
%0\..\Kix32.exe login.kix

This is what my script looks like:
break on
;Get Home Directory

Use H: "\\SCOOBY\" + @USERID + "$"

;Get Standard Drives

Use I: \\SCOOBY\Public
Use J: \\SCOOBY\APPS

;Group Areas

IF @USERID = "naginc"
use m: \\SCOOBY\DISC$
ENDIF

IF INGROUP( "DOMAIN USERS" )
USE n: \\SCOOBY\DISC$
ENDIF

$V = "@userid"
? $V
$X = "naginc"
? $X
IF $V = $X
Use K: \\SCOOBY\DISC$
ENDIF

IF "naginc" = "naginc"
use l: \\SCOOBY\DISC$
ENDIF


When i log in under naginc i get H, I, J Drives nothing else. When i run kix32 login.kix from the command prompt i get output like:

00
Administrator
Administrator00

As you can see if i try to do an IF statement i get 0 back. Even that last statement where i compare two strings of exactly the same thing it still returns 0.

I only have a PDC and 25 users. I installed the KXRPC from the NETLOGON Directory and then from the KIXTART directory where all files were unzipped. Neither does anygood and yes the service is started. I started it from the command prompt using net start and i tried starting it from the console also. Do have have to specify interact with desktop or logon as another account for the service?

Top
#2964 - 2000-05-17 03:01 PM Re: select case for Win95
Anonymous
Unregistered


woops i meant

00
naginc
naginc00

as the output

Top
#2965 - 2000-05-17 03:12 PM Re: select case for Win95
Anonymous
Unregistered


When you put this code in:
code:
IF INGROUP( "DOMAIN USERS" )
USE n: \\SCOOBY\DISC$
ENDIF

are you sure the "domain users" is a global group?? If it's not, and it's a local group, you need to put IF INGROUP ("DOMAIN USERS") = 2.

The other if comments, you need to put " around the \\SCOOBY\DISC$.

I hope I helped a little.

Sunnie


Top
#2966 - 2000-05-17 03:13 PM Re: select case for Win95
Anonymous
Unregistered


and you need to use $$ at the end, not just one $


[This message has been edited by sunnie4747 (edited 17 May 2000).]

Top
#2967 - 2000-05-17 03:22 PM Re: select case for Win95
Anonymous
Unregistered


I tried using the = 2 a min ago and it did not do anything its still returning 0 which means all my if statements are failing no matter what i try. check that last IF statement out

If "naginc" = "naginc"
use l: \\SCOOBY\DISC$
ENDIF

By all means this should return 1 and then try and map the drive, instead it returns 0. So something is not quite right here. Also, I am trying this on the PDC itself before i even try to get it to work on win 95 machines. So this is all under and NT environment so far. I wonder if anytype of security settings is preventing this.

Top
#2968 - 2000-05-17 03:25 PM Re: select case for Win95
Anonymous
Unregistered


Carl:

If "naginc" is a user, then you'll need to do this (I think):

If @userid = "naginc"
use l: "\\Scooby\Disc$$"
End If

See if that works

Sunnie

Top
#2969 - 2000-05-17 03:29 PM Re: select case for Win95
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Sunnie:

If you're having no luck with the IF/ENDIF, try making another case statement with a compound expression, like this ...


code:


Case ingroup ("\\Server\Baseball") = 2 and ingroup ("\\Server\Scouting") = 2


use s: "\\Server2\Scouting$$" ;map Drive S to Scouting Directory


...


but I don't see why the IF/ENDIF shouldn't work !

Shawn.

[This message has been edited by Shawn (edited 17 May 2000).]

Top
#2970 - 2000-05-17 03:31 PM Re: select case for Win95
Anonymous
Unregistered


that is one of the if statements i tried and that did not work the if statement returns a 0. That is what is so weird everything that should work does not because all i get from any if statement is 0 no matter what i try.
Top
#2971 - 2000-05-17 03:33 PM Re: select case for Win95
Anonymous
Unregistered


Shawn....

I tried that, but that didn't work either. Here was my code for that:

code:
Case ingroup ("\\Server\Baseball") = 2 and ingroup ("\\Server\Scouting") = 2
use u: "\\Server\Bball$$"
use s: "\\Server1\Scouting$$"

(is it because you can't use two 2's???)
And I had a case only for Baseball and one for Scouting, but when the user logged on, they were only getting the U. ??? I'm clueless!!!

I know why the if/end if isn't working....becasue that's the last step for me!!!

And I lose my gold star for the day since I couldn't figure this out by the end of the day!!!

Oh well, c'est la vie!!

Sunnie

[This message has been edited by sunnie4747 (edited 17 May 2000).]

Top
#2972 - 2000-05-17 03:37 PM Re: select case for Win95
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Sunnie:

You know that you got a typo there in your second ingroup - you forgot the closing " on your group !

Is this just a cut-and-paste thingy ?

Shawn

Top
#2973 - 2000-05-17 03:38 PM Re: select case for Win95
Anonymous
Unregistered


ok because one if statement was not setup properly all the rest below it will not work.

I added the correct statement:

use m: "\\SCOOBY\DISC$$" ;thx sunnie4747

In the first IF statement and changed the rest also, as a result the rest of the if statements functioned properly after the first one was fixed. Hardcore programmers may want to take note of this preprocessor condition.

break on
;Get Home Directory

Use H: "\\SCOOBY\" + @USERID + "$"

;Get Standard Drives

Use I: \\SCOOBY\Public
Use J: \\SCOOBY\APPS

;Group Areas

IF @USERID = "Administrator"
use m: "\\SCOOBY\DISC$$"
ENDIF

IF INGROUP( "DOMAIN USERS" ) = 2
USE n: "\\SCOOBY\DISC$$"
ENDIF

$V = "@userid"
? $V
$X = "Administrator"
? $X
IF $V = $X
Use K: "\\SCOOBY\DISC$$"
ENDIF

IF "Administrator" = "Administrator"
use l: "\\SCOOBY\DISC$$"
ENDIF

This maybe the root of your second problem i read before above. Just make sure all syntax is correct up until the problem point.

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 781 anonymous users online.
Newest Members
Sir_Barrington, batdk82, StuTheCoder, M_Moore, BeeEm
17886 Registered Users

Generated in 0.06 seconds in which 0.021 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