NTDOCNTDOC Administrator
Registered: 2000-07-28
Posts: 11628
Loc: CA
There are a few methods of doing this. Copying and running a .REG file is possible, but it will not update the key either if the user is not a Local Administrator on the computer.
The code that Kent gave you will work during logon for a user that is a Local Administrator. However, as far as speed goes, there is no reason to even check the key if you already KNOW that you want it set to Lotus Notes, just write it every time.
Kents Code:
Revised Code:
Notice how it works with FOUR sections SUBKEY "HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail" ENTRY "" ; Note, a blank value indicates the DEFAULT value EXPRESSION "Lotus Notes" DATA TYPE "REG_SZ"
Another thing you can do is what Jens was saying. On your own workstation create a folder called SCRIPTS. Then under SCRIPTS create a folder called 3 and one called 4 Copy KiXtart v3.6 and your other scripts into the 3 folder. Then download and extract KiXtart v4.21-RC2 http://www.scriptlogic.com/downloads/kix/kix2001_421rc2.zip Then copy the executable files into the 4 folder C:\SCRIPTS\4 Then you can run Administrative scripts from the C:\SCRIPTS\4 folder against remote machines (as long as you have Admin rights on all remote machines) Thus you could locate all remote machines and run scripts on them that will update data directly from your workstation. Then your users woudn't need to have Admin rights for many of your scripts.
NOTE KiXtart v4.x can use HKLM for HKEY_LOCAL_MACHINE
COMNetView is a User Defined Function and can be located here http://www.kixhelp.com/udfs/udf/000201.htm or here (note also that Jens says the code only works for 2000/XP systems but since you said
Now, one thing about the code from Jens, it will run on ANY system where it locates the system and you have Admin Rights, including SERVERS so you might want to modify the code or create some list of SERVERS, then go back and repairs what it did. It would be better to NOT modify anything on a Server if you don't want it that way in the first place though.
If you try the LOGON script using v3.60 of KiXtart you will notice that even if you add the method to SHELL out and run the .REG file if you are not an Admin, you won't be able to update that key.
Oh... FYI, If you have Admin rights on your 2000 Active Directory, you can also accomplish this with GPO as well.