News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Windows 7 and Visual Studio 2008 installation kills Windows 7 bcdedit.exe

Started by KeepingRealBusy, July 31, 2012, 09:47:07 AM

Previous topic - Next topic

KeepingRealBusy

I'm having a wee bit of a problem on my new system.

I installed Visual Studio 2008 on my new laptop (my old system died). I had already tried to use
ML and LINK and mspdb80.dll which were in my TOOLS directory, but the system said that "mspdb80 is
the wrong version, check installation", so I tried the install. I had already used bcdedit.exe to
modify the path to add my TOOLS directory (there is no more autoexec.bat in Windows 7 - and I was
coming from Windows XP).

Now when I execute bcdedit.exe (as administrator) I now just get a flash on the screen (starts to
execute then immediately quits). I wrote a pathedit.bat file to execute bcdedit.exe (from its
location in the Windows 7), then pause. I get the following when I execute it:

    Microsoft Windows [Version 6.1.7601]
    Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

     \mail\autoexec>pathedit
                              (which contains:

                                  C:\Windows\System32\bcdedit.exe
                                  pause

     \mail\autoexec>C:\Windows\System32\bcdedit.exe
    'C:\Windows\System32\bcdedit.exe' is not recognized as an internal or external command,
    operable program or batch file.

     \mail\autoexec>pause
    Press any key to continue . . .

Why does Windows now say that bcdedit.exe "is not recoginized..."

Has the installation of Visual Studio 2008 clobbered Windows 7?  It did not report any errors,
but I have not tested Visual Studio yet.

Note the following PATH display.
The first entry is where I added the path to my TOOLS directory before I installed Visual Studio.
The last entry (at least the last entry - I don't have a copy of the path from before the Visual
Studio install) is where Visual Studio added the entry for "Microsoft SQL Server\90\Tools\binn\ and
I had noticed that installation as it installed.

PATH=F:\DATA(F)\xxxxxxxxxx\yy\TOOLS;C:\Program Files (x86)\HP SimplePass 2012\x64;C:\Program Files (
x86)\HP SimplePass 2012\;;C:\Program Files\Broadcom\Broadcom 802.11\Driver;;C:\Program Files (x86)\A
MD APP\bin\x86_64;C:\Program Files (x86)\AMD APP\bin\x86;C:\Program Files\Common Files\Microsoft Sha
red\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Windows\system
32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files
(x86)\Common Files\Roxio Shared\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\DLLShare
d\;C:\Program Files (x86)\Common Files\Roxio Shared\12.0\DLLShared\;C:\Program Files (x86)\Windows L
ive\Shared;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\WIDCOMM\Blue
tooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;C:\Program Files\Broadcom\WHL\;
C:\Program Files\Broadcom\WHL\syswow64;C:\Program Files\Broadcom\WHL\SysWow64\;C:\Program Files\Broa
dcom\WHL\SysWow64\syswow64;c:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn\

What should I do other than restore the system from before the installation attempt?
I did take a full system Norton Ghost save to my backup external drives before the install
(actually, a Symantic Recovery Disk full save with the system shut down).

Has anyone else run into this?
Has anyone got any ideas?

Dave.

Ryan

I have Windows 7.  If memory serves I installed C# 2008 Express before upgrading to 2010.  My bcdedit.exe still exists in my system32 folder.  Could you download it from somewhere or get it off the Windows 7 DVD?  I've noticed that Dell in particular has stopped sending recovery discs with new computers.  They charge for them now.  I could probably zip my file and attach it to a post.  I'm not exactly sure if that's legal though.

KeepingRealBusy

Ryan,

I do not need a copy of bcdedit.exe. See the CodeProject.com forum to see the steps I have already tried: http://www.codeproject.com/Messages/4323772/Windows-7-visual-studio-2008-problem.aspx.

Dave.

Ryan

Have you tried running bcdedit through Windows Explorer?  It should do nothing, but I'm more curious if you get any errors through Windows Explorer.

Ryan

Actually, your prompt style is unfamiliar to me.  Are you able to get to the system32 directory?

KeepingRealBusy

Ryan,

Thank you for the responses.

Yes, I can get to the directory via explorer. If I try to execute bcdedit.exe from explorer, it just flashes the screen. That is why I built a .bat to execute followed by a pause, and found the reason that bcdedit.exe would not execute.

As far as the prompt, I did not want to display my system username.

Dave.

Ryan

Have you tried running an elevated command prompt directly?  There are two ways I know how to do this.  You can go through Programs->Accessories->Command Prompt->right-click and click Run as administrator.  Windows will most likely prompt you about the command prompt making changes, so on and so forth.  Once the command prompt is up, you should be in the system32 directory.  If it is any other directory, the elevated command prompt didn't take hold.

The second way is to click on the Start menu, and type in cmd in the search box.  cmd.exe should be listed in the programs.  From there, it's Ctrl+Shift+Enter.  Like before, Windows will probably prompt you about making changes, etc.

The system32 directory is key to determining if you have an elevated prompt.  You should simply be able to type bcdedit.

KeepingRealBusy

Ryan,

I will try these methods.

Strange that, when I ran bcdedit.exe the first time before the install, I selected bcdedit.exe from explorer, then right click and run as administrator and it worked.
Now, it just flashes.

Gone to have dinner, be back shortly.

Dave.

Ryan

How did it work?  If you run bcdedit without switches, it simply gives you the list of current settings.  Did you tell it to leave the window open after execution was complete?  Otherwise, it would just flash.

KeepingRealBusy

Ryan,

How do you run bcdedit with switches? I can execute bcdedit.exe with right click and run as administrator, and it just flashes. I can execute using shift ctl enter and it just flashes.

If I bring up a dos prompt from a 32 bit editor, I can go to c:\windows\system32\bcdedit.exe, but again just get a screen flash.

The only thing that seems to (partially) work is to use all programs>accessories>command prompt, and right click and run as administrator. This gives me a command prompt, but shows me that I  am at my user level, however just typing "bcdedit" does execute something as if I were at c:\windows\system32\:

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\xxxx>bcdedit

Windows Boot Manager
--------------------
identifier              {bootmgr}
device                  partition=\Device\HarddiskVolume1
description             Windows Boot Manager
locale                  en-US
inherit                 {globalsettings}
extendedinput           Yes
default                 {current}
resumeobject            {158181c0-9a00-11db-8a1d-b11d19fd3102}
displayorder            {current}
toolsdisplayorder       {memdiag}
timeout                 30
customactions           0x1000085000001
                        0x5400000f
custom:5400000f         {b61827e7-a53e-11e1-983c-e3ea458117bf}

Windows Boot Loader
-------------------
identifier              {current}
device                  partition=C:
path                    \Windows\system32\winload.exe
description             Windows 7
locale                  en-US
inherit                 {bootloadersettings}
recoverysequence        {b61827e7-a53e-11e1-983c-e3ea458117bf}
recoveryenabled         Yes
osdevice                partition=C:
systemroot              \Windows
resumeobject            {158181c0-9a00-11db-8a1d-b11d19fd3102}
nx                      OptIn

C:\Users\xxxx>

If I say "path" then it gives me my path environment variable. But, no way to edit it. Quite frankly, I have forgotten EXACTLY what I did to initially edit the path, but it did happen.

May I quote my dear old dad here "gimmie my horse". What was wrong with the XP autoexec.bat as an editable file that had the drawback that you had to boot to get the changes to take effect?

Dave.

Ryan

I'm not exactly sure what you want to do with bcdedit, but here are a couple of links to read.

http://technet.microsoft.com/en-us/library/cc709667%28v=ws.10%29.aspx
http://www.sevenforums.com/tutorials/2676-bcdedit-how-use.html

KeepingRealBusy

Ryan,

Finally found out how to do this. Start > Control Panel > System > Advanced settings > Environment Variables.

Dave.

dedndave

i can't count how many times i have posted that
i even used to put pictures with it - lol
the one trick that they don't tell you....
copy the longer environment variable strings to a temporary text file to edit them - then paste back
much easier to get the PATH right than with that little box MS gives you

KeepingRealBusy

dednddave,

You may have posted that, but I ignored it since I was on XP. Now that I am on Windows 7, I have this steep learning curve - "How do I do this?" Windows Help is nearly useless. Slowly I am becoming more familiar, but that doesn't mean that I like it a bit. If I could get XP64 with drivers to match from HP, I would change in a flash.

I agree about editing the path. Do a Path in a cmd window, edit it and then copy the result, then go to edit the actual Path (replace whatever was there with your new version).

Dave.

KeepingRealBusy

Quote from: dedndave on August 04, 2012, 09:18:32 PM
much easier to get the PATH right than with that little box MS gives you

Talk about small boxes, I tried to install Windows XP SP3. It didn't work. I then had to try to recover from a recovery point. The recovery "worked", but at the end it said that it had to rename a few files. They posted these full path strings in a small box (10 or 20 characters by 10 lines) with both a horizontal and vertical scroll bar, and the list included (I think) all of the system32 dlls. I didn't trust the recovery, so I just blew it away with a diskimage restore from a backup I did just before the attempted install.

Dave.