Page 1 of 1 1
Topic Options
#65614 - 2002-05-21 04:43 PM Problems with @FULLNAME and @PRIMARYROUP
jr Offline
Fresh Scripter

Registered: 2002-05-21
Posts: 5
Loc: Windhoek, Namibia
For some time now (it worked at some stage), when accessing the two macros "@FULLNAME" and "PRIMARYGROUP" they are empty. I am running the scripts on W2k/WXP (workstations) and on a W2k Server network. Enumarating groups for instance and anything else works without problems.

Any ideas? Thanks. JR

Top
#65615 - 2002-05-21 05:19 PM Re: Problems with @FULLNAME and @PRIMARYROUP
BrianTX Offline
Korg Regular

Registered: 2002-04-01
Posts: 895
Could you post sample code?

Brian

Top
#65616 - 2002-05-22 04:06 PM Re: Problems with @FULLNAME and @PRIMARYROUP
jr Offline
Fresh Scripter

Registered: 2002-05-21
Posts: 5
Loc: Windhoek, Namibia
Sure, here is the section that uses @FULLNAME:

; ---------- WELCOME
$Result = DisplayText($CurPos, 2, "Logon: ", "w+/b")
$Result = DisplayText(-1, 0, "@MDayNo/@MonthNo/@Year @Time", "y+/b")
$Result = DisplayText(-1, 0, " at " + $Workstation, "w+/b")
$CurPos = $CurPos + 1
$Result = DisplayText($CurPos, 2, "Environment: " + "Ver. $LogonVersion ($OS), $LogonDomain ($Subnet), @LSERVER", "w+/b")
$CurPos = $CurPos + 2
$Result = DisplayText($CurPos, 2, "User (ID): ", "w+/b")
$Result = DisplayText(-1, 0, "@FULLNAME", "g+/b")
$Result = DisplayText(-1, 0, "(@USERID)", "w+/b")

an here the one using @PRIMARYGROUP:

Call "$LogonPath\GetGroups.kix"
If ((@PRIMARYGROUP = "") AND ($GroupList[0] = ""))
$Result = DisplayText(48, -1, "WARNING: No valid GROUP MEMBERSHIP found. Logging off!", "w+/r")
$Result = WriteLog("Logon.kix", "WARNING: No valid GROUP MEMBERSHIP found. Logging off!", 0)
Sleep 10
LogOff(1)
EndIf
$Result = DisplayText($CurPos, 2, "Primary Group: " + "@PRIMARYGROUP", "w+/b")
$Result = DisplayText($CurPos + 1, 2, "Other Groups: ", "w+/b")
For $i=0 To Ubound($GroupList)
"" + $GroupList[$i] + " "
Next

Top
#65617 - 2002-05-22 10:51 PM Re: Problems with @FULLNAME and @PRIMARYROUP
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
You might want to format your strings correctly by not puttings macros within string delimiters as in
code:
$a='test '+@FULLNAME

and not
code:
$a='test @FULLNAME'

_________________________
There are two types of vessels, submarines and targets.

Top
#65618 - 2002-05-23 12:01 AM Re: Problems with @FULLNAME and @PRIMARYROUP
BrianTX Offline
Korg Regular

Registered: 2002-04-01
Posts: 895
I've never had a problem using macros inside of quotes (actually works better for me in most cases.).. What I'm wondering is if you get anything if you use a simple script:

code:
"Fullname: @FULLNAME"
"Primary group: @PRIMARYGROUP"

or
code:
"Fullname: " + @FULLNAME
"Primary group: " + @PRIMARYGROUP

I'm inclined to think that it's not a syntax problem, but something else (I could be wrong, but this will tell us for sure...)

Brian

Top
#65619 - 2002-05-24 11:18 AM Re: Problems with @FULLNAME and @PRIMARYROUP
jr Offline
Fresh Scripter

Registered: 2002-05-21
Posts: 5
Loc: Windhoek, Namibia
Hi sealepard,

even if I use the macros without putting them into string delimiters I get the same result, @FULLNAME and @PRIMARYGROUP are empty.

Hi BrianTX,

when I use a simple script just outputting @FULLNAME and @PRIMARYGROUP I get the same, both are empty.

Top
Page 1 of 1 1


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

Who's Online
1 registered (Allen) and 1607 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.142 seconds in which 0.077 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