Not really a programming issue, but if you need to copy files from a Windows profile folder to another location (eg. you want to copy a profile to a different one, make it roaming/local etc) then you may find that Windows has locked the file and won’t let you do it. If you want to get around this, reboot the PC (logging off probably won’t work) and make sure that you log straight in as a different user who has sufficient rights to access the profile folders for both of the other 2 (eg. the local machine Administrator account). Windows should let you do the copying then.
Posts Tagged ‘Windows’
Microsoft released Windows 7 RC1 yesterday, so I’m going to have to try to find time to dig out and set up a PC that I can try it on. My previous look at the beta was quite promising, so I’d like a look at the release candidate.
RC1 is available until at least July and apparently it will work until June 2010 (although I haven’t seen any info on whether you can actually upgrade from RC1 to final – you may still have to reformat).
For those of you who haven’t been keeping track of what is going on, Windows 7 is the successor to Windows Vista (which was technically Windows 6 – I think Windows 95 was Windows 4, 98 was 4.1, 2000 was 5 and XP was 5.1).
Many software developers adopt a system of alpha and beta testing. Alpha is internal testing when things are still at a fairly early stage. Beta testing is done by external customers, and many developers have public beta programs now. Microsoft have also added an extra stage to this called “Release Candidates”, which many people would probably say are actually just beta versions, but I think it is Microsoft’s way of saying “we’re nearly there now”.
The fact that Windows 7 has reached RC1 is definitely a major milestone and it will certainly be interesting to see how it pans out now that it is at this point.
I’ve had a comment that my previous post explaining how to install .NET 3.5 in Windows 2000 wasn’t very clear, so I’ll try to clarify it a little…
First of all, let me explain how it works. .NET is actualy 2 separate things. There is the .NET runtime, which deals with interpreting the MSIL intermediate code and executing it. There is also the .NET Framework, which are all the libraries containing the classes that you usually code with in .NET.
In theory, the .NET runtime can be used without the .NET framework (although you’d probably need a couple of DLLs to define things like the basic types). You could use an entirely different framework which sits on top of the same runtime and is compiled to MSIL. I’m not aware of any that exist though.
The really interesting bit is that there are actually only 3 versions of the .NET runtime – 1.0, 1.1 and 2.0. 1.0 and 1.1 are used for the corresponding framework versions, but 2.0 is used for running framework 2.0, 3.0 and 3.5.
In fact, in terms of the framework, 3.0 is 2.0 plus some extra stuff, and 3.5 is 3.0 plus extra stuff. The trick which I rely on is that you can install 2.0 in Windows 2000 and just add the extra stuff that you need.
For my purposes, all I needed was support for Linq and Linq to SQL and a few other bits and bobs. All this is available in .NET Assembly DLL files. you just need to make sure that the assemblies are available to be loaded by the application you are running.
You also need to make sure that you have any prerequisites for those assemblies, because a lot of them will access classes in other assemblies. There are 2 ways of dealing with that. You can either copy in the entire set of DLLs, or you can keep running your program and looking to see what assembly it can’t find when it throws an exception, copying that DLL in and re-running it until you don’t get any more exceptions.
There are 2 ways of making the assemblies available to your program. You can either register them in the GAC so that they can be accessed from anywhere (I’ve not tried this and I probably wouldn’t recommend it – if you want to know how to do this, google installing an assembly in the GAC), or you can just copy them into the application folder that your EXE sits in (or bin folder on your ASP.NET website will probably work too). This does make for a lot of files in that folder, but it works!
You should be able to find the .NET 3.5 assemblies in a folder on a PC that has .NET 3.5 installed under
Program Files\Reference Assemblies\Microsoft\Framework\v3.5
nb. Make sure that you have Windows 2000 SP4 and .NET framework 2.0 SP1 installed on the Windows 2000 PC! You might also need to install KB 835732 before .NET 2.0 SP1.
I’ve posted a couple of times earlier on .NET 3.5 in Windows 2000. The .NET framework 3.5 sits on .NET 2.0 SP2, which is only available to install on Windows XP and onwards. However, from experimentation, this does not mean that the same tricks don’t work. As long as you have .NET 2.0 SP1 installed, you can get away with copying most of the DLLs in with no trouble. It also seems to work with some of the newer ones.
Well, I’ve finally managed to get a look at a beta copy of Windows 7. My initial thoughts are that I quite like the look of it. I don’t use Vista on any of my own PCs – what I have seen of it made me want to avoid it – it seems unnecessarily flashy and annoying. It seems to get in the way of what you want to do and asks everything that you might want to do. I can understand why it was made that way, but I think it is a pain in the neck.
Windows 7, on the other hand seems to have been designed to be very unobtrusive. As far as I have seen so far, it tries to put what you want in the easiest places to get to it, and lets you get on with what you are trying to do without getting in your way. I can’t help thinking that Microsoft might have been taking notes from the way Google Chrome has been designed in some respects.
Comparing it to Windows XP, Microsoft have ditched the classic user interface and start menu (I think they actually did in Vista), which I have always turned on (one of the reasons I have avoided Vista). I think I’ll finally have to get used to a new shell interface for the start menu, taskbar etc., but it looks fairly easy to use and find your way around so that should be ok.
I like some of the little things like windows locking to the side if you drag them there, and the new “show desktop” section on the task bar. I also noticed the ability to have multiple clocks, which I haven’t tried, but it looks useful if you work with people in different time zones.
I’m not sure about the way that Control Panel has been reorganised, but it doesn’t look too bad – I think I prefer it to the Windows XP default. They’ve probably done a good job of it, but it is hard to overcome people’s natural resistance to change.
I’m going to have to have more of a play with it when I get the chance, but that was my initial review.
This has now been running fine for a couple of months and is being used on a day to day basis. Not all functionality works perfectly out of the box, but most of the stuff I have tried can be worked around. I’m using compilation on the fly using the VB.NET 3.5 compiler to make dynamic Linq to SQL queries, which I have needed to create a workaround using vbc.exe – the VB.NET compiler and passing in command line parameters. I needed to copy in the required DLLs that it was complaining that it didn’t have, and a few extras as well that I threw in predicting that it might need them. Let me know if you want more details – comment below.
People have been requesting more information about whether my previously mentioned trick to get .NET 3.5 functionality in Windows 2000 works. So far, it mostly seems to be a success although the software is still not being used on a large scale, but I have only found 1 real problem… When I made a WCF service client to access a web service, VS.NET created a section in the app.config file. This caused an exception when I loaded the program on the Windows 2000 PCs. However, I removed the section from the config file and hard coded the configuration info for the WCF client and it worked fine!
I mentioned earlier how to install .NET framework 3.5 in Windows 2000. I have been testing this on 7 Windows 2000 PCs, and I have successfully managed to get them to do a simple Linq to SQL query with the method that I mentioned. I can’t speak for WPF or anything, but I am currently only interested in Linq. I will post more in future when I have the live system in place.
Microsoft don’t support using .NET 3.5 in Windows 2000, which is particularly annoying, especially if, like me, you have a client who has 8 out of 12 PCs still using Windows 2000.
So, I decided to have a go and see if I could find any way of doing it. This is completely unsupported, and if it breaks anything, don’t blame me, but it is actually fairly straightforward and it seems to work fine to me (although I doubt it works with things like WPF, but if anyone tries it, please leave a comment to say how it goes)…
- Make sure you have Windows 2000 SP4 installed
- You may need to install KB 835732 before step 3
- Install .NET Framework 2.0 Service Pack 1
Now, there are 2 ways of continuing. Either you can copy over all the .NET 3.5 assemblies (you’ll have them on a .NET 3.5 PC in the Program Files\Reference Assemblies\Microsoft\Framework\v3.5 folder). You can either dump them in the application folder or probably register them in the GAC (not tried it, but it should work).
Alternatively, try running your application. You will probably get a load of AssemblyReferenceFailedExceptions. Copy in the required DLL from the above folder into your application folder for each one.
It should all work now!