#22196 - 2002-05-27 02:03 PM
Kixtart displays 000000
|
vanloon
Fresh Scripter
Registered: 2002-05-27
Posts: 34
|
Hi there,
Ik have a couple of statements like "if returncode <> 0". When the user logs on the network they get to see about 10 zero's. It is not terrible, but it would look nicer when they do not see the zero's at all.
Does somebody know how I can adjust the script so that they do not see them anymore??
Thanks,
Michel
|
|
Top
|
|
|
|
#22197 - 2002-05-27 02:08 PM
Re: Kixtart displays 000000
|
MCA
KiX Supporter
   
Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
|
Dear,
Welcome to the board.
It had to deal with the way you are using functions. See for the complete story Suppressing Results when running scripts on FAQ forum. greetings.
|
|
Top
|
|
|
|
#22198 - 2002-05-27 02:47 PM
Re: Kixtart displays 000000
|
vanloon
Fresh Scripter
Registered: 2002-05-27
Posts: 34
|
Hi,
This does work for the "write value" command, but not for the "use" command.
this works:
$NoSaveSettingshklm=ExistKey("HKEY_LOCAL_MACHINE\Software\Microsoft\windows\currentversion\explorer") If $NoSaveSettingshklm = 0 $temp = WriteValue("HKEY_LOCAL_MACHINE\Software\Microsoft\windows\currentversion\explorer","NoSaveSettings","1","REG_DWORD") Endif
But this does not work: $returncode = delkey ("hkey_current_user\network\h") if $returncode = 0 ? "key deleted...." endif $temp = use h: "$gbr"
Can you help me??
Thanks,
Michel
|
|
Top
|
|
|
|
#22199 - 2002-05-27 02:50 PM
Re: Kixtart displays 000000
|
MCA
KiX Supporter
   
Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
|
Dear,
USE isn't a function but a KiXtart command. Calling it as "$temp=USE ..." isn't legal.
USE can be used like:
code:
USE X: \\servername\share IF (@error <> 0) ? "Warning KIX: mapping problem." ENDIF
greetings.
|
|
Top
|
|
|
|
#22200 - 2002-05-27 03:05 PM
Re: Kixtart displays 000000
|
vanloon
Fresh Scripter
Registered: 2002-05-27
Posts: 34
|
Hi,
But the use command also gives a zero. Do u know how I can prevent this from happening??
Thanks
|
|
Top
|
|
|
|
#22202 - 2002-05-27 03:09 PM
Re: Kixtart displays 000000
|
MCA
KiX Supporter
   
Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
|
Dear,
Another idea,
code:
$null=RedirectOutput("nul") ; ; - use commands - ; USE X: "\\servername\share" ; $null=RedirectOutput("")
greetings.
btw: can you put your script part which handles about USE commands on the board. Possible it is something else which generates those ZEROs.
|
|
Top
|
|
|
|
#22204 - 2002-05-27 03:29 PM
Re: Kixtart displays 000000
|
vanloon
Fresh Scripter
Registered: 2002-05-27
Posts: 34
|
This is the code:
$grp=$srvr+$j $gbr=$srvr+$h+$x $apps=$srvr+$y
; ; Maak mappings en verwijder indien aanwezig ;
$returncode = delkey ("hkey_current_user\network\h") if $returncode = 0 ? "key deleted...." endif use h: "$gbr"
$returncode = delkey ("hkey_current_user\network\j") if $returncode = 0 ? "key deleted...." endif use j: "$grp"
$returncode = delkey ("hkey_current_user\network\y") if $returncode = 0 ? "key deleted...." endif use y: "$apps"
Thanks
|
|
Top
|
|
|
|
#22205 - 2002-05-27 03:51 PM
Re: Kixtart displays 000000
|
vanloon
Fresh Scripter
Registered: 2002-05-27
Posts: 34
|
Sorry,
It all where write value reactions. It is resolved now. Thanks for the help.
Michel
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 735 anonymous users online.
|
|
|