Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes

Change language to:
English - Français - Português

Please note that the recommended version of Scilab is 6.1.1. This page might be outdated.
See the recommended documentation of this function

Scilab help >> Windows tools > winqueryreg

winqueryreg

Get item from Microsoft Windows registry

Calling Sequence

value = winqueryreg('name', 'rootkey','subkey')
value = winqueryreg('rootkey', 'subkey','valname')
value = winqueryreg('rootkey','subkey')

Description

value = winqueryreg('name', 'rootkey', 'subkey') returns the key names in rootkey\subkey in a matrix of strings. The first argument is the literal quoted string, 'name'.

If the value retrieved from the registry is a string, winqueryreg returns a string. If the value is a 32-bit integer, winqueryreg returns the value as an integer (int32).

value = winqueryreg('rootkey', 'subkey', 'valname') returns the value for key valname in rootkey\subkey.

value = winqueryreg('rootkey', 'subkey') returns a value in rootkey\subkey that has no value name property.

NoteThe literal name argument and the rootkey argument are case-sensitive. The subkey and valname arguments are not.

Examples

if getos() == 'Windows' then
  winqueryreg 'HKEY_LOCAL_MACHINE' 'HARDWARE\DESCRIPTION\System\CentralProcessor\0\' 'ProcessorNameString'
  lines(-1);
  mousechar = winqueryreg('name', 'HKEY_CURRENT_USER','control panel\mouse');
  len=size(mousechar);
  for k=1:len(1)
     setting = winqueryreg('HKEY_CURRENT_USER','control panel\mouse', mousechar(k));
     if (mousechar(k)=='') then mousechar(k)='default';,end
     str = sprintf('%s = %s', mousechar(k), string(setting));
     disp(str);
  end
end

Authors

  • A.C
<< winopen Windows tools Atoms >>

Copyright (c) 2022-2023 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Fri Aug 05 16:30:48 CEST 2011