1
I have a batch file set to load up when the Windows XP command line (cmd.exe) starts (using the registry key Command Processor as detailed).
Unexpectedly, the batch file only runs under certain conditions, based on how the command line is started.
If the command line is started from Start|All Programs|Accessories|Command Prompt
, the batch file runs.
If the command line is started from Start|Run|cmd
or Start|Run|cmd.exe
or via a ssh session through WinSSHD, the batch file does not run.
Is there a way to make the autorun work in all cases?
Which of the linked solution(s) did you try? – Ƭᴇcʜιᴇ007 – 2011-04-19T23:37:41.600
And is Start|Run picking up a different cmd.exe? – Rhys Gibson – 2011-04-19T23:40:29.133
"This works a treat if the command line is started from the command line executable..." - are you referring to command.com? – MrWhite – 2011-04-20T07:27:46.710
@techie007 I linked to the exact solution. – Noel – 2011-04-20T17:34:38.783
@Rhys & w3d I rephrased the question, hopefully the edit answers your questions. Not using command.com – Noel – 2011-04-20T17:35:44.553
@Rhys just realized what you were asking. I'm not sure how to answer definitively. Suggestions? The task manager shows the process as
cmd.exe
in every case. – Noel – 2011-04-20T17:38:43.113@Noel - In the answer under the one you tried, they meniton one difference that may be what you're running into. The answer you linked suggests changing the HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun value. The one below suggests also changing the HKEY_LOCAL_MACHINE one as well. Just a thought. :) – Ƭᴇcʜιᴇ007 – 2011-04-20T17:49:17.813
@techie007 good catch, and I actually did set both. – Noel – 2011-04-20T19:04:54.333
Maybe try one of the other solutions then? Or have a good read of http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/cmd.mspx?mfr=true which is the definitive documentation. There's a matching Old New Thing entry here http://blogs.msdn.com/b/oldnewthing/archive/2007/11/21/6447771.aspx that talks about how to check whether it's set. I'd suggest running this from your cmd prompt to see what you're actually picking up in each case
– Rhys Gibson – 2011-04-28T22:58:53.420