Bart’s Weblog

Just a blog…

Archive for March, 2008

VBScript: Bypass the "Open File – Security Warning" dialog from VbScript

Posted by bartvdw on March 30, 2008

You have had it before: the “Open File – Security Warning”. Nice feature, but not very interesting during execution of scripts. However you may not want to turn it off.

The simple solution in VBScript has been offered by MS themselve: the SEE_MASK_NOZONECHECKS environment variable. Change it at the start of your script and restore it at the end. Plain & simple!

Sample code (same as the KB article):
set oShell= CreateObject(“Wscript.Shell”)
set oEnv = oShell.Environment(“PROCESS”)
oEnv(“SEE_MASK_NOZONECHECKS”) = 1
oShell.Run “c:\ms04-038\WindowsXP-KB834707-x86-enu /quiet /passive /norestart”,0,True
oEnv.Remove(“SEE_MASK_NOZONECHECKS”)

The Open File – Security Warning dialog box is displayed when you try to silently install a hotfix or an update by using a Visual Basic script in Windows XP Service Pack 2
http://support.microsoft.com/kb/889815

Posted in Scripting, VBScript | 1 Comment »

Important fix for ePO 3.6.x

Posted by bartvdw on March 30, 2008

Recently we had an issue on our ePO 3.6.x servers. In the CMA logs we found “ePO Server reached the maximum download limit”.

After some investigation we found a KB on the McAfee website documenting this related to Apache included in ePO installation.

My advise: apply it if running ePO 3.6.x by default.

ERROR: ePO Server reached the maximum download limit (issue: Apache configuration)
https://knowledge.mcafee.com/SupportSite/search.do?cmd=displayKC&docType=kc&externalId=9227574&sliceId=SAL_Public&dialogID=26664547&stateId=1%200%2026656632

Posted in McAfee | Leave a Comment »

How to identify SQL version & build…

Posted by bartvdw on March 30, 2008

Some time ago I needed to easily find the SQL version & build installed on a machine to identify missing patches. Below the links that will tell you everything you need about this!

Microsoft SQL Server 2008, 2005, 2000 and 7.0 Builds
http://sqlserverbuilds.blogspot.com/

How to identify your SQL Server version and edition
http://support.microsoft.com/kb/321185/

Also some registry keys that could be easy when you write custom scripts.

SQL Server 2005 Express
HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\SQLEXPRESS\MSSQLServer\CurrentVersion — CurrentVersion — REG_SZ

Posted in SQL | Leave a Comment »

Windows Vista Service Pack 1

Posted by bartvdw on March 20, 2008

Download links

x86
http://download.microsoft.com/download/3/a/9/3a9b72c2-527d-4694-8a49-84c056d4c34d/Windows6.0-KB936330-X86-wave0.exe

x64
http://download.microsoft.com/download/8/3/b/83b8c814-b000-44a4-b667-8c1f58727b8b/Windows6.0-KB936330-X64-wave0.exe

 

    Information links

    Release Notes
    http://technet2.microsoft.com/WindowsVista/en/library/37f23bde-283a-4341-9a8a-ca6eb86ac8a41033.mspx?mfr=true

    Windows Vista SP1 Guides for IT Professionals
    http://www.microsoft.com/downloads/details.aspx?FamilyId=E71F0083-1013-4F9C-A3F9-C56E7120A5E9&displaylang=en

    Frequently Asked Questions
    http://technet.microsoft.com/en-us/windowsvista/bb972745.aspx

     

    KB articles

    Windows Vista Service Pack 1 is not available for installation from Windows Update and is not offered by Automatic Updates
    http://support.microsoft.com/kb/948343

    A device driver is not installed, or a hardware device does not function correctly after you install Windows Vista Service Pack 1
    http://support.microsoft.com/kb/948187

    Posted in Windows | Leave a Comment »

    Troubleshooting TCP/IP…

    Posted by bartvdw on March 16, 2008

    This week I had a friend calling that he had no more internet connection. He had already been on the phone with the helpdesk of his ISP, reinstalled NIC, … If I couldn’t take a look before inserting a Windows XP CD and reinstalling the whole system.

    When I tried to view the TCP/IP properties, the “Properties” button was greyed out. To the command prompt then! “ipconfig” showed only “Windows IP Configuration”… When I ran the “netdiag” tool, it returned following: “Failed to get information for a network adapter. The error occurred was: The pipe is being closed. <232> [FATAL] Cannot find TCP/IP configuration from the registry”.

    OK there was clearly a problem, but what’s the cause and more important: solution? Reinstalling the NIC didn’t solve the problem and reinstalling TCP/IP was something I was willing to do, but I found out that it wasn’t easy to do as it is considered a core component and therefor can’t be removed & added again!

    I managed to fix this by applying several actions (and a lot of searching):
    1. Reset TCP/IP -> netsh int ip reset <log> (log is needed, ex. “C:\ResetIP.txt”)
    2. Reinstall “Internet Protocol (TCP/IP)” -> Add protocol, click on “Have disk…” and browse to “C:\%WinDir%\inf\nettcpip.inf” *
    3. Reinstall “Client for Microsoft Networks” -> Remove it first, when you add a Client afterwards, it will show in the list

    * For step 2 it is clear that if you have a Windows media available, to use the “nettcpip.inf” located on the media and not the local one as that could be corrupted.

    Below some very interesting links that helped me a lot!

    How to reset Internet Protocol (TCP/IP) in Windows XP
    http://support.microsoft.com/kb/299357

    How to troubleshoot TCP/IP connectivity with Windows XP
    http://support.microsoft.com/kb/314067

    How to reset “Internet Protocol (TCP/IP)” in Windows Server 2003
    http://support.microsoft.com/kb/317518

    How to determine and to recover from Winsock2 corruption in Windows Server 2003, in Windows XP, and in Windows Vista
    http://support.microsoft.com/kb/811259

    Windows Server 2003 TCP/IP
    http://technet2.microsoft.com/windowsserver/en/technologies/tcpip.mspx

    TCP/IP Fundamentals for Windows
    http://technet.microsoft.com/en-us/library/cc307741.aspx

    Posted in Windows | Leave a Comment »

    TS Windows 2000/2003: Essential command line utilities

    Posted by bartvdw on March 11, 2008

    I don’t work that much on Terminal Servers, but it happens. Sometimes it has been that long I need to think about the essential command line tools… Here they are!

    Command Meaning
    change logon Used to disable, enable, or check the status of logons
    change port Modify DOS com ports or query for the status of ports
    change user Change .ini file mapping for the current user. Applicable change user parameters are install, execute, and query
    cprofile Remove user’s profile file associations
    flattemp Enable or disable temporary flat directories
    logoff End a client session
    msg Send a message to a client
    mstsc Displays the Remote Desktop Connection to establish a connection with a Terminal Server
    query process Display process information
    query session Display terminal services session information
    query termserver Display terminal server list
    query user Display logged on user list with information. Like “who” in UNIX
    register Register a program
    reset session Reset or delete a terminal session
    shadow Monitor or remotely control a terminal service session
    tscon Start a Terminal Services session
    tsdiscon End a Terminal Services session
    tskill Terminate a Terminal Server process
    tsprof Change a user profile path or copy user information
    tsshutdn Shut down a terminal server

     

    HOW TO: Use the RESET SESSION Command to Reset a Session in Windows 2000 Terminal Services
    http://support.microsoft.com/kb/320192

    HOW TO: Use the TSSHUTDN Command to Shut Down a Terminal Server in Windows 2000 Terminal Services
    http://support.microsoft.com/kb/320188

    HOW TO: Clean Profiles By Using the Cprofile Command in Terminal Services
    http://support.microsoft.com/kb/320186

    HOW TO: Disconnect a Session by Using the TSDISCON Command in Windows 2000 Terminal Services
    http://support.microsoft.com/kb/321705

    HOW TO: Use the TSKILL Command to End Processes in Windows 2000 Terminal Services
    http://support.microsoft.com/kb/320052

    HOW TO: Turn Off Logons to a Terminal Server By Using the CHANGE LOGON Command in Windows 2000
    http://support.microsoft.com/kb/320183

    HOW TO: Register Programs to Run in a Global Context by Using the REGISTER Command in Windows 2000 Terminal Services
    http://support.microsoft.com/kb/321701

    HOW TO: Use the SHADOW Command to Remotely Monitor an Active Session of Another User in Windows 2000 Terminal Services
    http://support.microsoft.com/kb/320191

    HOW TO: Change COM Port Mappings by Using the CHANGE PORT Command in Windows 2000 Terminal Services
    http://support.microsoft.com/kb/320184

    HOW TO: Connect to Another Session by Using the TSCON Command in Windows 2000 Terminal Services
    http://support.microsoft.com/kb/321703

    Windows 2000 Terminal Services Session Management Tools
    http://support.microsoft.com/kb/243202

    Managing Terminal Services from the command line
    http://technet2.microsoft.com/windowsserver/en/library/1db49727-f587-424d-8d98-bb51630d13a01033.mspx?mfr=true

    Posted in Windows | Leave a Comment »