Windows, Python and Strings
David LeBlanc
whisper at oz.net
Fri Jul 19 15:41:07 EDT 2002
> -----Original Message-----
> From: python-list-admin at python.org
> [mailto:python-list-admin at python.org]On Behalf Of Engel, Gregory
> Sent: Friday, July 19, 2002 12:11
> To: Python List (E-mail)
> Subject: Windows, Python and Strings
>
>
<snip>
> >>> win32service.ChangeServiceConfig(svc, svccfg[0], svccfg[1],
> svccfg[2], svccfg[3], svccfg[4], svccfg[5], 'MSSQLServer',
> 'LocalSystem', '', "Green Bar Queue Manager")
>
> This also executes without error. When I look at the Registry,
> the value shows as "M S S Q L S e r v e r" rather than
> "MSSQLServer" so the dependency fails. If I use the MS tool, sc.exe:
>
> sc config TestQueueMgrSvc depend= "MSSQLServer"
>
> the Registry value correctly shows as "MSSQLServer". I've tried
> a number of approaches to resolving this with no luck. It
> doesn't appear to be a encoding issue.
It's almost certainly an encoding issue: "t e x t l i k e t h i s" is how
Unicode displays in ascii. The "blanks" are the upper 8 bits of a (16 bit)
unicode character seen as a separate (ascii?) character.
> The method requires a string parameter. The Registry stores the
> value as binary data. What am I missing? Is there something I
> don't understand about how to use this method?
AFAIK, the registry stores both string and typed binary data...
> Many Thanks.
>
> C'ya,
>
> Gregory Engel
> Senior Software Engineer
> Professional Services
> CSG Systems, Inc.
> 9555 Maroon Circle
> Englewood, CO 80112
> Voice: 303-200-3426
Dave LeBlanc
Seattle, WA USA
More information about the Python-list
mailing list