Problems setting Key with DUA - Please Help!

M

Mario Dambauer

hi all, I posted this weeks ago, no response, I hope someone can help me...
John Macintyre, hope you will read this post !!! ;-))

I can create Keys in the reg, but when I want to set a value, there is a
problem.
The value is created, but is NOT set!

I have tried several times, but always the same result.
Here is the sample script from the msdn - doesn't work!

REGCREATEKEY,, HKEY_LOCAL_MACHINE ,, SYSTEM\CurrentControlSet\SampleKey ,
DAREG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS

REGSETVALUE,,HKEY_LOCAL_MACHINE,,SYSTEM\CurrentControlSet\SampleKey,,SampleV
alue,DAREG_SZ,,Hello World


I have activated the DUA Logging, it reports:
DUAgent Service - Command: 9 Succeded.
DUAgent Service - Command: 11 Succeded.

I have really no idea whats the problem, any help would be fine!
Thanks in advance.

Mario
 
N

Nikolai Vorontsov

Hi, Peter!

Could someone please help on this issue, please

I have the same issue as Mario, and tried alot of things but the value is
never set :-(

As I see it could be a DUA bug. You can try aviod problem if for
instance put all registry command in to the .reg file and ask DUA to
download this file and execute regedit /s temp.reg

HTH,
Nick
 
M

Mario Dambauer

Hi Nikolai

That works, thanks.
I am wondering, that the MS guys take no action on this thread.
It's clear that this is not a specific bug on my build... Peter has the same
problem.

thanks
mario
 
P

Peter

Nice to hear, we can do this another way, but would like a comment from MS
about this issue

Could you please tell me the command you have used in your DUA script to
excute regedit

Thx

/peter
Mario Dambauer said:
Hi Nikolai

That works, thanks.
I am wondering, that the MS guys take no action on this thread.
It's clear that this is not a specific bug on my build... Peter has the same
problem.

thanks
mario
 
M

Mario Dambauer

Thats interesting, I had/have the same problem with the user interface core!
But now I am using my custom shell, so I cant see a start menü when I launch
the explorer...

have you any errors in your fbalog or event log, so we can look into
possible accordances?!
 
J

John Macintyre [MS]

I am seeing the same results with this command. You could argue that this
is a documentation problem - but I won't make that arguement :) The command
reference should really be

11, [ErrorMode], hKey, [ExpandMode], Key, [ExpandMode], ValueName, Type,
[Size,] Value

A size parameter is only needed for DAREG_NONE, DAREG_BINARY, DAREG_LINK,
DAREG_RESOURCE_LIST, DAREG_MULTI_SZ. For value types that do not require a
size - you should leave out the parameter entirely. DUA will look at the
type and based on this information determine if the next parameter should be
the size or the value. In the command you included DUA sees that the type
is REGSZ and expects the next parameter to be the value. Since the next
value is specified as a null string - DUA assumes this is the value you want
to set and moves on (this is why the command shows as a success). It
ignores anything beyond the last parameter. The real bug is that we should
catch this when you compile your script.

So you will find that this command sets an empty string:
REGSETVALUE,,HKEY_LOCAL_MACHINE,,SYSTEM\CurrentControlSet\SampleKey,,SampleV
alue,DAREG_SZ,,Hello World

Whereas this command actually sets the value:
REGSETVALUE,,HKEY_LOCAL_MACHINE,,SYSTEM\CurrentControlSet\SampleKey,,SampleV
alue,DAREG_SZ,Hello World

Sorry for the confusion.
- John

This posting is provided "AS IS" with no warranties, and confers no rights.
 
M

Mario Dambauer

Great, now it works...

Thanks John!

Mario



John Macintyre said:
I am seeing the same results with this command. You could argue that this
is a documentation problem - but I won't make that arguement :) The command
reference should really be

11, [ErrorMode], hKey, [ExpandMode], Key, [ExpandMode], ValueName, Type,
[Size,] Value

A size parameter is only needed for DAREG_NONE, DAREG_BINARY, DAREG_LINK,
DAREG_RESOURCE_LIST, DAREG_MULTI_SZ. For value types that do not require a
size - you should leave out the parameter entirely. DUA will look at the
type and based on this information determine if the next parameter should be
the size or the value. In the command you included DUA sees that the type
is REGSZ and expects the next parameter to be the value. Since the next
value is specified as a null string - DUA assumes this is the value you want
to set and moves on (this is why the command shows as a success). It
ignores anything beyond the last parameter. The real bug is that we should
catch this when you compile your script.

So you will find that this command sets an empty string:
REGSETVALUE,,HKEY_LOCAL_MACHINE,,SYSTEM\CurrentControlSet\SampleKey,,SampleV
alue,DAREG_SZ,,Hello World

Whereas this command actually sets the value:
REGSETVALUE,,HKEY_LOCAL_MACHINE,,SYSTEM\CurrentControlSet\SampleKey,,SampleV
alue,DAREG_SZ,Hello World

Sorry for the confusion.
- John

This posting is provided "AS IS" with no warranties, and confers no rights.

Peter said:
Hi

Could someone please help on this issue, please

I have the same issue as Mario, and tried alot of things but the value is
never set :-(

/Peter
SYSTEM\CurrentControlSet\SampleKey
REGSETVALUE,,HKEY_LOCAL_MACHINE,,SYSTEM\CurrentControlSet\SampleKey,,SampleV
 
P

Peter

Hi Mario

Have found the solution thanks to Fred :) very weird issue.

"Is your development computer in English?
I had the same behavior (i.e.. "User Interface Core" settings have no
effect) with a French development computer version. I changed my regional
settings to English, and now "User Interface Core" setting work perfectly! I
don't know how regional settings of the development computer can impact on
the final target but it does!!

Hope this help,
Fred."

/Peter
 
M

Mario Dambauer

I have already read the postig....

really funny, that the develop machine settings take an effect on this

mario
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

DUA errors 1
DUA RegSetValue Problem 2
REQUEST: RAM Reg EWF DUA example 1
DUA 1
manually add the DUA Component 1
My Dus Script for Blaster didn't Work Help me 1
DUA Problems. 1
DUA set value in registry script 6

Top