Welcome to MSDN Blogs Sign in | Join | Help
Having mobile broadband issues in Windows 7?...

...Then you should read this post!

Hope many of your there would have got your hands on the Microsoft Windows 7 beta by now. But as a friend on the internet said "However awesome a computer may be, it is useless without the internet...". I realize that many of you might be having teething issues with using your USB modem or the data card from your ISV on Windows 7, though they worked perfectly in Windows Vista. This can be due to a lot of reasons - a driver compatible with Windows 7 might not be available, the connection manager application might have application compatibility issues etc. However, most of these issues would get solved soon.

However, here are a few troubleshooting steps/work arounds that you could put to use to continue enjoying internet access on Windows 7. If you still have an issue which you couldn't solve using these tips, do post the issue as a comment on the blog - http://blogs.technet.com/teammb, so that it can be made note of.

Symptom:1: There is an application that works fine on XP, but has issues in Vista & Windows 7

Possible workaround:

One of the reasons could be privilege issue. You can modify the compatibility settings for the application to enable it to run in Administrator mode and then run it. Steps to do this are as below:

  • Right click on the application in explorer. Click on Properties.
  • Navigate to the 'Compatibility' tab. Check the checkbox 'Run this program as an administrator' under ‘Privilege level’.
  • Click on OK.

image

Symptom:2: You have a driver package/connection manager installer package which worked on Vista but isn't working for Windows 7

Possible workaround:

In such a case, you could try running your installer/application in Vista compatibility mode. See below for steps to enable 'Vista compatibility' settings on an application so that when you run it, it is launched in Vista compatibility mode.

  • Right click on the application in explorer. Click on Properties.
  • Navigate to the 'Compatibility' tab. Check the checkbox 'Run this program in compatibility mode for:’.
  • Select 'Windows Vista (Service Pack 1)' or 'Windows Vista (Service Pack 2)'  from the drop down as shown below, depending on which OS it worked well for you. Click on OK.

image

Symptom:3: The drivers for the device installed successfully, but the ‘Connect’ button is disabled in the connection manager or the connection manager/dialer application reports that the device is not found.

Possible workaround:

You could check if the drivers for your device are successfully installed. Open device manager (Start –> Control Panel –> Device Manager). Check if your device is recognized here ie. there is no yellow bang on the device and device manager reports it to be working properly.

If this is the case, but the connection manager/dialer application reports that the device is not found (or connect button is grayed out), then you can create a dial-up connection manually using the modem and use it for connecting to the internet.

For this we need to first get the phone number, username and password details to use in the connection. Use one of the below methods to get this information: 
1) Get it from the RAS tracing logs collected when dialing using your ISV's application
     (i) netsh ras set tracing * disable
     (ii) del %windir%\tracing\*.*
     (iii) netsh ras set tracing * enable
     (iv) Dial your connection using the connection manager/dialer application
     (v) netsh ras set tracing * disable
     (vI) Open %windir%\tracing\RASMAN.log and search for "UserName:" and "PhoneNum:" (The password is usually the same as the username or empty. the password isn't present in the logs for security reasons)

2) You could get these settings from the Connection Manager Advanced settings/Options too.

3) The device manual might have this information too.


Once you have this information, you need to create a new dialup connection using your modem.

Steps to create a dial- up connection

1)    Start –> Control Panel –> Open ‘Network and Sharing Center’

2) Click on ‘Set up a new connection or network’ -> ‘Set up a dial up connection’ -> Next --> Enter the phone number, username /password details.  
Enter a connection name, say 'ModemDialup'
(If you have more than one modem attached to the device, be sure to select the right one)

3) Click on ‘Connect’

You can access this connection by clicking on the Network icon in the taskbar at the bottom right (highlighted below).

image

You will find ‘ModemDialup' connection here. You can use this to connect/disconnect your connection.

Symptom:4:  Even after installing drivers from the CD, the device is still not recognized in device manager

Possible workaround:

In spite of installing the drivers from the CD that accompanied the device, lets say the device still shows a yellow bang in device manager.

  • In this case, note the folder where the drivers were installed, say it is C:\Program Files\FooDriver.
  • Open device manager (Start –> Control Panel –> Device Manager)
  • Right click on the device (which is still showing a yellow bang) –> click on ‘Update driver software’
  • Select ‘Browse my computer for driver software’ –> In the text box ‘Search for driver software in this location:’ , type the install location on your computer where the drivers were installed from the CD. In our example it would be C:\Program Files\FooDriver. Click on ‘Next’

This might sometimes help in recognizing the device successfully.

Symptom:5:  USB ports on the computer might stop working after installing drivers for certain devices on Windows 7

Possible workaround:

For certain devices after installing the drivers from the accompanying CD, all USB ports on the computer stop working. To get the USB ports working, use the below steps:

  • Note the install location on the computer where the drivers were installed from the CD
  • del %systemdrive%\windows\syswow64\drivers\swmsflt.sys
  • del %systemdrive%\windows\system32\swmsflt.sys
  • Search for swmsflt64.sys in the install location (dir /s swmsflt64.sys) and note the location
  • Copy swmsflt64.sys from the above location in step (4) to %systemdrive%\windows\system32\drivers\
  • Rename swmsflt64.sys to swmsflt.sys in %systemdrive%\windows\system32\drivers\
  • Reboot the machine

These are the symptoms and troubleshooting tips that I have for now. If you have figured out a workaround that isn’t here, do leave your comments explaining the workaround. It might help hundreds of people out there!

[This posting is provided "AS IS" with no warranties, and confers no rights.]

Script to disconnect connected VPN clients from VPN server

Q: Looking to see if there is any way to script disconnecting a user from a
RRAS VPN connection. When we find a user connected
via VPN who is infected with a virus we automatically disable their dial-in
access but if they already have a connection we need to bump them off of the
VPN server - I would like to create this as a script

A: You can write your own application using the MPRAPIs for this.
1) Call
MprAdminConnectionEnum to enumerate all active connections on the
server. This will return the RAS_CONNECTION_2 structures which will have the
username used for the connection. Compare this to the user that you want to
disconnect and get the connection handle for this case alone.
2) Use this connection handle in the next call to
MprAdminPortEnum. This
will return the port on which the user has connected as RAS_PORT_0
structure. This will have the member hPort whihc is the handle to the port.
3) Use this handle in the call to
MprAdminPortDisconnect to disconnect the
particular port.

This will disconnect the client connection

Thanks,

Janani

 

Tracking RRAS users in Windows 2003 server

The most widely asked questions are how do we accomplish tracking for the RRAS users. The key requirements are:

1.  Track users who log on through Remote Access Services

2.  Track/monitor the amount of time each user spends logged in

   These can be achieved using the IAS log files that are generated in %windir%\system32\Logfiles. Additionally the tool “IASParse.exewill be of immense use to help you parse these logs. Information about IASParse.exe is available at http://www.microsoft.com/technet/prodtechnol/windowsserver2003/library/TechRef/5859c567-8c92-4212-b461-87729bb5daf7.mspx

 The IAS log files will have the information logged in a format which will be difficult to comprehend. (Please see attached file iaslog.txt for sample IAS logs). However, IASParse can be used to decode these IAS log files into readable format . The IAS log files should be in ‘IAS’ format for this (There are two options – IAS format and database compatible format)

 1. Track users who log on through Remote Access Services

A portion of the log file generated by IASParse is as follows:

 

 …

 NAS-IP-Address      : 65.52.46.226

 User-Name           : FAREAST\jananiv

 Record-Date         : 07/25/2005

 Record-Time         : 10:59:03

 Service-Name        : RAS

 …

 …

 Packet-Type         : Access-Accept

 Reason-Code         : The operation completed successfully.

 

 An “Access-Accept” is logged when the user is successfully authenticated. So, parsing this file will help in getting information about all users.

 

  1. Track/monitor the amount of time each user spends logged in

 Apart from the authentication requests as above, if we choose to log the ‘Accounting requests’ also - This needs to be selected in the RRAS console à Remote Access Logging à Doubleclick ‘Local file’ à Checking both ‘Authentication requests’ and ‘Accounting requests’ – a accounting request is logged once during the connection establishment and once during connection termination and both have the Record-Date and Record-Time logged. From these values for the both accounting requests, the time for which the user was connected can be calculated.

 User-Name           : FAREAST\jananiv

 Record-Date         : 07/25/2005

 Record-Time         : 10:59:03

  …..

  …..

 Acct-Status-Type    : Start

 Client-IP-Address   : 65.52.46.226

  …..

  …..

 Packet-Type         : Accounting-Request

 Reason-Code         : The operation completed successfully.

  

User-Name           : FAREAST\jananiv

 Record-Date         : 07/25/2005

 Record-Time         : 10:59:18

  …..

  …..

 Acct-Status-Type    : Stop

 Client-IP-Address   : 65.52.46.226

  …..

  …..

 Packet-Type         : Accounting-Request

 Reason-Code         : The operation completed successfully.

  

2. Another solution would be to use the RAS Administration DLLs.

 A RAS Administration DLL can be written whose MprAdminAcceptNewConnection2 can be implemented such that the username for the connection is logged (This can be got from the ‘wszUserName’ member of the pRasConnection2 parameter passed to MprAdminAcceptNewConnection2) and also the user connect time is logged.

MprAdminConnectionHangupNotification2 need to be implemented such that the time for which the user has been connected should be calculated. (Additional checking may have to be done here to see which user disconnected and if it is the same connection)

Information about administration DLL functions is available at

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rras/rras/ras_administration_dll.asp

 

3. To get the activity on a WAN Miniport (PPTP/L2TP) – which is the case when a VPN client connects to the server – the “Performance Counters” which come with the OS can be used. Performance logs can be generated for each port. However, this will not give the details about the user who connected to that port.

 

Thanks,

Janani

My first post

Hello, all fellow bloggers......at last into MSDN blogs.

A brief intro about me - I work for the Routing and Remote Access test development team in Microsoft India R&D Pvt. Ltd.

I actually had a difficult time figuring out how to create a blog after creating an account. So am posting it as my first blog :-)

1) Create an account by going to http://blogs.msdn.com

2) Log in using the username and password.

3) When you are logged in goto the link http://blogs.msdn.com/Createblog.aspx

4) The steps after that are intuitive enough to create your blog

 

Page view tracker