Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Is there a way to use a script to make a registry change acting as Administrator or System? Right now the scripts bail when I run them from a login script, because the user can't see the key for the script to open it. Thanks.
We modify settings on the machines that users (currently logged on person) can not do as a restriction of rights. See WNTRUNASUSER, Run as a different user. (Requires NT 4.0 or newer))
Second Suggestion:
Try writing a WBT that will modify the permissions on the registry key(s) that are in question and then execute it remotely on the target with tools like PSEXEC in PSTools package from SysInternals (http://www.sysinternals.com/)
Thirdly:
If this client was installed via a MSI package you could edit the MSI to 'loosen' the rights on the keys in question
Note: The specified user must have the appropriate user rights assigned to be able to log in as a batch job or service. In order to use this function, the currently-logged-in user must have the following rights assigned: "Act as part of the operating system" "Increase quotas" "Replace a process level token"In my case, the currently logged in user doesn't *always* have the ability to act as part of the OS. The settings are there for a reason, and I don't want to change them if I don't have to. Can you at least point me to *which* item in the knowledge base I am supposed to look for? I haven't found anything yet, and I did look before I asked, thank you very much.
As for your second and third suggestions may be how I end up having to address this, but I would like to avoid (if possible) remotely or manually doing anything to the machines, since there are about 650 of them. I also want to avoid things like an automated login and reboot if I can, as that will really confuse my users. If necessary I will though. Any other suggestions anyone?
If so, then you can also probably use a wntAccessAdd function to change persmission on the registry key from you own machine.
Any suggestions as to how I would go about automating workstation discovery? And how could I keep a running list, so that the script knows when it sees a machine whether it has been updated or not, without having to connect again to that workstation? Thanks!
Use the WNT extender, wntServerlist to get the names of all the machines.
loop through the list with a FOR/NEXT loop(ItemCount, ItemExtract) getting machine names.
Check a "completed.ini" file (IniReadPvt) to see if that machine has been done yet. If not...
Use the Winsock extender wxHost2Addr function (maybe) to convert the machine name to a ip address.
Try piniging the ip address (WinSock extender wxPing function) to see if machine is alive.
If alive do RegConnect to connect to machine and get registry key handle.
Use wntAccessAdd to modify permissions.
Close registry key. Update "completed.ini file of completed machines.
Loop back and get next machine
Article ID: W16173
File Created: 2004:03:30:15:43:06
Last Updated: 2004:03:30:15:43:06