Page 1 of 1

batch for registry

Posted: 08 Mar 2011 13:33
by lala
HI ALL
i have aproblem with batch
reg ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /f /v "wrar1" /t "REG_SZ" /d "C:\Documents and Settings\user1\desktop\wrar.exe"

it is working in prompt but in batch do not work
what is wrong ??

thanks.

Re: batch for registry

Posted: 08 Mar 2011 13:38
by aGerman
What error message did you get?

Regards
aGerman

Re: batch for registry

Posted: 08 Mar 2011 13:39
by lala
no message
the window appear then go
i do not why

Re: batch for registry

Posted: 08 Mar 2011 13:44
by aGerman
Append a PAUSE command

Code: Select all

@echo off
reg ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v "wrar1" /t "REG_SZ" /d "C:\Documents and Settings\user1\desktop\wrar.exe" /f
pause

Regards
aGerman

Re: batch for registry

Posted: 08 Mar 2011 13:47
by lala
sorry
the same result
window appear then go
have any idea

Re: batch for registry

Posted: 08 Mar 2011 14:01
by aGerman
No idea. It works for me.

Regards
aGerman

Re: batch for registry

Posted: 08 Mar 2011 14:05
by lala
my dos version 5.1.2600
maby must be anthor version

Re: batch for registry

Posted: 08 Mar 2011 14:21
by aGerman
No, that's your Windows version. It means "Windows XP" and thats why it should work.

Regards
aGerman

Re: batch for registry

Posted: 08 Mar 2011 23:30
by lala
thank you very much for replay