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

Thursday, January 20, 2011

Determine Win7 version on install DVD

I recently faced the question on how to determine the version of an given blank Windows 7 DVD.

After some web search and I had tried several ways here’s how you do this.

Thursday, October 21, 2010

You are logged into a Temporary Profile

Shortly my new syspreppted virtual machine say’s “You are logged into a temporary profile.” WFT?

After a short search with my search engine of choice I found a solution for this on the Windows 7 IT Pro Forums. Detailed information about user profiles can be found on About User Profiles.

So this has been caused because I used this machine with the same domain account before I had sysprepped it.

In short:
Search user profile at
C:\Users\%username%
and delete it.
Open the registry editor and search for the profile with the corresponding SID at registry key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\ProfileList
and delete it.

Restart and try to log on. Problem should be solved.

Detect current network setting with C#

In cause of my latest project Simple Proxy Switch I had to face the challenge of detecting the setting of the current network the computer is connected to.

Now here’s my snippet how do I retrieve the current network setting:

// zero conf ip address
IPAddress zeroConf = new IPAddress(0);
// get current assigned addresses
IPAddress[] hostAddresses = Dns.GetHostAddresses(Dns.GetHostName());

var networkData = NetworkInterface.GetAllNetworkInterfaces()
  // filter running network interfaces
  .Where(network => network.OperationalStatus == OperationalStatus.Up)
  // filter unknown interfaces
  .Where(network => network.NetworkInterfaceType != NetworkInterfaceType.Unknown)
  // filter loopback interfaces
  .Where(network => network.NetworkInterfaceType != NetworkInterfaceType.Loopback)
  // get the properties
  .Select(network => network.GetIPProperties())
  // filter initialized gateways
  .Where(ipProps => ipProps.GatewayAddresses.All(gateway => gateway.Address != zeroConf))
  // filter and get ip addresses
  .SelectMany(ipProps => ipProps.UnicastAddresses.Where(ucAddress => hostAddresses.Contains(ucAddress.Address)))
  .Where(ucAddress => hostAddresses.Contains(ucAddress.Address))
  // simply use the first
  .FirstOrDefault();

Be the force with you!

Monday, September 27, 2010

Network drives unavailable while running programs under Admin privileges

Since the installation of VS 2010 I discovered that some network shares are unavailable to access with Visual Studio 2010. This is disturbing because my shared settings living on a network share.
I guessed this was caused because of VS2010
%VSINSTALLDIR%\Common7\IDE\devenv.exe
is treated to be executed as administrator also the VSLauncer.exe located in
%CommonProgramFiles%\microsoft shared\MSEnv\VSLauncher.exe
Yesterday I spent now 2 min with google and found a solution.
The problem is caused by using different access tokens for user currently logged in and program that runs with admin privileges. Further information can be found here.
This problem can be solved by enable sharing of access tokens between current (filtered) and admin access. This can be done by creating registry key
EnableLinkedConnections
located under
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System
and setting it’s DWORD value to ‘1’. Detailed information can be found here.

Have fun.

Wednesday, January 20, 2010

Two ways of disabling Ctrl-Alt-Delete on logon

Especially in domain environments users are forced to press Ctrl-Alt-Delete (German: Strg-Alt-Enf) to logon any machine by default.

Some like this feature, I not.

I have found two ways to disable this on Windows 7® and Vista®.

Not Requiring Ctrl-ALT-DEL at logon
Vista requiring ctrl-alt-del before login

The two ways are:
  1. Advanced User Accounts Control Panel (NETPLWIZ; %systemroot%\system32\netplWiz.exe)
  2. Local Security Policy

The Advanced User Accounts Control Panel is reachable via
  • <Win> + <R> ⇒ type Netplwiz ⇒ hit <Enter>
  • Start button or <Win> ⇒ press Run ⇒ type Netplwiz ⇒ hit <Enter>
  • Start button or <Win> ⇒ press "Help and Support" ⇒ search for "Secure Login" or Ctrl-Alt-Del ⇒ usually the first result ⇒ hit "Click here to open Advanced User Accounts"
  • Control Panel ⇒ User Accounts ⇒ User Accounts ⇒ Manage User Accounts ⇒ Advanced
    [not reproduceable]
If Panel is open switch to Advanced Tab and under Secure Logon tick the checkbox right before Require Users to Press Ctrl-Alt-Delete.

The Local Security Policy is reachable via
  • Start or <Win> ⇒ Control Panel ⇒ System and Maintenance ⇒ Administrative Tools ⇒ Local Security Policy ⇒ Local Policies
  • <Win> + <R> ⇒ Type gpedit.msc ⇒hit <Enter> ⇒ Local Computer Policy ⇒ Computer Configuration ⇒ Windows Settings ⇒ Security Settings ⇒ Local Policies
Select Security Options and double click on Interactive logon: Do not require CTRL+ALT+DEL and select Enabled.

Have fun.