Page 1 of 1 1
Topic Options
#42884 - 2003-07-16 10:56 AM WRITEVALUE and " "
include Offline
Lurker

Registered: 2003-07-16
Posts: 2
Loc: Sweden
Hi, I am really stuck… this is my problem.
I want to write to the registry with the function WRITEVALUE. but the value has quotation marks in it and WRITEVALUE gets confused. Here is the Key and value i want to write to the registry.
KEY: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
Value ”bgino” "c:\program files\bginfo\bginfo" "/ic:\program files\bginfo\config.bgi" /timer:0
Please help me…

Best regards

Include
_________________________
Humans is an resource, exploit it. - My Boss....

Top
#42885 - 2003-07-16 11:10 AM Re: WRITEVALUE and " "
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
it's long time when last played with registry.
anyway, try this:
code:
$returncode=writevalue("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run","bgino",'"c:\program files\bginfo\bginfo" "/ic:\program files\bginfo\config.bgi" /timer:0',"REG_SZ")

_________________________
!

download KiXnet

Top
#42886 - 2003-07-16 11:12 AM Re: WRITEVALUE and " "
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
btw, you had curly quotes in your text.
you should make sure that those don't exist in your code or you will end up with more problems.
anyway, those do come almost only when editing stuff with word which is not preferable tool for anything.
_________________________
!

download KiXnet

Top
#42887 - 2003-07-16 11:25 AM Re: WRITEVALUE and " "
include Offline
Lurker

Registered: 2003-07-16
Posts: 2
Loc: Sweden
Lonkero, thanx...alot.

Best Regards

Include
_________________________
Humans is an resource, exploit it. - My Boss....

Top
#42888 - 2003-07-16 03:42 PM Re: WRITEVALUE and " "
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Both issues, curlies and quotes in quotes, are covered by FAQs.
Topic: Curly quotes “ and ”
Topic: Proper use of quotes

A search on the word "quotes" would have revealed both and then some.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#42889 - 2003-07-16 03:51 PM Re: WRITEVALUE and " "
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
That is why I am advocating to ONLY use single quotes ' as string delimiters and to reserve double quotes " to encapsulate long filenames only.
_________________________
There are two types of vessels, submarines and targets.

Top
#42890 - 2003-07-16 09:26 PM Re: WRITEVALUE and " "
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
jens, what is why?
_________________________
!

download KiXnet

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 1067 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.058 seconds in which 0.028 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org