Author Topic: Code blocks .cbp file will not associate with code blocks  (Read 19249 times)

Offline Chay Hawk

  • Multiple posting newcomer
  • *
  • Posts: 21
Code blocks .cbp file will not associate with code blocks
« on: September 13, 2014, 09:02:02 pm »
Ok so I have code blocks installed and when I open the project folder on my desktop all the files are white, and when I click the .cbp file windows just says how do you want to open this file?, I find the code blocks .exe and it will not associate with it. I can open code blocks and drag the .cbp file in it though and that works, but I want to be able to just click on the project file. This has never done this before and I have no idea whats going on. I don't want to uninstall code blocks because I have libraries installed and linked and it would be a major pain to re do them again, so what do I do? I attached a screenshot.

Online stahta01

  • Lives here!
  • ****
  • Posts: 7590
    • My Best Post
Re: Code blocks .cbp file will not associate with code blocks
« Reply #1 on: September 13, 2014, 10:26:30 pm »
What operating system?

If on windows, Did you try
Settings -> Environment...
General Settings
Check and Set File Associations
Post Edit 1: Button: "Manage"
Button: "Set Now"

Note: I have never done the above; but, it looks like the correct thing to do.

Tim S.

 
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Chay Hawk

  • Multiple posting newcomer
  • *
  • Posts: 21
Re: Code blocks .cbp file will not associate with code blocks
« Reply #2 on: September 13, 2014, 11:23:53 pm »
Yes i'm on windows 8, I just tried that and it still doesnt work, this is very strange.

Online stahta01

  • Lives here!
  • ****
  • Posts: 7590
    • My Best Post
Re: Code blocks .cbp file will not associate with code blocks
« Reply #3 on: September 14, 2014, 02:01:37 am »
Yes i'm on windows 8, I just tried that and it still doesnt work, this is very strange.

You might try it once more running Code::Blocks as Administrator in case it failed because of a permission issue.

If it fails after that, I suggest restarting the computer in case a restart of Windows Explorer is needed.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Chay Hawk

  • Multiple posting newcomer
  • *
  • Posts: 21
Re: Code blocks .cbp file will not associate with code blocks
« Reply #4 on: September 14, 2014, 02:41:11 am »
I just tries both of those and nothing worked :( what else can i do? If i re install code blocks on top of this one, will it delete my external library link settings?

Offline Chay Hawk

  • Multiple posting newcomer
  • *
  • Posts: 21
Re: Code blocks .cbp file will not associate with code blocks
« Reply #5 on: September 15, 2014, 01:03:47 am »
Does anyone know? I re installed code blocks over the existing one, and all my linking stuff stayed there, maybe there is a settings file somewhere in my documents that I can delete?

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: Code blocks .cbp file will not associate with code blocks
« Reply #6 on: September 15, 2014, 01:38:53 am »
Code::Blocks stores its settings within the AppData folder (hidden by default - probably <user_folder>\AppData\Roaming\CodeBlocks).  Though this should not have any effect on file associations.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Code blocks .cbp file will not associate with code blocks
« Reply #7 on: September 15, 2014, 01:58:06 am »
The file associations should be stored in the registry.
Probably something has been changed in this regard in Windows 8.
This is just a guess, I'm a linux user after all, so I might be wrong.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Chay Hawk

  • Multiple posting newcomer
  • *
  • Posts: 21
Re: Code blocks .cbp file will not associate with code blocks
« Reply #8 on: September 15, 2014, 02:29:32 am »
Ah, well I do have a program called Advanced System Care that cleans the registry among other things, so i'm quite positive that's what happened. So how would I go about fixing it?

Offline Chay Hawk

  • Multiple posting newcomer
  • *
  • Posts: 21
Re: Code blocks .cbp file will not associate with code blocks
« Reply #9 on: September 15, 2014, 06:22:26 pm »
anyone know?

Online stahta01

  • Lives here!
  • ****
  • Posts: 7590
    • My Best Post
Re: Code blocks .cbp file will not associate with code blocks
« Reply #10 on: September 15, 2014, 06:25:46 pm »
The only other thing to try is re-installing Code::Blocks.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Code blocks .cbp file will not associate with code blocks
« Reply #11 on: September 15, 2014, 09:21:33 pm »
I doubt it will help... can any one running windows 8 report if the file associations work or not?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Code blocks .cbp file will not associate with code blocks
« Reply #12 on: September 15, 2014, 10:27:40 pm »
I doubt it will help... can any one running windows 8 report if the file associations work or not?
File association works flawlessly.

@Chay Hawk:
did you click the "Manage" button on the right side of "Check & set file associations ..." and check whether the correct endings are checked.

Offline Chay Hawk

  • Multiple posting newcomer
  • *
  • Posts: 21
Re: Code blocks .cbp file will not associate with code blocks
« Reply #13 on: September 15, 2014, 11:26:47 pm »
Yes I did, I re started my pc too just to see if that mattered and it didnt :(

Offline Chay Hawk

  • Multiple posting newcomer
  • *
  • Posts: 21
Re: Code blocks .cbp file will not associate with code blocks
« Reply #14 on: September 16, 2014, 01:25:22 am »
Ok so I went to "Associate a file type or protocol with a program" in control panel and I looked for the .cbp extension and it was not there, so its been deleted, but I re installed code blocks and it didnt add it to the registry, so what i'm guessing is that there is a settings file somewhere that tells the program not to add that to the registry because it was already installed, because i installed CB over a pre existing version because i have a bunch of external libraries linked that i dont want to have to re link again, so is there anything in the files that would specify something like that? so when i re install code blocks again it will make registry entries?

Online stahta01

  • Lives here!
  • ****
  • Posts: 7590
    • My Best Post
Re: Code blocks .cbp file will not associate with code blocks
« Reply #15 on: September 16, 2014, 01:32:27 am »
You might post which CB Installer you are using.

There are at least 3 for CB 13.12; of which I would guess one installs the association and one does not.
The third one I have no idea which way to guess.

Edit: Looks like the third type I remember was replaced by two other types.
The ones ending in nosetup.zip will NOT installs the association.

I would guess the ones with setup and without the nosetup would install the associations.

But, this is just a guess.

Tim S.
 
« Last Edit: September 16, 2014, 01:37:38 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Chay Hawk

  • Multiple posting newcomer
  • *
  • Posts: 21
Re: Code blocks .cbp file will not associate with code blocks
« Reply #16 on: September 16, 2014, 01:35:48 am »
I am using the codeblocks-13.12mingw-setup-TDM-GCC-481 version.

Online stahta01

  • Lives here!
  • ****
  • Posts: 7590
    • My Best Post
Re: Code blocks .cbp file will not associate with code blocks
« Reply #17 on: September 16, 2014, 01:38:58 am »
I am using the codeblocks-13.12mingw-setup-TDM-GCC-481 version.

I would think it would install the associations; but, there is a lot of people on the web with file associations and Windows 8 questions.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Code blocks .cbp file will not associate with code blocks
« Reply #18 on: September 16, 2014, 06:35:04 am »
As far as I know it's C::B itself that registers the file-endings not a setup program.
You can try to (temporary) rename the folder the C::B exe is in (e.g. from CodeBlocks to CodeBlocks.tmp), and run C::B from explorer.
Now C::b should ask whether to associate it with some file-endings.
Chose yes (or whatever it's called exactly) and see if it helps.
Change the foldername back (after closing C::B) and run it again.
You should get the same question.

But if setting it explicitely from the "Settings"-dialog does not work, this might not work too.

Check for antivirus and other (programmers-)system breaking stuff, that might "protect" your registry from being changed.

Offline Chay Hawk

  • Multiple posting newcomer
  • *
  • Posts: 21
Re: Code blocks .cbp file will not associate with code blocks
« Reply #19 on: September 16, 2014, 03:56:11 pm »
That didnt work either. I guess i'll just have to live with it until i find a solution, there isn't really anything I can do :/
« Last Edit: September 16, 2014, 07:39:57 pm by Chay Hawk »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re:
« Reply #20 on: September 22, 2014, 07:53:57 pm »
What happens is you double click on the file in the explorer, choose the application to launch with and store this as default? This should result pretty much on the same thing what cb does.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Chay Hawk

  • Multiple posting newcomer
  • *
  • Posts: 21
Re: Code blocks .cbp file will not associate with code blocks
« Reply #21 on: September 23, 2014, 08:09:02 am »
I got it solved, I had to actually re install my OS because it was causing me tons of problems, so now everything is good. Thanks for the help though.