DUA set value in registry script

  • Thread starter Thread starter danis
  • Start date Start date
D

danis

Hello!

I would like to modify some values in the registry, using DUA script.
The problem I have is that is not working, the value is not modified.
Here is my script, that I used:

REGSETVALUE,,HKEY_LOCAL_MACHINE,,SYSTEM\CurrentControlSet\Services
\Tcpip\Parameters,,AutonetRetries,DAREG_DWORD_LITTLE_ENDIAN,100

What is the error?

If I delete the value, and create it again and after that set the
value data, then it works. But the value is already on the deployed
systems, so I cannot create it.
All I want to do is to modify it. Any sugestions?

Thanks!
 
Try this, it work for me:

REGSETVALUE,,HKEY_LOCAL_MACHINE,,SYSTEM\CurrentControlSet\Services\Tcpip\Parameters,,AutonetRetries,4,100

DUA seems weird with DWORD, no problem when using the value instead.

4 = REG_DWORD

/Peter
 
Thanks!

Some other thing I've noticed, and I don't know why is like that:
after it runs a script, if I copy back the same script again, it will
not run it anymore; nor any script.
Have something similar happened to you? I've tried deleting the
temporary folder, so that it will create it again, I've tried not
deleting the temporary folder, but still the same problem, next
scripts will not run.

Any ideas?
 
Sounds like your dua script modify the DUA poll path.. else you will be able
to download the same script again and again.

Try to post all lines in your .dus file or make sure you only have one line:
REGSETVALUE and nothing else.

Not sure i completely understand your issue with "copy back" if your script
is located on a server you just need to restart the service to download it
again, if DUA is configured to "Poll on Start"

/Peter

Thanks!

Some other thing I've noticed, and I don't know why is like that:
after it runs a script, if I copy back the same script again, it will
not run it anymore; nor any script.
Have something similar happened to you? I've tried deleting the
temporary folder, so that it will create it again, I've tried not
deleting the temporary folder, but still the same problem, next
scripts will not run.

Any ideas?
 
This is another script that I used:

// DUAScriptGen V1.1 Script File
// (C) Microsoft Corporation


// **** FILE OPERATIONS BEGIN ***

// ***********************************************************
// EXECUTEPROCESS
// Source - c:\Dua\RegUpdater.exe
// Command line parameters -
// Wait on exit - yes
// Wait time - 4294967295 (infinite)
// Working directory - c:\Dua

EXECUTEPROCESS,,,,c:\Dua\RegUpdater.exe,,,DAYES,
4294967295,,DASEC_REV,,,,DASEC_REV,,,,,,c:\Dua,1,,WinSta0\Default

// **** FILE OPERATIONS END ***

// **** REGISTRY OPERATIONS BEGIN ***

// **** REGISTRY OPERATIONS END ***

REGCREATEKEY,,HKEY_LOCAL_MACHINE,,SYSTEM\CurrentControlSet\Services
\DUAgent\Parameters\Config\Sessions
\0000,DAREG_OPTION_NON_VOLATILE,KEY_ALL_ACCESS
REGSETVALUE,,HKEY_LOCAL_MACHINE,,SYSTEM\CurrentControlSet\Services
\DUAgent\Parameters\Config\Sessions\0000,,CmdFile,DAREG_SZ,script2.dup

REBOOT,,DAREBOOTOPT_REBOOT

// Created by DUAScriptGen v1.1.0011 (February 7, 2008)

It worked once, but after that it didn't. DUAgent started, but did not
runned the script, or had some exception, I don't know or sure.
I'm not
 
I guess this line from DuaScriptGen messsed up the things:
REGSETVALUE,,HKEY_LOCAL_MACHINE,,SYSTEM\CurrentControlSet\Services
\DUAgent\Parameters\Config\Sessions\0000,,CmdFile,DAREG_SZ,script2.dup

I've tried without those 2 lines, on a fresh image, and it works each
time.

Thanks for the help.
Have a great day!
 
Is your script named "script1.dup"?

Your script change the poll location to "script2.dup" this way it won't
download script1 twice.

"REGSETVALUE,,HKEY_LOCAL_MACHINE,,SYSTEM\CurrentControlSet\Services\DUAgent\Parameters\Config\Sessions\0000,,CmdFile,DAREG_SZ,script2.dup"

Try outcomment this line with "//" then you can download the script again
and again doing testing.

/Peter



This is another script that I used:

// DUAScriptGen V1.1 Script File
// (C) Microsoft Corporation


// **** FILE OPERATIONS BEGIN ***

// ***********************************************************
// EXECUTEPROCESS
// Source - c:\Dua\RegUpdater.exe
// Command line parameters -
// Wait on exit - yes
// Wait time - 4294967295 (infinite)
// Working directory - c:\Dua

EXECUTEPROCESS,,,,c:\Dua\RegUpdater.exe,,,DAYES,
4294967295,,DASEC_REV,,,,DASEC_REV,,,,,,c:\Dua,1,,WinSta0\Default

// **** FILE OPERATIONS END ***

// **** REGISTRY OPERATIONS BEGIN ***

// **** REGISTRY OPERATIONS END ***

REGCREATEKEY,,HKEY_LOCAL_MACHINE,,SYSTEM\CurrentControlSet\Services
\DUAgent\Parameters\Config\Sessions
\0000,DAREG_OPTION_NON_VOLATILE,KEY_ALL_ACCESS
REGSETVALUE,,HKEY_LOCAL_MACHINE,,SYSTEM\CurrentControlSet\Services
\DUAgent\Parameters\Config\Sessions\0000,,CmdFile,DAREG_SZ,script2.dup

REBOOT,,DAREBOOTOPT_REBOOT

// Created by DUAScriptGen v1.1.0011 (February 7, 2008)

It worked once, but after that it didn't. DUAgent started, but did not
runned the script, or had some exception, I don't know or sure.
I'm not
 
Back
Top