A Windows XP help forum. PCbanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » PCbanter forum » Microsoft Windows XP » Windows XP Help and Support
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

comment inside a reg key's string value?



 
 
Thread Tools Display Modes
  #1  
Old January 31st 13, 10:24 AM posted to microsoft.public.windowsxp.help_and_support
Harry Davis
external usenet poster
 
Posts: 3
Default comment inside a reg key's string value?

Hello,

I am using a string value in

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Curr entVersion\Run

to control whether a program starts at boot.

Is it possible and safe to comment the value data in and out, e.g. to have

"C:\Path\program.exe"

as the data, and then, when not wanting the program to start at next boot,
putting in a ";", i.e. changing the date to

;"C:\Path\program.exe"

?

Or maybe there is a better way to do this, requiring equally little typing?

Thanks in advance!

Harry
Ads
  #2  
Old January 31st 13, 03:28 PM posted to microsoft.public.windowsxp.help_and_support
VanguardLH[_2_]
external usenet poster
 
Posts: 10,881
Default comment inside a reg key's string value?

"Harry Davis" wrote:

I am using a string value in

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Curr entVersion\Run

to control whether a program starts at boot.

Is it possible and safe to comment the value data in and out, e.g. to have

"C:\Path\program.exe"

as the data, and then, when not wanting the program to start at next boot,
putting in a ";", i.e. changing the date to

;"C:\Path\program.exe"

?

Or maybe there is a better way to do this, requiring equally little typing?


Why not just use the msconfig.exe utility already provided in Windows to
enable/disable startup items?
  #3  
Old January 31st 13, 07:01 PM posted to microsoft.public.windowsxp.help_and_support
Harry Davis
external usenet poster
 
Posts: 3
Default comment inside a reg key's string value?

VanguardLH wrote in :

"Harry Davis" wrote:

I am using a string value in

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Curr entVersion\Run

to control whether a program starts at boot.

Is it possible and safe to comment the value data in and out, e.g. to
have

"C:\Path\program.exe"

as the data, and then, when not wanting the program to start at next
boot, putting in a ";", i.e. changing the date to

;"C:\Path\program.exe"

?

Or maybe there is a better way to do this, requiring equally little
typing?


Why not just use the msconfig.exe utility already provided in Windows
to enable/disable startup items?


Thanks for this suggestion, which I may use. For the record, typing "-",
without the inverted commas, before the path in the value data seems to
disable the program from starting at boot. Curiously, when it does that,
the program still shows up as enabled in msconfig.

Harry
  #4  
Old January 31st 13, 07:31 PM posted to microsoft.public.windowsxp.help_and_support
David H. Lipman
external usenet poster
 
Posts: 4,185
Default comment inside a reg key's string value?

From: "Harry Davis"

VanguardLH wrote in :

"Harry Davis" wrote:

I am using a string value in

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Curr entVersion\Run

to control whether a program starts at boot.

Is it possible and safe to comment the value data in and out, e.g. to
have

"C:\Path\program.exe"

as the data, and then, when not wanting the program to start at next
boot, putting in a ";", i.e. changing the date to

;"C:\Path\program.exe"

?

Or maybe there is a better way to do this, requiring equally little
typing?


Why not just use the msconfig.exe utility already provided in Windows
to enable/disable startup items?


Thanks for this suggestion, which I may use. For the record, typing "-",
without the inverted commas, before the path in the value data seems to
disable the program from starting at boot. Curiously, when it does that,
the program still shows up as enabled in msconfig.

Harry


That's because you are introducing a syntax error where the FQNP is not
interpreted and the file is subsequently not executed. To MSCONFIG nothing
has changed. All you have done is introduce a bug the blocks an entry's
execution. In effect, you are mucking with the Registry and this is
contraindicated. If you don't know and fully understand what you are doing
in the Registry then you should not be modifying it.

--
Dave
Multi-AV Scanning Tool - http://multi-av.thespykiller.co.uk
http://www.pctipp.ch/downloads/dl/35905.asp

  #5  
Old February 1st 13, 09:23 AM posted to microsoft.public.windowsxp.help_and_support
Harry Davis
external usenet poster
 
Posts: 3
Default comment inside a reg key's string value?

"David H. Lipman" wrote in
:

From: "Harry Davis"

VanguardLH wrote in
:

"Harry Davis" wrote:

I am using a string value in

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Curr entVersion\Run

to control whether a program starts at boot.

Is it possible and safe to comment the value data in and out, e.g.
to have

"C:\Path\program.exe"

as the data, and then, when not wanting the program to start at
next boot, putting in a ";", i.e. changing the date to

;"C:\Path\program.exe"

?

Or maybe there is a better way to do this, requiring equally little
typing?

Why not just use the msconfig.exe utility already provided in
Windows to enable/disable startup items?


Thanks for this suggestion, which I may use. For the record, typing
"-", without the inverted commas, before the path in the value data
seems to disable the program from starting at boot. Curiously, when
it does that, the program still shows up as enabled in msconfig.


That's because you are introducing a syntax error where the FQNP is
not interpreted and the file is subsequently not executed. To
MSCONFIG nothing has changed. All you have done is introduce a bug
the blocks an entry's execution. In effect, you are mucking with the
Registry and this is contraindicated. If you don't know and fully
understand what you are doing in the Registry then you should not be
modifying it.


Thanks for this. Isn't one person's commenting out, which achieves the
desired goal and doesn't have any ill effects, another person's syntax
error here, though?

It seems standard to put "-" in the value data, so presumably nothing
after the "-" is looked at? I.e. straightforward commenting out? I should
be congratulated for working this one out, surely? :-)

Harry
  #6  
Old February 1st 13, 01:02 PM posted to microsoft.public.windowsxp.help_and_support
David H. Lipman
external usenet poster
 
Posts: 4,185
Default comment inside a reg key's string value?

From: "Harry Davis"


That's because you are introducing a syntax error where the FQNP is
not interpreted and the file is subsequently not executed. To
MSCONFIG nothing has changed. All you have done is introduce a bug
the blocks an entry's execution. In effect, you are mucking with the
Registry and this is contraindicated. If you don't know and fully
understand what you are doing in the Registry then you should not be
modifying it.


Thanks for this. Isn't one person's commenting out, which achieves the
desired goal and doesn't have any ill effects, another person's syntax
error here, though?

It seems standard to put "-" in the value data, so presumably nothing
after the "-" is looked at? I.e. straightforward commenting out? I should
be congratulated for working this one out, surely? :-)

Harry


No. You should not be congratulated for "mucking" with the Registry and you have not
commenting out the string.

A string that is identified to be a comment is ignored and is only meant for human
interpretation.

A string with a syntax error is interpreted by the OS but fails to work as expected
because of the introduced error. Editing the Registry to achieve such actions can and may
lead to unintended, negative, consequences.


--
Dave
Multi-AV Scanning Tool - http://multi-av.thespykiller.co.uk
http://www.pctipp.ch/downloads/dl/35905.asp


  #7  
Old February 1st 13, 08:05 PM posted to microsoft.public.windowsxp.help_and_support
VanguardLH[_2_]
external usenet poster
 
Posts: 10,881
Default comment inside a reg key's string value?

"Harry Davis" wrote:

VanguardLH wrote in :

"Harry Davis" wrote:

I am using a string value in

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Curr entVersion\Run

to control whether a program starts at boot.

Is it possible and safe to comment the value data in and out, e.g. to
have

"C:\Path\program.exe"

as the data, and then, when not wanting the program to start at next
boot, putting in a ";", i.e. changing the date to

;"C:\Path\program.exe"

?

Or maybe there is a better way to do this, requiring equally little
typing?


Why not just use the msconfig.exe utility already provided in Windows
to enable/disable startup items?


Thanks for this suggestion, which I may use. For the record, typing "-",
without the inverted commas, before the path in the value data seems to
disable the program from starting at boot. Curiously, when it does that,
the program still shows up as enabled in msconfig.


msconfig, SysInternal's AutoRuns, and other similar utilities that
"disable" items do so by MOVING them out of the normal startup location
and hiding them in a storage key reserved by the utility to hold the old
entries. When you disable, you MOVE the startup item to this holding
area. When you later re-enable an item, you MOVE it from the holding
area back to its normal startup location. Only if you use the config
utility to delete a startup item (not available in msconfig) does the
item actually wholly disappear from the registry.

Anything that makes impossible finding the target of a startup item will
work, as you've noticed. You could rename the folder where resides the
executable file. You could rename file.exe to file.exx in the startup
item. You could change "C:\file.exe" to "?:\file.exe". You are
introducing an error in the parser that tries to determine what to run
(which is the executable and which are parameters to the program).

Have you tried rebooting Windows to ensure that you don't get some popup
telling you that the startup item could not be found? Or some
mysterious instance of Windows Explorer loads when you login? Stick
with moving out the items you want to disable (and moving them back when
you want to re-enable), like using msconfig, AutoRuns, or another
startup tweaker.
  #8  
Old February 3rd 13, 12:58 PM posted to microsoft.public.windowsxp.help_and_support
glee
external usenet poster
 
Posts: 1,794
Default comment inside a reg key's string value?

"Harry Davis" wrote in message
...

Thanks for this. Isn't one person's commenting out, which achieves the
desired goal and doesn't have any ill effects, another person's syntax
error here, though?

It seems standard to put "-" in the value data, so presumably nothing
after the "-" is looked at? I.e. straightforward commenting out? I
should
be congratulated for working this one out, surely? :-)



LOL.... you haven't "discovered" anything new. Using the "-" has been a
standard since it was "discovered" nearly 15 years ago, and has been
documented ever since.

Congratulations on stumbling upon something you could have learned
through a web search much faster!
;-)

--
Glen Ventura
MS MVP Oct. 2002 - Sept. 2009
CompTIA A+

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off






All times are GMT +1. The time now is 07:30 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 PCbanter.
The comments are property of their posters.