Page 1 of 1 1
Topic Options
#190400 - 2008-10-30 01:57 PM Registry Entry
Marc_Jacobs Offline
Just in Town

Registered: 2008-10-30
Posts: 4
I have searched all over these forums and the internet to find and answer but have turned up nothing. I am trying to include a registry entry in my logon script. No problem, right? The registry entry is for a license server for a piece of software we run. When I put @licsrv01; in the registry for the entry, it works. When I put that in the kix script and check the registry, it comes up as <unidentified licsrv01;. For some reason the @ symbol comes up as unidentified. I have tried the following:

WriteValue("HKEY_LOCAL_MACHINE\SOFTWARE\FLEXlm License Manager\", "ADSKFLEX_LICENSE_FILE", "@licsrv01;", "REG_SZ")
WriteValue("HKEY_LOCAL_MACHINE\SOFTWARE\FLEXlm License Manager\", "ADSKFLEX_LICENSE_FILE", "'@licsrv01;'", "REG_SZ")<--Double quotes with single quotes inside
WriteValue("HKEY_LOCAL_MACHINE\SOFTWARE\FLEXlm License Manager\", "ADSKFLEX_LICENSE_FILE", "licsrv01;", "REG_SZ")
WriteValue("HKEY_LOCAL_MACHINE\SOFTWARE\FLEXlm License Manager\", "ADSKFLEX_LICENSE_FILE", "licsrv01", "REG_SZ")

Does anyone know how I can get the @ symbol to be inserted before the license server name? Thanks in advance for any help.

Top
#190401 - 2008-10-30 02:27 PM Re: Registry Entry [Re: Marc_Jacobs]
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
Check the manual for reserved characters. The @ symbol is used for the built in Macro's and you have to escape it, or use the CHR() code to insert it.

If you are unsure what I mean by either of those options, let us know.
_________________________
Today is the tomorrow you worried about yesterday.

Top
#190402 - 2008-10-30 02:27 PM Re: Registry Entry [Re: Marc_Jacobs]
eriqjaffe Offline
Hey THIS is FUN

Registered: 2004-06-24
Posts: 214
Loc: Arlington Heights, IL USA
Or you can add the following to the beginning of your script:

 Code:
$ = SetOption("NoMacrosInStrings","ON")

That will ensure that any @ symbols inside a string won't be parsed as macros.


Edited by eriqjaffe (2008-10-30 02:28 PM)

Top
#190403 - 2008-10-30 02:28 PM Re: Registry Entry [Re: Marc_Jacobs]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
The @ character in kix is used for macro's. I always look at them as predefined variables. Kix does not know the @licsrv01 macro. What you could do is use Setoption ("NoMacrosInStrings", "On") at the top of the script or double up on the @ character so you get @@licsrv01. The last one is a quick and dirty workaround.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#190404 - 2008-10-30 02:31 PM Re: Registry Entry [Re: Marc_Jacobs]
BradV Offline
Seasoned Scripter
****

Registered: 2006-08-16
Posts: 687
Loc: Maryland, USA
 Quote:
Note: The characters @, %, or $ are normally used to indicate macros, environment strings, or variables. If you want to use these characters in a string, use @@, %%, or $$.


Hope that helps! \:\)

Regards,

Brad


Edited by BradV (2008-10-30 02:31 PM)
Edit Reason: Man, everyone was faster than me!

Top
#190405 - 2008-10-30 02:45 PM Re: Registry Entry [Re: BradV]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4402
Loc: New Jersey
Hey Marc, Welcome to KORG...

Looks like the assimilation has begun! \:D

Glenn

PS - what everyone else said, too...
_________________________
Actually I am a Rocket Scientist! \:D

Top
#190406 - 2008-10-30 04:06 PM Re: Registry Entry [Re: Glenn Barnas]
Benny69 Offline
Moderator
*****

Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
Hi Marc, Welcome to the Hive

Like Glenn said, “Resistance is Futile”
_________________________
Wait don't order yet,... get KiXforms Designer .NET 2.0 (Beta)
KiXforms Designer .NET 2.0 (Beta)

Top
#190414 - 2008-10-30 09:15 PM Re: Registry Entry [Re: Benny69]
Marc_Jacobs Offline
Just in Town

Registered: 2008-10-30
Posts: 4
Y'all are all so smart! I tried both ways (NoMacros and @@) and they both worked. Are there any cons to using the @@? The reason I ask is because I have an @USERID to exclude someone from this update, so the @@ is easier. Thanks for the quick replies and getting me fixed up. I'm still new to the whole KixTart experience but I'm loving it.
Top
#190417 - 2008-10-30 10:05 PM Re: Registry Entry [Re: Marc_Jacobs]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
easier?
what you mean?
the nomacrosinstrings, means, you can't use macro's inside quoted strings. it doesn't mean, you can't use them at all.
_________________________
!

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
1 registered (Allen) and 363 anonymous users online.
Newest Members
Sir_Barrington, batdk82, StuTheCoder, M_Moore, BeeEm
17886 Registered Users

Generated in 0.063 seconds in which 0.026 seconds were spent on a total of 13 queries. Zlib compression enabled.

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