3 server side AJAJ functions for registry editing. These go along
4 with scripting/client/regedit.js
7 libinclude("winreg.js");
8 libinclude("server_call.js");
11 server side call to return a listing of keys in a winreg path
13 function enum_keys(binding, path) {
14 printf("enum_keys(%s, %s)\n", binding, path);
15 var reg = winregObj();
17 reg.credentials = session.authinfo.credentials;
19 var status = reg.connect(binding);
20 if (status.is_ok != true) {
24 return reg.enum_path(path);
28 server side call to return a listing of values in a winreg path
30 function enum_values(binding, path) {
31 printf("enum_values(%s, %s)\n", binding, path);
32 var reg = winregObj();
34 reg.credentials = session.authinfo.credentials;
36 var status = reg.connect(binding);
37 if (status.is_ok != true) {
41 return reg.enum_values(path);
44 /* register a call for clients to make */
45 var call = servCallObj();
46 call.add('enum_keys', enum_keys);
47 call.add('enum_values', enum_values);
49 /* run the function that was asked for */