Correct, that would only take effect for the ‘current user’ - which would be the user “on the console locally”.
For Remote Desktop connections, you could use ‘logged on users’ - but regset, like all of our other native ActionScript commands, does not provide a looping mechanism to repeat the query/set for multiple logged on users.
// I'm logged in via Remote Desktop
q:user keys of current users
T: 0.000 ms
q:user keys of logged on users
A: HKEY_USERS\S-1-5-21-3836661096-1201878488-1650927155-500
T: 0.007 ms
Instead we have to build a batch file, using Relevance to build a plural result of the commands we want to execute, and concatenating them with “%0d%0a” - the percent-encded values for “Carriage Return” and “Line Feed” - the CRLF that separates lines in DOS/Windows text files.
A query like this will give us all of the HKEY_USERS keys that we care about; we could add more filters to exclude the “LOCALSYSTEM”, “LOCAL SERVICE”, “NETWORK SERVICE”, etc., but in most cases we don’t need to bother:
q: keys whose (pathname of it does not end with "_Classes") of keys "HKEY_USERS" of registry
A: HKEY_USERS\.DEFAULT
A: HKEY_USERS\S-1-5-19
A: HKEY_USERS\S-1-5-20
A: HKEY_USERS\S-1-5-21-3836661096-1201878488-1650927155-500
A: HKEY_USERS\S-1-5-80-2652535364-2169709536-2857650723-2622804123-1107741775
A: HKEY_USERS\S-1-5-80-3880718306-3832830129-1677859214-2598158968-1052248003
A: HKEY_USERS\S-1-5-18
We can build your script then using ‘reg.exe add’ commands, i.e.
reg.exe add "HKEY_USERS\S-1-5-21-3836661096-1201878488-1650927155-500\Software\RightFAX Client\PrintDriver" /v "Name" /t "REG_SZ" /d "rightfax.owens-minor.com" /F
q: ("reg.exe add %22" & it & "\Software\RightFAX Client\PrintDriver%22 /d %22Name%22 /t %22REG_SZ%22 /d %22rightfax.owens-minor.com%22 /F") of pathnames of keys whose (pathname of it does not end with "_Classes") of keys "HKEY_USERS" of registry
A: reg.exe add "HKEY_USERS\.DEFAULT\Software\RightFAX Client\PrintDriver" /v "Name" /t "REG_SZ" /d "rightfax.owens-minor.com" /F
A: reg.exe add "HKEY_USERS\S-1-5-19\Software\RightFAX Client\PrintDriver" /v "Name" /t "REG_SZ" /d "rightfax.owens-minor.com" /F
A: reg.exe add "HKEY_USERS\S-1-5-20\Software\RightFAX Client\PrintDriver" /v "Name" /t "REG_SZ" /d "rightfax.owens-minor.com" /F
A: reg.exe add "HKEY_USERS\S-1-5-21-3836661096-1201878488-1650927155-500\Software\RightFAX Client\PrintDriver" /v "Name" /t "REG_SZ" /d "rightfax.owens-minor.com" /F
A: reg.exe add "HKEY_USERS\S-1-5-80-2652535364-2169709536-2857650723-2622804123-1107741775\Software\RightFAX Client\PrintDriver" /v "Name" /t "REG_SZ" /d "rightfax.owens-minor.com" /F
A: reg.exe add "HKEY_USERS\S-1-5-80-3880718306-3832830129-1677859214-2598158968-1052248003\Software\RightFAX Client\PrintDriver" /v "Name" /t "REG_SZ" /d "rightfax.owens-minor.com" /F
A: reg.exe add "HKEY_USERS\S-1-5-18\Software\RightFAX Client\PrintDriver" /v "Name" /t "REG_SZ" /d "rightfax.owens-minor.com" /F
T: 0.276 ms
I: plural string
To put these into a batch file in ActionScript, we just concatenate the plural answers with “%0d%0a”. Switching over to ActionScript, this seems to work:
delete __appendfile
appendfile {concatenation "%0d%0a" of ("reg.exe add %22" & it & "\Software\RightFAX Client\PrintDriver%22 /v %22Name%22 /t %22REG_SZ%22 /d %22rightfax.owens-minor.com%22 /F") of pathnames of keys whose (pathname of it does not end with "_Classes") of keys "HKEY_USERS" of registry}
delete fix_registry.cmd
move __appendfile fix_registry.cmd
action uses wow64 redirection false
waithidden cmd.exe /c fix_registry.cmd