batch for registry

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
lala
Posts: 6
Joined: 08 Mar 2011 12:53

batch for registry

#1 Post by lala » 08 Mar 2011 13:33

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.

aGerman
Expert
Posts: 4678
Joined: 22 Jan 2010 18:01
Location: Germany

Re: batch for registry

#2 Post by aGerman » 08 Mar 2011 13:38

What error message did you get?

Regards
aGerman

lala
Posts: 6
Joined: 08 Mar 2011 12:53

Re: batch for registry

#3 Post by lala » 08 Mar 2011 13:39

no message
the window appear then go
i do not why

aGerman
Expert
Posts: 4678
Joined: 22 Jan 2010 18:01
Location: Germany

Re: batch for registry

#4 Post by aGerman » 08 Mar 2011 13:44

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

lala
Posts: 6
Joined: 08 Mar 2011 12:53

Re: batch for registry

#5 Post by lala » 08 Mar 2011 13:47

sorry
the same result
window appear then go
have any idea

aGerman
Expert
Posts: 4678
Joined: 22 Jan 2010 18:01
Location: Germany

Re: batch for registry

#6 Post by aGerman » 08 Mar 2011 14:01

No idea. It works for me.

Regards
aGerman

lala
Posts: 6
Joined: 08 Mar 2011 12:53

Re: batch for registry

#7 Post by lala » 08 Mar 2011 14:05

my dos version 5.1.2600
maby must be anthor version

aGerman
Expert
Posts: 4678
Joined: 22 Jan 2010 18:01
Location: Germany

Re: batch for registry

#8 Post by aGerman » 08 Mar 2011 14:21

No, that's your Windows version. It means "Windows XP" and thats why it should work.

Regards
aGerman

lala
Posts: 6
Joined: 08 Mar 2011 12:53

Re: batch for registry

#9 Post by lala » 08 Mar 2011 23:30

thank you very much for replay

Post Reply