Archive for the ‘Windows’ Category

Visual Studio slow with network shares

Sunday, September 16th, 2012

I saw an email exchange about issues surrounding visual studio 2010 and using network shares for work. Previously, there wasn’t an issue with 2005. Microsoft was contacted and they basically said it’s a “feature.”

I did some searching on the Net and found an interesting discussion on a similar problem. As it’s explained; Microsoft .NET framework is not fully trusted but you can modify it. One person explained he followed the directions from another post.

It’s an interesting approach and it kind of makes sense depending how often visual studio does security checks.

In my situation, I passed on this information but the users thought it would not address their problem. Even if it doesn’t; this was interesting to read so I will keep it for future reference.

DsGetSiteName failed: Status = 1919 0x77f ERROR_NO_SITENAME

Sunday, September 16th, 2012

A user reported this error when he attempted to check the site name on a terminal server via the command: nltest /dsgetsite

A rather odd error as it usually appears on domain controllers and exchange servers. DNS was in order and there wasn’t an obvious error in the logs.

I checked which logon server was handling authentication for the terminal server via echo %LOGONSERVER% and found domain controllers in other countries were handling the authentication. I checked a couple other windows boxes and found the same errors.

This suggested the subnet for Active Directory was not configured or had a typo. I was not able to immediately verify this as AD is controlled by another group. I opened a trouble ticket and will wait for an answer.

I needed to solve the problem for the users who spotted this error. I found a registry entry would handle this issue.

From regedit; drill down the following:

HKLM\System\CurrentControlSet\Services\Netlogon\Parameters

Once you click Parameters, add a string word called “SiteName

Add the current site name to the entry and exit regedit.

nltest /dsgetsite will now function as expected.

Not the best of solutions; but it at least it solved the user’s problem while the AD people figure out what is going on.

If I get an answer, I will update this post.

-update-

As suspected; a subnet range was missing from the AD configuration.  It was added and the correct site and logonservers were appearing.

 

How to lock a remote desktop session.

Friday, September 14th, 2012

An annoying little ritual we must all follow is the periodic password change. I had to change mine and I had a remote desktop session which of course wanted a session lock and password entry to update the credentials.

To lock a local session, you simply enter: windows+L

It works great with local sessions but it does nothing for remote desktop sessions.

For remote desktop; you can enter:  CTRL+ALT+INS but this may not work as it requires you to configure remote desktop for it to work.

* Open the Remote Desktop Connection utility and click Options.
* Open the Local Resources tab
* Change the value for Apply Windows key combinations option under 
  Keyboard to On the remote computer.
* This will send all key combinations to the remote desktop connection; 
  including Ctrl-Alt-Ins.

There is one more way which doesn’t require configuration changes.

Simply, enter: rundll32 user32.dll,LockWorkStation

After that a quick unlock and the credentials are updated.

My Laptop display is upside down!

Thursday, September 13th, 2012

I was working on a virtual machine and while “wrestling” with a problem I found my display now showed my desktop upside down!  Really strange.

After playing around with a few key combinations, I found that ctrl-alt and the up arrow key corrected the problem.

Never knew this could happen.  Playing around with the arrow keys showed the display would go in all directions.

wscript.echo without a charriage return.

Saturday, August 25th, 2012

I was writing a small script to obtain and display server network information.   Part of a project to re-ip a network.

One thing I wanted to have was formatted output and found wscript.echo was adding a carriage return to the output. I looked around to see if there was a way to disable it.

wscript.echo does this by design. There is no way to disable it.

The way to get around this is to use : Wscript.StdOut.Write

For example:

Wscript.StdOut.Write (“Enter something: “)

Wscript.StdOut.Write “You entered : ” & Wscript.StdIn.ReadLine

You will have to add is a “vbCrLf” at the end to cause a CR.

What do the color buttons mean on Microsoft Office communicator?

Monday, April 23rd, 2012

Every once in awhile I will get a question about what do the color buttons mean with MOC?

There presence buttons serve to tell you the availability status for MOC sessions. The common colors seen are red, green, yellow, green-yellow and redish-white(kind of a pink?).

Red – This means do not disturb. It is manually set or appears when a user is has a scheduled event in the outlook calendar.

Green – The user is available for chat.

Yellow – This means away or out of office. This can happen when a user sets it, the office assistant was set, or more often the computer was idle for 15 minutes.

Green-Yellow – The person might be available. This happens when the user’s system has been idle for five minutes (default).

White with Red hue – The person is not available. This can happen if the person configured it or communicator is not running.

 These are the basics and  I have found most people figure this out on their own. If a person want’s to read more about it, there is a Presence Survival Guide provided by Microsoft.

File \$WIN_NT$.~BT\halaacpi.dll could not be loaded. The error code is 14

Friday, April 6th, 2012

I had a request to setup Windows 2003 non R2 on an HP DL 360 G6.  I used the SmartStart CD version 8.7 for 32 bit operating systems.

The process ran through the basic setup, copied the files and on the first reboot, I found the following message:

File \$WIN_NT$.~BT\halaacpi.dll could not be loaded.

The error code is 14

An odd message since it basically means it’s out of memory and didn’t have enough storage to complete the operation.

A check on the Net; suggested using SmartStart 8.6.  But, I was rather surprised to find somebody at HP messed up as I received “file not found” messages on all the smartstart download links.  A few of the driver downloads would not work as well.  I verified this by accessing their ftp site and found files were missing.

I decided to try the R2 version of 2003.  I only used the first CD since it’s basically the original release and the second CD makes it R2.

This time the OS installed without issue.

Restart windows service from Linux

Monday, April 2nd, 2012

I had a request on how to restart the three LSF services from a script. The person worked on the farm team and did not relish the idea of using remote desktop or VNC.

I thought about a Powershell script or using a batch script to run the PsService from sysinternals. It looked simple as the command is as follows:

psservice \\<computer> -u <domain\username> -p password stop service <service name>

psservice \\<computer> -u <domain\username> -p password start service <service name>

I contacted the user and asked a couple more questions and learned she wanted to run the script from Linux. Of course this required a change in my approach as I like to keep things as simple as possible especially when a user will write their own script. I decided to abandon windows scripts and find away to see if Linux could handle this via the windows management interface.

Looking around the Net, I found a way I didn’t even consider. Simply install the Samba-Common. This offers the Net utility(or as close to it as possible) for the Linux host. The particular command in question is Net RPC service command:

To list out the services on a Windows computer:

net rpc service list -I <IP Address> -U “<domain\username>%<password>”

If you wish to use the command line; simply remove “%<password>” and you will be prompted for a password.

To start or stop a service; you would enter:

net rpc service {start|stop} <Service Name> -I <IP Address> -U “<domain\username>%<password>”

Again, if you wish to use the command line, simply remove “%<password>” and you will be prompted for a password.

The account used will have to have local admin privileges so if you decide to script it, secure the file to yourself since the password will be plain text.

Much as I would like to impress you with my great knowledge; there was a sense of urgency to the request so I went to the Net and I did get help from the following sites so credit must be given where credit is due.

LifeHacker

Commandlinefu

LyleBackenrorth

Windows 2003 NTP sync looses 1 hour

Monday, March 26th, 2012

I have a new server running windows 2003 R2 to support legacy software.

The server sits in a secured room which does not have access to the Internet. As such it was installed by DVD.

The operating system included service pack 2.

When it came time to configure NTP(we have an internal clock), the time would adjust one hour backwards.

I checked the the following:

  1. Time Zone.  Correct
  2. Automatically adjust clock for daylight saving changes is checked. Correct
  3. The BIOS clock.  Correct
  4. The time server is accessible. Correct.
  5. Patch levels.  Possible problem.

I remembered the time when the government decided to extend daylight savings time and decided a patch was missing.

I searched the Microsoft site and found KB955839

I installed the patch and my time synchronization was correct.

Lesson of the day: Don’t assume the service pack has all needed patches.

Remote Desktop command keys.

Sunday, March 25th, 2012

After posting Where is ctrl-alt-delete I thought it might be a good idea to list the remaining key combinations for remote desktop.  You may not use all of them but it’s good to know they exist.  Microsoft was good enough to provide the following:

 

Shortcut key Description
ALT+PAGE UP Switches between programs from left to right.
ALT+PAGE DOWN Switches between programs for right to left.
ALT+INSERT Cycles through the programs in the order they were started.
ALT+HOME Displays the Start menu.
CTRL+ALT+BREAK Switches the client between full-screen mode and window mode.
CTRL+ALT+END Brings up the Windows Security dialog box.
ALT+DELETE Displays the Windows menu.
CTRL+ALT+MINUS SIGN (-) Places a snapshot of the active window, within the client, on the Remote Desktop Session Host (RD Session Host) server clipboard (provides the same functionality as pressing ALT+PRINT SCREEN on the local computer).
CTRL+ALT+PLUS SIGN (+) Places a snapshot of the entire client windows area on the RD Session Host server clipboard (provides the same functionality as pressing PRINT SCREEN on the local computer).