Showing posts with label windows. Show all posts
Showing posts with label windows. Show all posts

Sunday, February 5, 2012

Icons have disappeared from Desktop in Windows 7

Dont you just love it when simple things take more of your time than you actually anticipate? Well I had one of those moments just days ago.

The issue was that a user complained that when he turned on his machine in the morning, all his desktop icons mysteriously disappeared. I was a abit skeptical at first since he assured me that he had not changed anything. So I remotely connected to his computer, and found that he wasnt telling fibs. The icons had literally disappeared and all that was left was the desktop wallpaper.

At first I thought his user profile would be corrupted so thought to give it a simple test. I right clicked on the desktop and created a new text document. The process went through without any errors but the new icon failed to show on the desktop. I checked his user profile folder to see if the icon had been created. This can be found using the environment variable %userprofile%. So I looked at %userprofile%\desktop and found that a new text document had been created although it didnt show on the desktop. Ahem. Time for some head scratching.

Doing a quick search on the internet revealed the answer to me, and when I realised how simple it was, I could have almost kicked myself (but then I thought otherwise :) )

Anyways to get to the point, all I needed to do was the following

1. Right click on the Desktop and then click on View
2. A sub menu will show and there check to see if Show desktop icons is ticked. In my case it wasnt.
3. Click the Show desktop icons option and then when you return to the desktop, all your icons would have returned
4. You can click the Show desktop icons option again to hide the icons

Viola! Didnt I tell you that it was soo simple ;)

The above solution (and the image above) was copied from http://www.thewindowsclub.com/desktop-icons-not-showing-windows-7

Friday, October 21, 2011

Remote Desktop Client Asks for Login Username and Password - How to Disable this

Generally with time, newer versions of software get released. These releases are necessary to fix issues in the previous version and also to add new features.

However, sometimes the new features are not necessarily easily adopted. This can be quite evident when you have to re-learn what you have got into a habit of. Tell me, how many of your users (including you?) cried when trying to find the print button once you moved to Office 2010?

Remote Desktop Client (RDP) is one of the most used tools for any IT Admin. It gives you an easy way to connect to a server/computer without physically having to be there. But as of version 6, whenever you try to login to any server, before the client even initiates the connection, it prompts for the username and password. Now this can be ok, but at times you would rather enter the credentials at the logon prompt that the server shows on its desktop... well at least there are times when I would like that :)

I found how to do this using a tweak done on the default.rdp file. I thought I would share this so that others could benefit from it as well.

1. Locate the Default.rdp (located in your My Documents folder) file and open it in Notepad.
2. Add a line with the following
enablecredsspsupport:i:0
3. Default.rdp should now look something like below
redirectposdevices:i:0
authentication level:i:0
enablecredsspsupport:i:0
prompt for credentials:i:0
negotiate security layer:i:1
3. Save the file and then exit from Notepad

Now when you start RDP, you will not be prompted for your credentials.

Hope this comes in handy for those that have been nagged by this feature.
[the full document describing this tweak can be found here

Tuesday, July 1, 2008

Week 27 Article 01 - Batch scripting for removal of older files

With so many scripting languages out there, it is sometimes a wonder why someone would choose batch scripts. I choose them mostly for their simplicity. Some would argue about this but then again everyone has their own views.

Recently I came across a mammoth task. One of the backup programs used by a client wasn't behaving as expected. Some background would be helpful at this point so here goes. Backups were done on two removable hard disks, one used one week and then interchanged with the other. The disconnected hard disk was taken off site for storage. The backup software would create a base image of the system on the first day of the week and every consecutive day, it would do an incremental backup. If all went well, by the end of the week, one would have a backup set that could recover a file deleted within the last 5 days. Now here comes the problem! The hard disk has got a limited capacity and can hold only so many files. As instructed in the settings of the backup program, it was supposed to keep two full sets of backups (a full set being a base image plus the incrementals based on it) and to delete any additional sets if it ran out of space on that particular hard disk (deletions using FIFO method). But the deletions were not happening properly and sometimes the backups failed due to unavailability of space. To solve this problem, I resorted to using my favorite tool, scheduled batch scripts and in the process came across a beautiful tool, which was distributed as part of the Windows 2000 Resource Kit but is now integrated into Windows 2003 as a standard. [Take note of this commands ability to search for files older than a certain age, the /D parameter]

FORFILES [/P pathname] [/M searchmask] [/S][/C command]
[/D [+ | -] {dd/MM/yyyy | dd}]

Description:
Selects a file (or set of files) and executes a command on that file. This is
helpful for batch jobs.

Parameter List:
/P pathname Indicates the path to start searching. The default folder is
the current working directory (.).

/M searchmask Searches files according to a searchmask. The default
searchmask is '*' .

/S Instructs forfiles to recurse into subdirectories.
Like "DIR /S".

/C command Indicates the command to execute for each file. Command
strings should be wrapped in double quotes.

The default command is "cmd /c echo @file".

The following variables can be used in the
command string:
@file - returns the name of the file.
@fname - returns the file name without extension.
@ext - returns only the extension of the file.
@path - returns the full path of the file.
@relpath - returns the relative path of the file.
@isdir - returns "TRUE" if a file type is a directory, and
"FALSE" for files.
@fsize - returns the size of the file in bytes.
@fdate - returns the last modified date of the file.
@ftime - returns the last modified time of the file.

To include special characters in the command line, use the
hexadecimal code for the character in 0xHH format (ex. 0x09
for tab). Internal
CMD.exe commands should be preceded with "cmd /c".

/D date Selects files with a last modified date greater than or
equal to (+), or less than or equal to (-), the specified
date using the "dd/MM/yyyy" format; or selects files with a
last modified date greater than or equal to (+) the current
date plus "dd" days, or less than or equal to (-) the
current date minus "dd" days. A valid "dd" number of days
can be any number in the range of 0 - 32768.
"+" is taken as default sign if not specified.

/? Displays this help message.

Examples:
FORFILES /?
FORFILES
FORFILES /P C:\WINDOWS /S /M DNS*.*
FORFILES /S /M *.txt /C "cmd /c type @file | more"
FORFILES /P C:\ /S /M *.bat
FORFILES /D -30 /M *.exe
/C "cmd /c echo @path 0x09 was changed 30 days ago"
FORFILES /D 01/01/2001
/C "cmd /c echo @fname is new since Jan 1st 2001"
FORFILES /D +1/7/2008 /C "cmd /c echo @fname is new today"
FORFILES /M *.exe /D +1
FORFILES /S /M *.doc /C "cmd /c echo @fsize"
FORFILES /M *.txt /C "cmd /c if @isdir==FALSE notepad.exe @file"