#42482 - 2003-07-06 02:28 PM
Re: %userdomain%
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
|
Top
|
|
|
|
#42483 - 2003-07-06 02:40 PM
Re: %userdomain%
|
Grutte Pier
Getting the hang of it
Registered: 2001-10-06
Posts: 52
Loc: Leeuwarden, The Netherlands
|
his is the code:
code:
Break ON CLS $Printername="HPLJ4000N" $IniFile="D:\Kixtart\test.axt" $oldstr4=@ADDRESS $newstr4="%userdomain%" $tmpfile="%temp%\tmpfile.$$$" If Exist($IniFile) Del $tmpfile $nul=Open(1,$Inifile) $nul=Open(2,$tmpfile,5) $line=ReadLine(1) While @ERROR=0 If InStr($line,$oldstr4) $line=SubStr($line,1,InStr($line,$oldstr4)-1)+$newstr4+SubStr($line,InStr($line,$oldstr4)+Len($oldstr4),Len($line)) EndIf $nul=WriteLine(2,$line+Chr(13)+Chr(10)) $line=ReadLine(1) Loop $nul=Close(1) $nul=Close(2) Del $Inifile Copy $tmpfile $Inifile Del $tmpfile
Thanks,
Frans Erich
Added code tags (Bullock) [ 06. July 2003, 14:43: Message edited by: Howard Bullock ]
|
Top
|
|
|
|
#42484 - 2003-07-06 02:49 PM
Re: %userdomain%
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Do you have the network and domain available while you are testing or are you at home logging on with cached credentials? Without the network available your logon domain is indeed your computer.
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 242 anonymous users online.
|
|
|