Page 1 of 3
ShellExecute failed. Code 2. Any ideas?
Posted: Sat Jul 23, 2011 2:42 pm
by delticcity
I have just tried to install the S&D dvd, and the DCv3 cd, on my computer this morning and both have resulted in this error. The batch files are not being allowed to install or run. Presumably this is a PC problem? I am running XP sp3 with 3Gb RAM and a 3 GHz processor. My anti-virus is up to date and I have just done a full scan with 0 infections found. Any ideas or help would be really appreciated. Dave.
Re: ShellExecute failed. Code 2. Any ideas?
Posted: Sat Jul 23, 2011 2:51 pm
by ashgray
Hi
I'm not sure what the cause is buy if you type
shellexecute failed:code 2 into Google's search engine and you'll find oads of pages with answers to this problem.
Ash
Re: ShellExecute failed. Code 2. Any ideas?
Posted: Sat Jul 23, 2011 3:25 pm
by delticcity
Hi Ash, thanks for replying so quickly. I worked my way through most of the google threads this morning without finding anything trully helpful, there seem to be two trains of thought- either the exe files are somehow corrupted, or the registry has been attacked by a virus. Since so many people have recently installed the S&D dvd without problems I think I can safely discount that option, and I have completed my own deep scan plus a web-based deep scan without finding any nasties on my system. I'm at a loss what to try next. Dave.
Re: ShellExecute failed. Code 2. Any ideas?
Posted: Sat Jul 23, 2011 3:52 pm
by ashgray
You could try copying the entire contents of the disks to a temporary folder on your hard drive and installing from there - then see if the batch file works.
Ash
Re: ShellExecute failed. Code 2. Any ideas?
Posted: Sat Jul 23, 2011 3:52 pm
by delticcity
I've just noticed something else...........clicking on the installme.bat brings up " Cannot find...........................installme.bat" but this happens in ANY route. Odder and odder. Dave.
Re: ShellExecute failed. Code 2. Any ideas?
Posted: Sat Jul 23, 2011 5:36 pm
by delticcity
I managed to install Dorset Coast onto the family PC and the batch file worked fine so I copied this bat file onto a memory stick and pasted into my Dorset folder on my PC to overwrite the original. Still no joy. Double clicking directly on the file brings up the "Cannot Find C:\Program Files\...........Dorset\Installme.bat" The same thing is happening with my S&D install. Suspicion seems to still lie with "ShellExecute failed. Code 2". Dave.
Incidentally Code 2 refers to a 'file not found' error.
Re: ShellExecute failed. Code 2. Any ideas?
Posted: Sat Jul 23, 2011 5:44 pm
by ashgray
This may seem a daft question, but you DO have all six default routes installed on the PC you're trying to install S&D onto?
Ash
Re: ShellExecute failed. Code 2. Any ideas?
Posted: Sat Jul 23, 2011 6:38 pm
by delticcity
Yes I've got all 6 default routes Ash. None of the batch files in the different routes my Routes folder seem to be visible to the system. Clicking directly on each brings up the 'can't find' message. I suspect maybe a registry issue but don't know enough about it to have a tinker. Dave.
Re: ShellExecute failed. Code 2. Any ideas?
Posted: Sat Jul 23, 2011 6:43 pm
by slipperman12
Hi,
Looking at the Google results, I've got two ideas - but, of course, you may have already tried them
Can you run the installme.bat using the Run as Administrator option? (applies to any other file also)
Do you have NotePad++ installed? If so, disable the 'Run as Administrator' option for it.
And a third point - if you are using Vista or Windows 7, check the settings for UAC.
Cheers,
Ged
Re: ShellExecute failed. Code 2. Any ideas?
Posted: Sat Jul 23, 2011 7:04 pm
by delticcity
Hi Ged, I am running as administrator already, and I'm using XP sp3. I don't quite follow what you mean about notepad. I have got it on my system. Dave.
Re: ShellExecute failed. Code 2. Any ideas?
Posted: Sat Jul 23, 2011 7:14 pm
by slipperman12
Hi Dave,
No, the software I referred to is NotePad++ - it's not the built in NotePad!
I've found out that XP doesn't have UAC, but something called Microsoft Data Access Component (MDAC) which performs a similar function. It would really need someone who knows XP to advise you on checking this.
As you are reading this, I assume that you are able to run exe files - please confirm. If so, is it only bat files which won't run?
Have you, or anyone else using your PC, downloaded ANYTHING recently, ie before you started having this problem?
Cheers,
Ged
Re: ShellExecute failed. Code 2. Any ideas?
Posted: Sat Jul 23, 2011 7:32 pm
by delticcity
Hi Ged, no I don't have NotePad++. I am the only person to ever use this pc and I haven't downloaded anything recently that I would suspect. I'm not too computer literate so aren't sure about running other exe files. Certainly none of my Bat files within msts work. I can run other programs and applications ok but I don't know which of these employ exe files?
Re: ShellExecute failed. Code 2. Any ideas?
Posted: Sat Jul 23, 2011 7:37 pm
by slipperman12
Hi Dave,
Most programs are exe files - for example, train.exe. Does MSTS run OK from its icon on the Desktop?
Cheers,
Ged
Re: ShellExecute failed. Code 2. Any ideas?
Posted: Sat Jul 23, 2011 7:48 pm
by delticcity
Yes everything else works fine - msts, trainstore, flight sim, hellfire etc. It just seems like Batch files 'cannot be found'. Dave.
Re: ShellExecute failed. Code 2. Any ideas?
Posted: Sat Jul 23, 2011 7:58 pm
by slipperman12
Hi Dave,
Well, that's good then!
As I don't have XP, I am going from what i found under Google!
Go into Control Panel
Select Folder Options
Click on File Type tab
You should have a window listing the file types that XP recognises.
Look in this list for BAT
If it's there, what does it say under 'Details'? Don't do any more, but come back.
If it's not there, click on the 'New' button
Type BAT into the File Extension box
Click OK
I'm working blind here, but if there is a 'Restore' option, click on it.
Close all the dialog boxes
Let me know how you do, please!
Cheers,
Ged