Monday, March 4, 2013

Automatically Delete Temporary Files in Windows 7 [How To]

The Windows Disk Cleanup Wizard will delete your temporary files, but only if they are over a week old. To create a simple batch script that will clean up your temporary directories, do the following (Vista instructions):

Creating the Batch File to Clean Temporary Files

  1. Open Notepad and type the following:
    cd C:\Users\%username%\AppData\Local
    rmdir /S /Q Temp
  2. Save the file as cleantemp.bat
    cleantemp Automatically Delete Temporary Files in Windows 7 [How To]
  3. Now double click on the file to remove your temporary files and free up space on your computer
If this doesn’t work and gives an access error, try replacing %username% with you windows login username.

Automating the Process of Deleting Temporary Files

To automate this process, so you do not need to remember to run it, do the following:
  1. Right click on the batch file and select create shortcut
  2. Place the shortcut in your startup folder in the start menu
Now when you log in to Windows 7, your temporary files will be deleted.



ref:
http://mintywhite.com/windows-7/7maintenance/automatically-delete-temporary-files-windows-7/

Sunday, March 3, 2013

ASP.Net Web Matrix: Change SQL Espress Authentication and Enable SA from the Command Prompt

how to use joomla with sql server express using web matrix2 


  When SQL Server Express is installed with default options it is setup with Integrated Windows Security and the SA (Administrator) account disabled, for example when installed as part of Visual Studio. Additionally, in many cases the SQL Server Management Studio Express is not installed, so that a graphical interface to change to a Mixed Security and enabled SA account does not exist. Many of the ASP.Net templates integrate into ASP.Net Web Matrix like Umbraco and SrewTurn Wiki require this Mixed Security scenario, so here are the steps to change from Integrated to Mixed Security and enable the SA account with a password from the command prompt. This is assuming SQL Server Express 2008 R2, the step 4 key is slightly different with 2008/2005 installs.

1. Launch cmd.exe to enter Command Prompt

2. Run net stop MSSQL$SQLEXPRESS

 3. Run regedit

4. In the Registry Editor change the key HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SQL Server\MSSQL10_50.SQLEXPRESS\MSSQLServer\LoginMode value to 2.

 5. Close Registry Editor and return to Command Prompt

6. Run net start MSSQL$SQLEXPRESS

 7. Run SQLCMD –S .\SQLEXPRESS

8. Enter alter login 'sa' enable

9. Enter alter login 'sa' with password ='MyPassword'

10. Close the Command Prompt, you are done

 for sqlexpress 2012 do the following

 8. Enter alter login [sa] enable go

 9. Enter alter login [sa] with password =N'passwordhere' go

10. Close the Command Prompt, you are done now you will be able to install joomla , wordpress , drupal , ets ... with sql server

 references
 http://joeblog.homnick.com/Lists/Posts/Post.aspx?List=db4a6966-2b11-448d-a4ba-1550e74c89ba&ID=65 http://forums.asp.net/t/1861816.aspx/1?SqlServer+Authentication+

MS in Computer Science with paid training in USA company