Showing posts with label Windows. Show all posts
Showing posts with label Windows. Show all posts

2011-03-09

How to turn off the Shutdown Event Tracker for Windows Server

Configure the Shutdown Event Tracker
  1. Click Start, Run, and then enter gpedit.msc. Click OK.
  2. The Group Policy Object Editor console opens.
  3. In the left pane, expand Computer Configuration, and then Administrative Templates.
  4. Click System
  5. In the right pane, find and double-click the Display Shutdown Event Tracker.
  6. When the Display Shutdown Event Tracker Properties dialog box opens, select one of the following options:
    • Not Configured
    • Enabled
    • Disabled
  1. If you select the Enabled option, you can choose between the following options to specify when the Shutdown Event Tracker should be displayed:
    • Always: This option is self explanatory. 
    • Server Only: When selected, the Shutdown Event Tracker is displayed for only Windows Server 2003/2008 servers.
    • Workstation Only: When selected, the Shutdown Event Tracker is displayed for only Windows XP Professional workstations.
  2. If you want to view help information on the Shutdown Event Tracker application, click the Explain tab.
  3. Click OK, and then close the Group Policy Object Editor console.

2009-07-06

Excel Reader Writer (excel not required)

Ok as promised here it is a very simple(1 days work) wrapper for reading and writing excel files using 2007 Office System Driver: Data Connectivity Component. Below is an example function that shows what the class library can do. Remember to include a reference to the library in you project.
public void CorichExcel()
{
    string file = "C:/excel.xls";

    string sheet = "";

    try
    {
        //Gets a liost of sheets from the excel file
        string[] sheets = Corich.Excel.ReaderWriter.GetSheets(file);
        sheet = sheets[0];
    }
    catch(Exception ex)
    {
        MessageBox.Show(ex.Message);
        return;
    }
    
    //Check to see if the sheet exist
    if (Corich.Excel.ReaderWriter.SheetExists(file, sheet))
    {

        //gets a list of colums from the first sheet in the excel file
        string[] columns = Corich.Excel.ReaderWriter.GetColumns(file, sheet);

        //Loads the data in the first excel sheet into a data table
        DataTable data = Corich.Excel.ReaderWriter.Read(file);

        //Writes the data from the first sheet to a new excel file, currently only writes to xlsb files
        Corich.Excel.ReaderWriter.Write("C:\new_file.xlsb", data);

        //Writes the data from the first sheet to a new excel file in the temp directory then opens it, currently only writes to xlsb files
        Corich.Excel.ReaderWriter.WriteToTemp("new_file.xlsb", data, true);
    }

}

You can download the .dll and the source here the code is under the GNU GPL licence it would be nice to point people to my site if you use it.

2008-06-30

idisk on Vista

On the weekend I signed up for a .mac account so that I could back up my photos to the web because I am just to lazy to burn them to CD and move send the to my parents for safe keeping. Everything was going fine (ok, it did take ages to put my photos up but there were a few) until I got to work and wanted to jam a some work 0n my idisk to take home with me.
I goggled and found there was indeed a client for idisk for Windows but after I installed it and ran it I got the a an error message.


Bugger so I turned to google again and found that here was no client but luckily you can just map it as a network drive, and you to can doing it following these simple steps;
  1. In windows explorer right click Network and select "Map Network Drive..."
  2. In the folder text box add "https://idisk.mac.com/[username]"
  3. Click "Connect using a different user name"
  4. Fill in your .mac details and click ok
  5. Click Finish
Thats it now you should have a new drive letter that links to your idrive.

2008-03-13

How to Move the Default Databases for MS SQL Server

I have juss finshed the painful task of moving of moving all the default databases (Master.mdf etc) from program files to more useful places on the database server. I wrote my self a little guide in google docs and thought someone else might like to use it. Here is the guide.

2008-02-25

WebBrowser Control Loading Hack

I was having a problem with the where I was trying to set some a the DocumentText on the load of my windows from but that browser control was not intilizied correctly and would not load the DocumentText. It took me a while but I worked out a way around it. Here is how I did it:
  1. I created a class variable called WebControlFirstLoad and set it to true.
  2. I set the DocumentCompleted event for the browser control to:
    if (!this.WebControlFirstLoad) return;
    this.WebControlFirstLoad = false
    [...load page code here...]
Now it all works fine.

2007-10-26

CTRL + ALT + DEL on Remote Desktop

I was having trouble today drying to can a servers password when I remembered the reason it was not working was because I was using the wrong command(this may have taken half an hour). So kids remember when you want to use "CTRL + ALT + DEL" on a Remote desktop it is actually "CTRL + ALT + END".

2005-02-25

How I Fixed - Error 1352

Today while trying to install the dot net framework on my virtual machine I got an error just before the install started and it wouln’t install. The error was “Error 1325 - ‘documents’ is not a valid short file name” so I went to good old google and tried to find it… I found a page by micro$oft saying it occurs when you uninstall stuff and all you need to do is install this program to fix it. Sadly nothing was installing including that program, so it didn’t work.

I was starting to get rather angry and everything I found said I needed to re-install the service pack, which is a problem because my Windows XP came with Service Pack 2 already installed. While yelling at the stupid computer and cursing Micro$ofts name it occured to me the “My Documents” folder links to a share called documents, maybe thats the problem. I reset the “My Documents” path back to the default, tried the install, and it worked.

So in summary if you get an error message saying “Error 1325 - ‘File/directory name‘ is not a valid short file name” it is probably because you are using a share and pointing to it directly instead of using a virtual network drive. If you check this or restore the “My Documents” folder back to the default value it will probably fix it.