Oh, and 'Restore' is only briefly highlighted after adding each new entry to enable it's removal. If only 'Apply' would work....
ShellExecute failed. Code 2. Any ideas?
Moderator: Moderators
- delticcity
- Well Established Forum Member
- Posts: 946
- Joined: Sat Oct 09, 2004 2:09 pm
- Location: Vale of York near ECML
Re: ShellExecute failed. Code 2. Any ideas?
Hi Ged, I've already tried that. I noticed EXE wasn't there, or BAT so I tried adding them seperately. However they just disappear after navigating away from the folder options window and 'Apply' remains greyed out throughout. Incidentally, several other common msts related file extensions are absent also, so I'm not sure how critical the list really is? But keep trying please because you are confirming that I'm looking in the right places at least.
Dave.
Oh, and 'Restore' is only briefly highlighted after adding each new entry to enable it's removal. If only 'Apply' would work....
Oh, and 'Restore' is only briefly highlighted after adding each new entry to enable it's removal. If only 'Apply' would work....
- ashgray
- Wafflus Maximus
- Posts: 12235
- Joined: Sun Jan 09, 2005 3:25 pm
- Location: GWR, Nailsea, Somerset
Re: ShellExecute failed. Code 2. Any ideas?
I think I know what the problem may be...
Go to the My Computer folder and select TOOLS, then FOLDER OPTIONS.
Then, select the VIEW tab.
11 items down, you should see a tick box titled "Hide Extensions for Known File Types". Ensure that there is NO tick in the box. If it's ticked, de-select it, then click OK.
That may just do the trick.
Ash
Go to the My Computer folder and select TOOLS, then FOLDER OPTIONS.
Then, select the VIEW tab.
11 items down, you should see a tick box titled "Hide Extensions for Known File Types". Ensure that there is NO tick in the box. If it's ticked, de-select it, then click OK.
That may just do the trick.
Ash
Ashley Gray
Intel Core i7-7700K @ 4.2Ghz Quad Core, Gigabyte Gaming Motherboard, 2 x 512Gb SSDs + 1TB SATA drives,
16 Gb DDR-4 Corsair RAM, Nvidia GeForce GTX1060 6Gb RAM, ASUS Xonar D2X/XDT Soundcard, Windows 10 64 bit
Intel Core i7-7700K @ 4.2Ghz Quad Core, Gigabyte Gaming Motherboard, 2 x 512Gb SSDs + 1TB SATA drives,
16 Gb DDR-4 Corsair RAM, Nvidia GeForce GTX1060 6Gb RAM, ASUS Xonar D2X/XDT Soundcard, Windows 10 64 bit
- delticcity
- Well Established Forum Member
- Posts: 946
- Joined: Sat Oct 09, 2004 2:09 pm
- Location: Vale of York near ECML
Re: ShellExecute failed. Code 2. Any ideas?
Hi Ash, afraid I've already done that aswell. The box was not ticked.
Dave.
-
slipperman12
- Very Active Forum Member
- Posts: 6067
- Joined: Mon Nov 12, 2007 9:50 am
- Location: North Nottinghamshire, UK
Re: ShellExecute failed. Code 2. Any ideas?
Hi Dave,
I don't think you'll find most MSTS file types in that list! Unless you've got a program like ConText which you've 'told' to open files like eng, wag, con, etc., then I believe they'll be in the list.
exe files must be OK because they are working! When you entered the BAT extension, did you click on Restore? This should be OK because Windows knows all about BAT files.
Oh dear, must speed up my typing
Ash asked the same question as I'd just carefully phrased!
Cheers,
Ged
EDIT : and I've just seen your 'Restore' comment - sorry! Thinking caps back on
I don't think you'll find most MSTS file types in that list! Unless you've got a program like ConText which you've 'told' to open files like eng, wag, con, etc., then I believe they'll be in the list.
exe files must be OK because they are working! When you entered the BAT extension, did you click on Restore? This should be OK because Windows knows all about BAT files.
Oh dear, must speed up my typing
Cheers,
Ged
EDIT : and I've just seen your 'Restore' comment - sorry! Thinking caps back on
Intel i5-4690K (3.5Ghz), Gigabyte GA-Z97P-D3 m/b, 12GB DDR3 RAM, NVIDIA GTX 750ti (2GB) graphics card, Asus Xonar DS sound card. Win 10 Pro 64-bit.
- delticcity
- Well Established Forum Member
- Posts: 946
- Joined: Sat Oct 09, 2004 2:09 pm
- Location: Vale of York near ECML
Re: ShellExecute failed. Code 2. Any ideas?
When I typed in BAT, the other field was automatically filled with MS DOS BATCH FILE but 'Restore' was not an option. I navigated away but on return saw the BAT entry had disappeared from the list. (again). I'm starting to contemplate manually copying all the required files into S&D and DC3 just so I can have a play. Is there an easy way of seeing a list of the required files? Dave.
-
slipperman12
- Very Active Forum Member
- Posts: 6067
- Joined: Mon Nov 12, 2007 9:50 am
- Location: North Nottinghamshire, UK
Re: ShellExecute failed. Code 2. Any ideas?
HI Dave,
XP knows about BAT files, as shown by the description.
Have you rebooted and tried to run a BAT file again?
I would not even THINK about copying the files
but you should be able to list the file in NotePad.
Cheers,
Ged
XP knows about BAT files, as shown by the description.
Have you rebooted and tried to run a BAT file again?
I would not even THINK about copying the files
Cheers,
Ged
Intel i5-4690K (3.5Ghz), Gigabyte GA-Z97P-D3 m/b, 12GB DDR3 RAM, NVIDIA GTX 750ti (2GB) graphics card, Asus Xonar DS sound card. Win 10 Pro 64-bit.
- delticcity
- Well Established Forum Member
- Posts: 946
- Joined: Sat Oct 09, 2004 2:09 pm
- Location: Vale of York near ECML
Re: ShellExecute failed. Code 2. Any ideas?
Hi Ged, yes I've rebooted a couple of times now with no change. My batch files are still 'hidden' somehow. At this point I have got to disappear to the pub due to a prior arrangement. Many thanks to you and Ash for your patience and tenacity and hopefully we'll be able to pick this up again another time soon. Dave.
-
slipperman12
- Very Active Forum Member
- Posts: 6067
- Joined: Mon Nov 12, 2007 9:50 am
- Location: North Nottinghamshire, UK
Re: ShellExecute failed. Code 2. Any ideas?
Hi Dave,
Before you go (have one for me please!), it may be a Registry problem.
If you look here : http://www.dougknox.com/xp/file_assoc.htm the very first item is what you want (Batch File Association). If you are happy doing this, failing any other solutions, it may be the last resort!
Cheers,
Ged
Before you go (have one for me please!), it may be a Registry problem.
If you look here : http://www.dougknox.com/xp/file_assoc.htm the very first item is what you want (Batch File Association). If you are happy doing this, failing any other solutions, it may be the last resort!
Cheers,
Ged
Intel i5-4690K (3.5Ghz), Gigabyte GA-Z97P-D3 m/b, 12GB DDR3 RAM, NVIDIA GTX 750ti (2GB) graphics card, Asus Xonar DS sound card. Win 10 Pro 64-bit.
- mikesimpson
- Very Active Forum Member
- Posts: 6361
- Joined: Mon Dec 03, 2001 12:00 am
- Location: Southern Hemisphere Penal Colonies
- Contact:
Re: ShellExecute failed. Code 2. Any ideas?
Hi Dave,
Open a CLI window under XP. Then at the command prompt type
assoc .bat
You should get the response .bat=batfile
If you do not get this response then the association of .bat to batfile has been broken. You can fix this by going to the command prompt and entering
assoc .bat=batfile
after which it should be reset.
If all else fails, rename InstallMe.bat to InstallMe.cmd and try running it again, that should also work.
Mike
Open a CLI window under XP. Then at the command prompt type
assoc .bat
You should get the response .bat=batfile
If you do not get this response then the association of .bat to batfile has been broken. You can fix this by going to the command prompt and entering
assoc .bat=batfile
after which it should be reset.
If all else fails, rename InstallMe.bat to InstallMe.cmd and try running it again, that should also work.
Mike
Mike in OZ - Author of TS-Tools & Route-Riter.
http://www.agenetools.com
I'm not arguing (just explaining why I'm right).
http://www.agenetools.com
I'm not arguing (just explaining why I'm right).
- delticcity
- Well Established Forum Member
- Posts: 946
- Joined: Sat Oct 09, 2004 2:09 pm
- Location: Vale of York near ECML
Re: ShellExecute failed. Code 2. Any ideas?
Morning chaps. Sorry, Evening Mike. Unfortunately no joy there either. When I enter assoc .bat I am just presented with a new prompt, likewise when I enter assoc .bat=batfile
The batch files in my routes can still not be found. Renaming Installme.bat to Installme.cmd produced a similar 'cannot find' message relating to Installme.cmd.
I tried your fix Ged but it seems to have changed nothing, still batch files cannot be found.
An 'expert' in the pub suggested re-installing Windows as an option but I don't have a disc anyway. Thanks for your efforts. Dave.
The batch files in my routes can still not be found. Renaming Installme.bat to Installme.cmd produced a similar 'cannot find' message relating to Installme.cmd.
I tried your fix Ged but it seems to have changed nothing, still batch files cannot be found.
An 'expert' in the pub suggested re-installing Windows as an option but I don't have a disc anyway. Thanks for your efforts. Dave.
-
slipperman12
- Very Active Forum Member
- Posts: 6067
- Joined: Mon Nov 12, 2007 9:50 am
- Location: North Nottinghamshire, UK
Re: ShellExecute failed. Code 2. Any ideas?
Hi Dave,
Good morning!
Reinstalling Windows was to be my very last resort! But since you don't have the disk, it's a no-no
Question - how did you install XP on to your previously Win7 PC?
Can we check a couple of things? Is the file a 'proper' batch file? Right click on the filename and select Properties - is the file shown as a Windows batch File (or in XP maybe MSDOS Batch file)?
Second, open the batch file in NotePad - if there is no 'Open with..' option, use the 'Edit' option. Are the lines in proper characters, ie not peculiar signs, etc. ? I found a batch file in Dorset Coast, the first few lines look like this :
If the above pass the tests, have you installed, and run, any Windows 'tweakers' recently - these are programs which claim to speed up your system; they do it by changing settings within Windows, often in the Registry.
Cheers,
Ged
Good morning!
Reinstalling Windows was to be my very last resort! But since you don't have the disk, it's a no-no
Can we check a couple of things? Is the file a 'proper' batch file? Right click on the filename and select Properties - is the file shown as a Windows batch File (or in XP maybe MSDOS Batch file)?
Second, open the batch file in NotePad - if there is no 'Open with..' option, use the 'Edit' option. Are the lines in proper characters, ie not peculiar signs, etc. ? I found a batch file in Dorset Coast, the first few lines look like this :
The one you pick probably won't look anything like that, but they are proper words@Echo Off
call xcopy "..\japan1\shapes\apartment.s" .\Shapes\ /Y
call xcopy "..\japan1\shapes\apartment.sd" .\Shapes\ /Y
call xcopy "..\japan1\shapes\BushLn1.s" .\Shapes\ /Y
If the above pass the tests, have you installed, and run, any Windows 'tweakers' recently - these are programs which claim to speed up your system; they do it by changing settings within Windows, often in the Registry.
Cheers,
Ged
Intel i5-4690K (3.5Ghz), Gigabyte GA-Z97P-D3 m/b, 12GB DDR3 RAM, NVIDIA GTX 750ti (2GB) graphics card, Asus Xonar DS sound card. Win 10 Pro 64-bit.
- delticcity
- Well Established Forum Member
- Posts: 946
- Joined: Sat Oct 09, 2004 2:09 pm
- Location: Vale of York near ECML
Re: ShellExecute failed. Code 2. Any ideas?
Morning Ged. I think I might have an XP disc somewhere but don't fancy trying that even as a last resort. What made you think I had a Windows7 system? Only XP here. I looked at the properties of my Dorset batch file and it is indeed called an MS DOS Batch File. In notepad the writing is plain old english, showing what might turn out to be a very useful list of files from the default routes for copying via xcopy. In fact, that looks like my best option just now, a manual copying session. Dave.
No, I haven't run anything recently of the 'tweaking' variety until after the problem became apparent. I have run a registry fixer through my trusted SpyDoctor without any change.
No, I haven't run anything recently of the 'tweaking' variety until after the problem became apparent. I have run a registry fixer through my trusted SpyDoctor without any change.
-
slipperman12
- Very Active Forum Member
- Posts: 6067
- Joined: Mon Nov 12, 2007 9:50 am
- Location: North Nottinghamshire, UK
Re: ShellExecute failed. Code 2. Any ideas?
Hi Dave,
Did you have a look at the website I pointed to?
Incidentally, I thought Spydoctor was just anti-virus software.
Cheers,
Ged
Sorry about that - as an old colleague of mine used to say : "Slip of the hand, no fault of the brain"What made you think I had a Windows7 system?
Did you have a look at the website I pointed to?
Incidentally, I thought Spydoctor was just anti-virus software.
Cheers,
Ged
Intel i5-4690K (3.5Ghz), Gigabyte GA-Z97P-D3 m/b, 12GB DDR3 RAM, NVIDIA GTX 750ti (2GB) graphics card, Asus Xonar DS sound card. Win 10 Pro 64-bit.
- delticcity
- Well Established Forum Member
- Posts: 946
- Joined: Sat Oct 09, 2004 2:09 pm
- Location: Vale of York near ECML
Re: ShellExecute failed. Code 2. Any ideas?
I think this referred to the website link you sent Ged. No joy. Spyware Doctor has a registry fix tool but it also made no difference. I'm halfway through manually copying files into Dorset Coast but I'm dreading doing the Textures, so many different folders! Dave.delticcity wrote:
I tried your fix Ged but it seems to have changed nothing, still batch files cannot be found.
- delticcity
- Well Established Forum Member
- Posts: 946
- Joined: Sat Oct 09, 2004 2:09 pm
- Location: Vale of York near ECML
Re: ShellExecute failed. Code 2. Any ideas?
And now unfortunately the pub beckons again! This time for Sunday lunch. You ready for another pint Ged?