Page 1 of 1 1
Topic Options
#116853 - 2004-03-25 05:39 PM Script not working properly after I upgrade
orven Offline
Fresh Scripter

Registered: 2004-03-05
Posts: 5
I have script workin in Kix 95 ver 3.62. I want to upgrade it to at least kixstart 4.21 so that I can incorporate and use Kixforms.

My script is:
Map to L drive if meber of global Group(_global)
Map S to first departmental Drive then I, J so on and so forth for the follwoing departmental drive.

However when I run my script using the kix4.21 the mapping is not working properly. I Cannot map anymore the first departmental drive which is the S drive. However the global (L drive) is working. Any change in some functions cannto find it.
Thanks and More power




CLS
small
COLOR b+/n
BOX (0,0,24,79,grid)
COLOR b/n
BOX (8,16,21,71,Å)
COLOR y+/n
BOX (7,15,20,70,full)

; REM DISPLAY NT VARIABLE NAMES
Color W+/n

AT ( 9,20) "Userid : "
AT (10,20) "Full name : "
AT (11,20) "Description : "
AT (12,20) "Privilege : "
AT (13,20) "Workstation : "
AT (14,20) "Primary Group: "
AT (15,20) "Domain : "
AT (16,20) "Logon Domain : "
AT (17,20) "Logon Server : "
Color G+/n
AT (19,20) " YOU ARE LOGGED ON TO XYZ NETWORK "
; AT (20,20) @time
; REM DISPLAY NT VARIABLES
Color y+/n
AT ( 9,35) @userid
AT (10,35) @fullname
AT (11,35) @comment
AT (12,35) @priv
AT (13,35) @wksta
AT (14,35) @primarygroup
AT (15,35) @domain
AT (16,35) @ldomain
AT (17,35) @lserver
COLOR w/n
SLEEP 5
CLS

; REM SET USER VARIABLES
$x="$$"
$v="\\FS1_NT\"
$a="\\FS1_NT\"
; add File server 2
$w="\\FS2_NT\"
; call the users drive

$u=@userid


; call indi
$dir=$v+$u+$x

:COMMENT
$s = instr(@COMMENT,"(")
$e = instr(@COMMENT,")")
$l = ($e - $s) - 1
IF $s = 0
$g = "NONE"
ELSE
IF $e > 0
$g = SUBSTR(@COMMENT,$s+1,$l)
ELSE
$g = "NONE"
ENDIF
ENDIF
; change

$grp=$w+$g+$x

:HOME
; REM NET USE HOME DIRECTORY
USE F: $dir

:SETGROUP
SET "GROUP=$g"
DIM $Group[20]
$i=0
$j=0
do
if substr(ENUMGROUP($i),1,1) = "_"
$j=$j+1
$Group[$j] = substr(ENUMGROUP($i),2,Len(ENUMGROUP($i))-1)
? $i " " $j " " $Group[$j]
?
endif
$i=$i+1
UNTIL Len(ENUMGROUP($i)) = 0 OR $i=20

$grp0=$w+$Group[1]+$x
$grp1=$w+$Group[2]+$x
$grp2=$w+$Group[3]+$x
$grp3=$w+$Group[4]+$x
$global="GLOBAL"
$gl=$w+$global+$x
USE L: $gl

if $j > 0
USE S: $grp0
endif

if $j > 1
USE I: $grp1
endif

if $j > 2
USE J: $grp2
endif

if $j > 3
USE K: $grp3
endif

COOKIE1
EXIT

Top
#116854 - 2004-03-25 05:48 PM Re: Script not working properly after I upgrade
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
May I ask you you don't use simple INGROUP() statements to map drives based on group membership?
_________________________
There are two types of vessels, submarines and targets.

Top
#116855 - 2004-03-29 03:06 PM Re: Script not working properly after I upgrade
orven Offline
Fresh Scripter

Registered: 2004-03-05
Posts: 5
I tried to use ingroup() but still no working. Can somebody help me please. I double check and nothing change in the code except the version i'm compiling it(from Kix95 ver 3.62 to higher one 4.20. or 4.21. Ther mapping is not showing the departmental drive why???
Can somebody assist.
thanks




Top
#116856 - 2004-03-29 05:50 PM Re: Script not working properly after I upgrade
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
Did you upgrade the KXRPC Service as well? Did you perform basic error checking? Did you step through the code via DEBUG ON? Where does it fail? What are the error codes returned by the INGROUP()? Did you try an isolated script with just an INGROUP() in it? Does the USE return an error code?

What do you mean by "Compiling"? Ther is NO KiXtart Compiler!
_________________________
There are two types of vessels, submarines and targets.

Top
#116857 - 2004-03-29 05:53 PM Re: Script not working properly after I upgrade
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
What do you get when run just this bit of code?
Code:

$Index = 0
DO
$Group = ENUMGROUP($Index)
?$Group
$Index = $Index + 1
UNTIL Len($Group) = 0



HTH,

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

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
0 registered and 248 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.042 seconds in which 0.019 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