Page 1 of 1 1
Topic Options
#45817 - 2003-09-22 08:52 PM adding .reg to login script
Glenn H Offline
Fresh Scripter

Registered: 2003-09-15
Posts: 12
Ok, today is an especially moronic day for me.

This is what we have done. We have created a .reg file to copy a certain amount of entries into the registry of our W2K workstations to point to a spcific server so we can automatically apply patches to workstations. So what I have done is I created a small batch file that has the following command in it

regedit.exe /s sus.reg. The batch file and the sus.reg file exist on a network share.

I know there are not any permissions issues as we are already copying files to the workstation from the shared directory.

So the command from the login script is : shell "P:\sus.bat". This is not rocket science, but the script will just not run. Yet, if I execute the bat file from the network share manually without the login script, it copies in the registry entries. HELP !

REGEDIT4

[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate\AU]

[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate\AU]
"RescheduleWaitTime"=dword:15
"NoAutoRebootWithLoggedOnUsers"=dword:1
"NoAutoUpdate"=dword:0
"AUOptions"=dword:4
"ScheduledInstallDay"=dword:0
"ScheduledInstallTime"=dword:15
"UseWUServer"=dword:1

[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate]
"WUServer"="http://srv015"
"WUStatusServer"="http://srv015"

Top
#45818 - 2003-09-22 09:12 PM Re: adding .reg to login script
Co Offline
MM club member
***

Registered: 2000-11-20
Posts: 1342
Loc: NL
Try
Shell "regedit.exe /s P:\sus.reg"
_________________________
Co


Top
#45819 - 2003-09-22 09:19 PM Re: adding .reg to login script
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Administrative permissions are required in order to write to HKLM. Also, you can use WRITEVALUE() to write to registry keys.

Finally, I'd rather do this via an admin script. Use the NetView2() UDF to enumerate the computers in the domain, then do a remote registry write as outlined in the KiXtart Manual in order to write the values.
_________________________
There are two types of vessels, submarines and targets.

Top
#45820 - 2003-09-22 09:21 PM Re: adding .reg to login script
Glenn H Offline
Fresh Scripter

Registered: 2003-09-15
Posts: 12
I tried that already ....No go. That is what is frustrating the daylights out of me. I see nothing wrong with the script.

I have tried to add all the registry keys manually, using SAVEKEY, ADDKEY and WRITEVALUE commands. I have tried adding the keys with your suggestion and I have tried adding the keys through the patch file.

The only thing that I can this of is that this KEY does not exist

[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate\]

Top
#45821 - 2003-09-22 09:25 PM Re: adding .reg to login script
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
HKLM reqires local administrative privileges, so if your users are not local administrators, they cannot write to HKLM!

And please explain why an admin script would not work?
_________________________
There are two types of vessels, submarines and targets.

Top
#45822 - 2003-09-22 09:29 PM Re: adding .reg to login script
Glenn H Offline
Fresh Scripter

Registered: 2003-09-15
Posts: 12
My bad Sea Leopard ..I was in the middle of typing my reply to the first suggestion and did not see your response. I do have local admin rights as well as domain admin rights ... I am not familiar with the Admin Scripts ...
Top
#45823 - 2003-09-22 09:33 PM Re: adding .reg to login script
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Admin scripts run under a (domain) administrative context on an administrators computer and remotely access other computers, e.g.
code:
$comps=netview2()
for each $comp in $comps
$rc=writevalue('\\'+$comp+'\HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate\AU,'RescheduleWaitTime',15,'REG_DWORD')
next

_________________________
There are two types of vessels, submarines and targets.

Top
#45824 - 2003-09-22 09:35 PM Re: adding .reg to login script
Glenn H Offline
Fresh Scripter

Registered: 2003-09-15
Posts: 12
We're running KIX 3.61 . I take it this functionality is not available in this version
Top
#45825 - 2003-09-22 09:39 PM Re: adding .reg to login script
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Nope, UDFs were introduced in KiXtart v4.

You should upgrade to at least 3.63 or even better to 4.22-RC1.

And please mention the Kixtart version the next time you're posting as you are using a rather old version.
_________________________
There are two types of vessels, submarines and targets.

Top
#45826 - 2003-09-22 09:46 PM Re: adding .reg to login script
Glenn H Offline
Fresh Scripter

Registered: 2003-09-15
Posts: 12
Like I said, I'm having a day and a half ....
Usually mention version when I post ...
I'm officially going to leave this alone for today ....
Fresh mind usually makes for results

Top
#45827 - 2003-09-23 07:42 PM Re: adding .reg to login script
Glenn H Offline
Fresh Scripter

Registered: 2003-09-15
Posts: 12
Uh, the issue was I was called the wrong login script. Welcome to the world of production / live testing
Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 764 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.065 seconds in which 0.027 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org