dann47
asked on
BAT File (make silent
COuld someone assist with this bat file please.
Need to make it run silent, without asking "are you sure you want to add this to the registary" on xp
REGEDIT /S
// Registry file generated by the Application Launcher.
[HKEY_LOCAL_MACHINE\SOFTWA RE]
[HKEY_LOCAL_MACHINE\SOFTWA RE\Policie s]
[HKEY_LOCAL_MACHINE\SOFTWA RE\Policie s\Microsof t]
[HKEY_LOCAL_MACHINE\SOFTWA RE\Policie s\Microsof t\Windows]
[HKEY_LOCAL_MACHINE\SOFTWA RE\Policie s\Microsof t\Windows\ WindowsUpd ate]
"TargetGroup"="Windows"
"TargetGroupEnabled"=dword :00000001
"WUServer"="http://selby1:8530/"
"WUStatusServer"="http://selby1:8530/"
[HKEY_LOCAL_MACHINE\SOFTWA RE\Policie s\Microsof t\Windows\ WindowsUpd ate\AU]
"AUOptions"=dword:00000004
"AutoInstallMinorUpdates"= dword:0000 0001
"DetectionFrequency"=dword :00000006
"DetectionFrequencyEnabled "=dword:00 000001
"NoAutoRebootWithLoggedOnU sers"=dwor d:00000001
"NoAutoUpdate"=dword:00000 000
"RebootRelaunchTimeoutEnab led"=dword :00000001
"RebootRelaunchTimeout"=dw ord:000000 1e
"RescheduleWaitTime"=dword :0000003c
"RescheduleWaitTimeEnabled "=dword:00 000001
"ScheduledInstallDay"=dwor d:00000000
"ScheduledInstallTime"=dwo rd:0000000 3
"UseWUServer"=dword:000000 01
As can see i already tried
Cheers all
Need to make it run silent, without asking "are you sure you want to add this to the registary" on xp
REGEDIT /S
// Registry file generated by the Application Launcher.
[HKEY_LOCAL_MACHINE\SOFTWA
[HKEY_LOCAL_MACHINE\SOFTWA
[HKEY_LOCAL_MACHINE\SOFTWA
[HKEY_LOCAL_MACHINE\SOFTWA
[HKEY_LOCAL_MACHINE\SOFTWA
"TargetGroup"="Windows"
"TargetGroupEnabled"=dword
"WUServer"="http://selby1:8530/"
"WUStatusServer"="http://selby1:8530/"
[HKEY_LOCAL_MACHINE\SOFTWA
"AUOptions"=dword:00000004
"AutoInstallMinorUpdates"=
"DetectionFrequency"=dword
"DetectionFrequencyEnabled
"NoAutoRebootWithLoggedOnU
"NoAutoUpdate"=dword:00000
"RebootRelaunchTimeoutEnab
"RebootRelaunchTimeout"=dw
"RescheduleWaitTime"=dword
"RescheduleWaitTimeEnabled
"ScheduledInstallDay"=dwor
"ScheduledInstallTime"=dwo
"UseWUServer"=dword:000000
As can see i already tried
Cheers all
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Sorry it is a registary file
ASKER
File is called wsus.reg
You just need to make sure you have a separate batch file which JUST contains the line:
Regedit /s wsus.reg
and then providing your registry file is in the right format and works by running it directly (double clicking on it), you should have no problems.
Also, do you have administrator rights on the machine you are using? If not, then that could be the problem!
-Chris-
Regedit /s wsus.reg
and then providing your registry file is in the right format and works by running it directly (double clicking on it), you should have no problems.
Also, do you have administrator rights on the machine you are using? If not, then that could be the problem!
-Chris-
ASKER
Ok it does not look like it running the reg file to me
ASKER
But it is, my bad i removed the silent switich and it worked
cheers all
cheers all
ASKER
Can the reg file be merged into the bat file at all?
ASKER
Bit more info, i trying to deploy over network and the software i got will only work on one file
Hi again Dann47,
The reg file could be put into a BAT file directly, but its not very easy and a bit messy.
I would say keep it as a seperate file, OR you could do it with VBSCRIPT. If you know how to do that, I have used it for registry entries before and you could create a single .VBS file with that. (See https://www.experts-exchange.com/questions/21576219/VBScript-for-registry-editng.html)
As far as distributing over the network goes, I have done this by putting the .REG file into a shared folder on the server, and pointing the batch file to this location for the .reg file. Then all the Workstations have to do is to run the batch file.
Hope this helps.
-Chris-
The reg file could be put into a BAT file directly, but its not very easy and a bit messy.
I would say keep it as a seperate file, OR you could do it with VBSCRIPT. If you know how to do that, I have used it for registry entries before and you could create a single .VBS file with that. (See https://www.experts-exchange.com/questions/21576219/VBScript-for-registry-editng.html)
As far as distributing over the network goes, I have done this by putting the .REG file into a shared folder on the server, and pointing the batch file to this location for the .reg file. Then all the Workstations have to do is to run the batch file.
Hope this helps.
-Chris-
ASKER
Take it admend
Regedit /s myregistryfile.reg
to the location?
eg
Regedit /s \\server\share.reg?
Regedit /s myregistryfile.reg
to the location?
eg
Regedit /s \\server\share.reg?
Yeh thats right, just make sure that everyone has read and execute rights to that .reg file. Otherwise should be fine.
Good luck
-Chris-
Good luck
-Chris-
ASKER
Cheers will test shortly and allocate points to ya
You asked about incorporating the registry entries into the batch file itself. If you are going to be running it on all Windows XP machines then you can use the REG command to accomplish this. For example:
REG ADD HKLM\SOFTWARE\Policies\Mic rosoft\Win dows\Windo wsUpdate /v TargetGroup /t REG_SZ /d Windows
REG ADD HKLM\SOFTWARE\Policies\Mic rosoft\Win dows\Windo wsUpdate /v TargetGroupEnabled /t REG_DWORD /d 00000001
REG ADD HKLM\SOFTWARE\Policies\Mic rosoft\Win dows\Windo wsUpdate /v WUServer /t REG_SZ /d http://selby1:8530/
REG ADD HKLM\SOFTWARE\Policies\Mic rosoft\Win dows\Windo wsUpdate /v WUStatusServer /t REG_SZ /d http://selby1:8530/
This command does not work on Windows 2000 however.
REG ADD HKLM\SOFTWARE\Policies\Mic
REG ADD HKLM\SOFTWARE\Policies\Mic
REG ADD HKLM\SOFTWARE\Policies\Mic
REG ADD HKLM\SOFTWARE\Policies\Mic
This command does not work on Windows 2000 however.
Shift-3 has a good soultion if you want it done with only a batch file. The only addition I would suggest is adding a "/f" (without quotes) to the end of each Reg Add line so if the value exists it won't pause to ask if you want to overwrite the value.
Krompton
Krompton
dann47, if you have an Active Directory domain you can do it using Group Policy.
Here you can download the "wuau.adm" template
http://www.microsoft.com/downloads/info.aspx?na=46&p=7&SrcDisplayLang=en&SrcCategoryId=&SrcFamilyId=92759D4B-7112-4B6C-AD4A-BBF3802A5C9B&u=http%3a%2f%2fdownload.microsoft.com%2fdownload%2f3%2f0%2f2%2f302167b8-9307-419c-98dc-9098787052db%2fadmFiles_WindowsServer2003SP1.msi&oRef=http%3a%2f%2fwww.google.com.cu%2fsearch%3fhl%3den%26q%3d%22wuau.adm%22%2bdownload%26btnG%3dGoogle%2bSearch
Here you can download the "wuau.adm" template
http://www.microsoft.com/downloads/info.aspx?na=46&p=7&SrcDisplayLang=en&SrcCategoryId=&SrcFamilyId=92759D4B-7112-4B6C-AD4A-BBF3802A5C9B&u=http%3a%2f%2fdownload.microsoft.com%2fdownload%2f3%2f0%2f2%2f302167b8-9307-419c-98dc-9098787052db%2fadmFiles_WindowsServer2003SP1.msi&oRef=http%3a%2f%2fwww.google.com.cu%2fsearch%3fhl%3den%26q%3d%22wuau.adm%22%2bdownload%26btnG%3dGoogle%2bSearch
ASKER
Sorry about Delay, been on holiday - here some advice, dont go to pahos!!
wpadron, do not like the active domain route, it does not work on our server for some reason, never had chance to disrupt the company and look into it.
Shift 3 - Looks good, will try
wpadron, do not like the active domain route, it does not work on our server for some reason, never had chance to disrupt the company and look into it.
Shift 3 - Looks good, will try
regedit /S changes.reg
Is that correct?
the /S is the switch that suppresses the "are you sure" confirmation box.
Jeff