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?

Noel
  • 111
  • Which of the linked solution(s) did you try? – Ƭᴇcʜιᴇ007 Apr 19 '11 at 23:37
  • And is Start|Run picking up a different cmd.exe? – Rhys Gibson Apr 19 '11 at 23:40
  • "This works a treat if the command line is started from the command line executable..." - are you referring to command.com? – MrWhite Apr 20 '11 at 07:27
  • @techie007 I linked to the exact solution. – Noel Apr 20 '11 at 17:34
  • @Rhys & w3d I rephrased the question, hopefully the edit answers your questions. Not using command.com – Noel Apr 20 '11 at 17:35
  • @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 Apr 20 '11 at 17:38
  • @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 Apr 20 '11 at 17:49
  • @techie007 good catch, and I actually did set both. – Noel Apr 20 '11 at 19:04
  • 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 Apr 28 '11 at 22:58

0 Answers0