Page 1 of 1 1
Topic Options
#14053 - 2001-11-08 10:21 PM WriteValue
Anonymous
Unregistered


I'm getting an error while trying to make some Registry changes, my code is as follows:

code:

WRITEVALUE("\\$Machine\HKEY_LOCAL_MACHINE\Software\Microsoft\NAL\CLIENT","Use Preferred Servers","1","REG_DWORD")

WRITEVALUE("\\$Machine\HKEY_LOCAL_MACHINE\Software\Microsoft\NAL\Client\AbExprtDb\DP List for site 200","MSWNET:["SMS_SITE=200"]\\SMSServer\SMSPKGD$\","", "REG_SZ")


The first entry works, but the second one is coming up with an error, and the only thing I can think that would be causing this is the quotes with in expression section.

Thoughts?
Thanks
Michele

Top
#14054 - 2001-11-08 10:24 PM Re: WriteValue
Anonymous
Unregistered


Are the keys in the Registry case-sensitive? I don't know for sure, but I see that in the first line CLIENT is uppercase, but i the second Client is both.
Top
#14055 - 2001-11-08 10:27 PM Re: WriteValue
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
yap - definitely your quotes - try wrapping this string :

"MSWNET:["SMS_SITE=200"]\\SMSServer\SMSPKGD$\"

like this

'MSWNET:["SMS_SITE=200"]\\SMSServer\SMSPKGD$\'

single quotes around that ...

-Shawn

Top
#14056 - 2001-11-08 10:31 PM Re: WriteValue
Anonymous
Unregistered


Shawn,

What exactly are the differences between single and double quotes?

Top
#14057 - 2001-11-08 10:38 PM Re: WriteValue
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Martijn,

No difference really - one can wrap a string in single or double quotes - doesn't really matter...

Where it does matter (bigtime) is when we're trying to specify quotes within strings - if string contains single quotes - wrap in double quotes - if string contains double quotes (the usual case), wrap in single quotes ... it just helps KiXtart with the parsing bit ... now how would one wrap a string that contained both single and double quotes - probably would need a bit of string addition for that ?

-Shawn

[ 08 November 2001: Message edited by: Shawn ]

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 931 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.046 seconds in which 0.029 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