Saturday 30 January 2016

Show hidden files in MacOSX

defaults write com.apple.finder AppleShowAllFiles YES
 

Reset launchPad in OSX



Apply to OS X Yosemite 10.10.x +
 
  1. Open the Terminal application and enter the following defaults write command string:
  2. defaults write com.apple.dock ResetLaunchPad -bool true; killall Dock
  3. Hit return and wait for the Dock to relaunch and Launchpad to reset


Refer:
http://osxdaily.com/2011/08/01/refresh-launchpad-in-mac-os-x-10-7-lion/ 

OSX Script - convert/split video usng ffmpeg



(* display dialog "Enter start time" default answer ""
set _start to text returned of result
display dialog "Enter end time " default answer ""
set _end to text returned of result
*)

on run {input, parameters}
    tell application "Terminal"
        activate
       
        set filesString to ""
        display dialog "Enter start time" default answer ""
        set temp to text returned of result
        set temp to ((characters 1 thru 2 of temp) as string) & ":" & ((characters 3 thru 4 of temp) as string) & ":" & ((characters 5 thru 6 of temp) as string)
        set starttime to temp
        set temp to ""
       
        display dialog "Enter end time " default answer ""
        set temp to text returned of result
        set temp to ((characters 1 thru 2 of temp) as string) & ":" & ((characters 3 thru 4 of temp) as string) & ":" & ((characters 5 thru 6 of temp) as string)
        set endtime to temp
       
        set filesString to ""
        repeat with file_ in input
            set filesString to filesString & " " & quoted form of (POSIX path of file_)
        end repeat
       
       
        (*    set filesName to {}
        repeat with anItem in filesString
            if anItem is not package folder and kind of anItem is not "Folder" and kind of anItem is not "Volume" then
                set end of filesName to contents of anItem
            end if
        end repeat
        *)
        do script "for f in" & filesString & "; do ffmpeg -i \"$f\" -vcodec copy -acodec copy -ss " & starttime & " -to " & endtime & " \"${f%.*}_.mp4\"
        exit 0
        done"
    end tell
    return input
end run

OSX Script - Lock Screen

 Create a service script in automator with following

/System/Library/CoreServices/"Menu Extras"/User.menu/Contents/Resources/CGSession -suspend

then configure keyboard shortcut

OSX script - delete file right away


 Using automator to create a service and copy/paste following

for f in "$@"
do
    rm -rf "$f"
done
afplay "/System/Library/Components/CoreAudio.component/Contents/SharedSupport/SystemSounds/finder/empty trash.aif"

then configure keyboard shortcut with key combinations

Install LAMP on centOS



export LANGUAGE=en_US.UTF-8
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_TYPE=en_US.UTF-8

#####################################
# CONFIGURE FTP
#/etc/vsftpd/ftpusers ---> remove root
#/etc/vsftpd/vsftpd.conf ----> anonymous_enable=NO  //
#                              ascii_upload_enable=YES
#                              ascii_download_enable=YES
#                              use_localtime=YES
#                               local_root=/
#####################################
#install http server
yum -y install httpd httpd-devel
###########################
#update rpm repository and install php5.6 components
rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm
yum -y install php56w php56w-opcache php56w-devel php56w-pecl-geoip php56w-mysql phpmyadmin -y
######################################
#update yum repository and install MariaDB updated version (mysql server)
echo "# MariaDB 10.0 CentOS repository list - created 2013-08-23 13:08 UTC" > /etc/yum.repos.d/MariaDB.repo
echo "# http://mariadb.org/mariadb/repositories/" >> /etc/yum.repos.d/MariaDB.repo
echo "[mariadb]" >> /etc/yum.repos.d/MariaDB.repo
echo "name = MariaDB" >> /etc/yum.repos.d/MariaDB.repo
echo "baseurl = http://yum.mariadb.org/10.0/centos6-amd64" >> /etc/yum.repos.d/MariaDB.repo
echo "gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB" >> /etc/yum.repos.d/MariaDB.repo
echo "gpgcheck=1" >> /etc/yum.repos.d/MariaDB.repo
yum -y install MariaDB-client MariaDB-server MariaDB-devel
service mysql start

#configuring mysql server
mysql_secure_installation




#########################################

wget http://xcache.lighttpd.net/pub/Releases/3.2.0/xcache-3.2.0.tar.gz
tar -zxvf xcache-3.2.0.tar.gz
cd xcache-3.2.0
/usr/bin/phpize
./configure --enable-xcache --enable-xcache-coverager --enable-xcache-optimizer --with-php-config=/usr/bin/php-config
make && make install
cp xcache.ini /etc/php.d

#wget http://pecl.php.net/get/geoip-1.1.0.tgz
#tar -xzf geoip-1.0.3.tgz
#cd geoip-1.1.0
#/usr/bin/phpize
#./configure
#make
#make install

#yum install GeoIP-devel

#pecl install geoip

#change phpmyadmin and php.ini settings
#/etc/httpd/conf.d/phpMyAdmin.conf
#/etc/php.ini ---- memory_limit = 256M  upload_max_filesize = 20M

#################
#start http ftp services and set auto start on reboot
service httpd restart
service vsftpd restart
chkconfig httpd on
chkconfig vsftpd on
chkconfig mysql on


Windows 7 – Fixing The Mapped Drive Credentials Problem

In the Group Policies Editor, open each of the following items in turn:
Computer Configuration
Windows Settings
Security Settings
Local Policies
Security Options
Now, right-click on the “Network security: LAN Manager authentication level” policy item, and then, from the context (pop-up) menu, select “Properties”.
Now select the “Local Security Settings” tab, and then, in the dropdown box, locate and select “Send LM & NTLM – user NTLMv2 session security if negotiated”.

from [url]http://www.gadgetgrill.com.au/2009/11/19/windows-7-fixing-the-mapped-drive-credentials-problem/[/url]

how to disable digital signature in win7

1. bcdedit.exe -set loadoptions DDISABLE_INTEGRITY_CHECKS
2. bcdedit.exe -set TESTSIGNING ON
3. Restart

save number key state after log off

HKEY_CURRENT_USER\Control Panel\Keyboard

   InitialKeyboardIndicators: REG_SZ: NUMBER

   Default: 0

change to "2"

refer to [url]http://support.microsoft.com/kb/123498[/url] and [url]http://support.microsoft.com/kb/102978/EN-US[/url]

excel marco google map retreive xml data

modifed for work


Sub getDistances()

Dim xhrRequest As XMLHTTP60
Dim domDoc As DOMDocument60
Dim ixnlDistanceNodes As IXMLDOMNodeList
Dim ixnNode As IXMLDOMNode
Dim lOutputRow As Long

' Read the data from the website
Set xhrRequest = New XMLHTTP60
xhrRequest.Open "GET", "http://maps.googleapis.com/maps/api/directions/xml?origin=address&destination=address&sensor=false", False
xhrRequest.send

' Copy the results into a format we can manipulate with XPath
Set domDoc = New DOMDocument60
domDoc.LoadXML xhrRequest.responseText

' The important bit: select every node called "value" which is the child of a node called "distance" which is
' in turn the child of a node called "step"
'Set ixnlDistanceNodes = domDoc.SelectNodes("//leg/distance/text")

Set ixnNode = domDoc.SelectSingleNode("//leg/distance/text")

' Basic stuff to output the distances
Range("B2").Value = ixnNode.Text



Set ixnNode = Nothing
Set ixnlDistanceNodes = Nothing
Set domDoc = Nothing
Set xhrRequest = Nothing

End Sub

VBA code for retrieving distance between two places from google map

Sub getDistances()

Dim xhrRequest As XMLHTTP60
Dim domDoc As DOMDocument60
Dim ixnlDistanceNodes As IXMLDOMNodeList
Dim ixnNode As IXMLDOMNode
Dim lOutputRow As Long

' Read the data from the website
Set xhrRequest = New XMLHTTP60
xhrRequest.Open "GET", "http://maps.googleapis.com/maps/api/directions/xml?origin=Scoresby&destination=Melborne&sensor=false", False
xhrRequest.send

' Copy the results into a format we can manipulate with XPath
Set domDoc = New DOMDocument60
domDoc.loadXML xhrRequest.responseText

' The important bit: select every node called "value" which is the child of a node called "distance" which is
' in turn the child of a node called "step"
Set ixnlDistanceNodes = domDoc.selectNodes("//step/distance/value")

' Basic stuff to output the distances
lOutputRow = 1
With Worksheets("Sheet1")
    .UsedRange.ClearContents
    For Each ixnNode In ixnlDistanceNodes
        .Cells(lOutputRow, 1).Value = ixnNode.Text
        lOutputRow = lOutputRow + 1
    Next ixnNode
End With

Set ixnNode = Nothing
Set ixnlDistanceNodes = Nothing
Set domDoc = Nothing
Set xhrRequest = Nothing

End Sub

disable bitlocker from winPE

Boot from a Vista WinPE disc, or Bart, whatever you want to use.
Then use:[color=Red] cscript manage-bde.wsf -unlock C: -recoverypassword nnnnnn-nnnnnn-nn....
[/color]
Where "nnnnnn" is the 48 digit recovery password for the drive.

dism /Cleanup-wim to coercively unmount images

SQL Server 2005 Connectivity Issue Troubleshoot

This post provides some tips to troubleshoot Sql Server connection problems based on various displayed error messages. And, I will describe connection problems according to different client stack: SNAC/MDAC/SQLClient. Thus, there are 3 parts for this topic.



First Part – Troubleshoot SNAC connect to SQL Server 2005

Second Part - Troubleshoot MDAC connect to SQL Server 2005

Third Part – Troubleshoot SqlClient connect to SQL Server 2005



Before start, it is very important to identify which client connected to Server and failed. Here, I list out follow key terminology in Sql Server Connection.



SNAC - A new data access technology that is new in SQL Server 2005, and is a stand alone data access application programming interface that is used for both ODBC and OLEDB.



MDAC - Microsoft Data Access Component contains core data access components, such as OLEDB provider and ODBC provider.



SqlClient  - Access data from within a CLR database object by using the .NET Framework Data Provider for SQL Server.



Protocol Prefix: explicitly specify which protocol you want to use to make connection. Supported protocol prefix in Sql Server 2005 includes: “lpc:”, “np:”, “tcp:”, “via:”



Last connect cache – contains the fully resolved/specified connection strings for the instances that were successfully connected to.



Part I – Connection Fail when SNAC connects to Sql Server 2005



Use osql.exe to simulate the connection string in your application and quick troubleshoot if your application uses ODBC provider and use sqlcmd.exe for OLEDB provider. They are located in %SYSTEMDRIVE%\Program Files\Microsoft Sql Server\90\tools\binn.



Basic connection string:          osql(sqlcmd) /S[prefix]<servername> /E

                                                Osql(sqlcmd) /S[prefix]<servername>\<Instance> /E

In each follow Message, there are two, one is from ODBC, and the other one is from OLEDB.



Message 1:



[SQL Native Client]Named Pipes Provider: Could not open a connection to SQL Server [53].
[SQL Native Client]Login timeout expired
[SQL Native Client]An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.


-OR-



HResult 0x35, Level 16, State 1
Named Pipes Provider: Could not open a connection to SQL Server [53].
Error: Microsoft SQL Native Client : An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections..

Error: Microsoft SQL Native Client : Login timeout expired.



This indicates that your target server can not be accessed or does not exist. Try to use "ping <servername>" , " ping <ipofserver>" , "ping -a <ip>", If either of the pings time out, fail, or do not return the correct values, then either the DNS lookup is not working properly or there is some other networking or routing issue that you will need to resolve.



Message 2:



[SQL Native Client]Named Pipes Provider: Could not open a connection to SQL

Server [2].

[SQL Native Client]Login timeout expired

[SQL Native Client]An error has occurred while establishing a connection to

the server. When connecting to SQL Server 2005, this failure may be caused by

the fact that under the default settings SQL Server does not allow remote connections.



-OR-



HResult 0x2, Level 16, State 1

Named Pipes Provider: Could not open a connection to SQL Server [2].

Error: Microsoft SQL Native Client : An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections..

Error: Microsoft SQL Native Client : Login timeout expired.



This error message means that the server was not found or not running or can not make Named Pipe connection through the pipe name that client specified. To verify this:



1) From the command line, do "sc query mssqlserver" or "sc query mssql$<instancename>" to check whether sql instance present.  Then open sql server configuration manager -> check the state of the sql service, if it is not running, start it. If server started fail, check event log or server error log, see what happened there.

2)  if you are sure the service is running and shared memory/Named Pipe enabled, please try connection if it is local default instance "osql /Snp:\\.\pipe\sql\query"; or try connection "osql /Snp:\\.\pipe\mssql$<InstanceName>\sql\query" if it is local named instance. if you still get error 2, then go to step 3).

3) Double check the server is started and listening on named pipe if you enabled Named Pipe. One way is that see the ERRORLOG of the server, search follow keywords:

Server named pipe provider is ready to accept connection on [ \\.\pipe\sql\query ] or [\\.\pipe\mssql$<InstanceName>\sql\query]

Notice that "sql\query" is the default pipe name, so you need to know server is listening on which pipe name. eg: if you specify server pipe name is "sql\query1", then you would see in the errorlog that server listening on [ \\.\pipe\sql\query1 ].

4) See your connection string, whether you explicitly specify the pipe name and does it match the pipe that server is listening on? Or whether you just specify server name( like ".","(local)", etc), but you specify the wrong pipe name on client side Named Pipe configuration.eg, go to SQL Server Configuration Manager, click client Named Pipe properties, see whether the pipe name is same with the one server listening on.

Note: For remote connection, you need to verify step 2) and 3). 

Message 3:



[SQL Native Client]Named Pipes Provider: Could not open a connection to SQL

Server [233].

[SQL Native Client]Login timeout expired

[SQL Native Client]An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.



 -OR-



HResult 0xE9, Level 16, State 1

Named Pipes Provider: Could not open a connection to SQL Server [233].

Error: Microsoft SQL Native Client : An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections..

Error: Microsoft SQL Native Client : Login timeout expired.



Note: the difference between Message 2 and Message 1 is “Could not open a connection to SQL Server [233].” – error state.



You might specify the server name as FQDN/127.0.0.1/ IP Address and NP was disabled on the server. To resolve this, first way is to replace server name as the machine name or “.” or”(local)” or “<machinename>” and you should be able to connect as long as server listening on Shared Memory; second way is to enable named pipe from sql configuration manager and restart server.



Message 4:



[SQL Native Client]Named Pipes Provider: No process is on the other end of the pipe.

[SQL Native Client]Communication link failure

[SQL Native Client]An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.



-OR-



HResult 0xE9, Level 16, State 1

Named Pipes Provider: No process is on the other end of the pipe.

Error: Microsoft SQL Native Client : Communication link failure.

Error: Microsoft SQL Native Client : An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections..



1) Local connection: You might specify the server name as FQDN/127.0.0.1/ IP Address in the connection string and speculate connection through Named Pipe provider. To resolve this, either change server name to <machinename> as long as the server is listening on Shared Memory or enabled NP.

2) Remote connection: the server is not listening on Name Pipe. To resolve this, enable name pipe on the remote server and restart the server.



Message 5:



[SQL Native Client]SQL Network Interfaces: Server doesn't support requested protocol [xFFFFFFFF].

[SQL Native Client]Login timeout expired

[SQL Native Client]An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.



-OR-



HResult 0xFFFFFFFF, Level 16, State 1

SQL Network Interfaces: Server doesn't support requested protocol [xFFFFFFFF].

Error: Microsoft SQL Native Client : An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections..

Error: Microsoft SQL Native Client : Login timeout expired.



1)     Local connection: You might explicitly specify protocol prefix “np:” and connect to a named instance and NP was disabled.

2)     Remote connection: You might connect to remote named instance and remote server is not listening on name pipe.

To resolve this, enable NP if you only want to use name pipe protocol or you can remove “np:” prefix to let connection over shared memory locally.



Message 6:



[SQL Native Client]SQL Network Interfaces: Error Locating Server/Instance Specified [0xFFFFFFFF].

[SQL Native Client]Login timeout expired

[SQL Native Client]An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remot the connections.



-OR-



HResult 0xFFFFFFFF, Level 16, State 1
SQL Network Interfaces: Error Locating Server/Instance Specified [xFFFFFFFF].

Error: Microsoft SQL Native Client : An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not

allow remote connections..

Error: Microsoft SQL Native Client : Login timeout expired.



You might connect to local named instance and explicitly specify protocol prefix “tcp:” or “np:” in the connection string, however, SqlBrowser service was not running.

To resolve this, you should enable Sqlbrowser service on the server

1)     Use net start or go to sql configuration manager(SSCM), check whether sqlbrowser service is running, if not, start it.

2)     You still need to make sure SqlBrowser is active. Go to SSCM, click properties of sqlbrowser service -> Advanced-> Active “Yes” or “No”, if sqlbrowser is running but is not active, the service would not serve you correct pipe name and Tcp port info on which your connection depends.



Message 7: Shared Memory provider error



HResult 0x2, Level 16, State 1

Shared Memory Provider: Could not open a connection to SQL Server [2].

Error: Microsoft SQL Native Client : An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections..

Error: Microsoft SQL Native Client : Login timeout expired.



-OR-



[SQL Native Client]Shared Memory Provider: Could not open a connection to SQLServer [2].

[SQL Native Client]Login timeout expired

[SQL Native Client]An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.

The error indicate you speculated shared memory as connection protocol and server is not listening on shared memory, plus you probably specified “.”/”(local)”/<machinename> /localhost as the server name in the connection string. To resolve this, enable shared memory protocol and restart the server.



Message 8:



[SQL Native Client]SQL Network Interfaces: Cannot open a Shared Memory connection to a remote SQL server [87].

[SQL Native Client]Login timeout expired

[SQL Native Client]An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.



-OR-



HResult 0x57, Level 16, State 1

SQL Network Interfaces: Cannot open a Shared Memory connection to a remote SQL server [87].

Error: Microsoft SQL Native Client : An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not  allow remote connections..

Error: Microsoft SQL Native Client : Login timeout expired.

The reason is same as the one of Message 6, just you might specify FQDN/127.0.0.1/IP Address as server name in the connection string.



Message 9: TCP specific



[SQL Native Client]TCP Provider: No connection could be made because the target machine actively refused it.

[SQL Native Client]Login timeout expired

[SQL Native Client]An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.



-OR-



HResult 0x274D, Level 16, State 1

TCP Provider: No connection could be made because the target machine actively refused it.

Error: Microsoft SQL Native Client : An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not  allow remote connections..

Error: Microsoft SQL Native Client : Login timeout expired.



The reason is server is not listening on TCP, probably TCP protocol was not enabled.



-Follow messages are some special case -



Message 10:



[SQL Native Client]Unable to complete login process due to delay in opening server connection.



Reason:

1)     There are spaces after Instance name in the connection string eg. osql /S”<machinename>\Instance  “ /E, to resolve this, you need to remove the trailing space.

2)     Connect through 127.0.01.

3)     Remote connection and WINS was disabled on the client machine and you connect using FQDN as server name. To resolve this, One way, turn on “File and Printer Sharing” and explicitly use name pipe protocol. Another is enlarge the connect timeout to around 30 secondes.



Message 11: - Firewall specific



HResult 0x274C, Level 16, State 1
An error has occurred while establishing a connection to the server. When connectiong to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.(provider:TCP Provider, errror:0-A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)



-OR-



Error: Microsoft SQL Native Client : An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections..
Error: Microsoft SQL Native Client : Login timeout expired.



This is because connection blocked by firewall. To resolve this, take follow steps:

1)     Enable SqlBrowser, see the info in Message 4. Plus, add sqlbrowser.exe into Firewall exception list: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\DomainProfile\AuthorizedApplications\List
2)     Add Tcp port to Firewall exception list. (eg, Name-1433:TCP, Value-1433:TCP:*:Enabled:Tcp 1433).

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\DomainProfile\GloballyOpenPorts\List

For more detailed  operation, see [url]http://support.microsoft.com/default.aspx?scid=kb[/url];en-us;287932



Message 12:



“[SQL Native Client] Can not Generate SSPI Message”



[url]http://blogs.msdn.com/sql_protocols/archive/2005/10/19/482782.aspx[/url]



Part II - Troubleshoot Connectivity Issue in SQL Server 2005



[url]http://blogs.msdn.com/sql_protocols/archive/2005/10/29/486861.aspx[/url]



Part III - Troubleshoot Connectivity Issue in SQL Server 2005



[url]http://blogs.msdn.com/sql_protocols/archive/2005/12/22/506607.aspx[/url]

remove TEST MODE water mark

bcdedit.exe -set loadoptions ENABLE_INTEGRITY_CHECKS
bcdedit.exe -set TESTSIGNING OFF

then restart

sigverif command to check if there are unsigned drivers by MS

grub4dos with bartpe etc....

the steps are:
A . CREATE BARTPE_INRAM.ISO (NEED RAM DISK OR BSoD when boot up into BARTPE)
    * 1. Download MS Windows Server 2003 Service Pack 1 (RC). It is a SFX CAB archive. You may use WinRAR to open it. Extract the SETUPLDR.BIN and RAMDISK.SY_. Expand ramdisk.sy_ to get RAMDISK.SYS.
    * 2. Build a normal pebuilder.iso with any source you like but
      replace the driver RAMDISK.SYS with the one from W2k3-SP1 (keep however the size sufficiently small since the whole iso will be loaded in RAM)
    * 3. From PEBuilder output directory take bootsect.bin and i386\ntdetect.com
    * 4. Create a WINNT.SIF text file containing the code
      CODE
      [SetupData]
      BootDevice = "ramdisk(0)"
      BootPath = "\i386\System32\"
      OsLoadOptions = "/noguiboot /fastdetect /minint /rdexportascd /rdpath=pebuilder.iso"
    * 5. Create a folder, say C:\rampe, UPPERCASE the 5 files above and use them to create within C:\rampe the following structure
      CODE
      BOOTSECT.BIN
      WINNT.SIF
      PEBUILDER.ISO
      I386\NTDETECT.COM
      I386\SETUPLDR.BIN
    * 6. Create the new pebuilder_inram.iso with mkisofs. Use something like
      CODE
      mkisofs.exe -iso-level 4 -volid "BartPE" -A PEBUILDER/MKISOFS -sysid "Win32" -no-emul-boot -b BOOTSECT.BIN -hide BOOTSECT.BIN -o pebuilder_inram.iso "C:\rampe"

As one can easily see, it is very easy to include a RAM version in a multiboot CD.
Simply use the known method to add multiple OS (hex edit bootsect.bin, setupldr.bin and rename I386)

B. FORMAT external USB drive with HP format tool(NTFS)
C. CREATE BOOTABLE MBR with Grubutil GUI
D. COPY default, grldr, menu.lst FROM grub4dos folder to formated usb drive
E. EDIT menu.lst with proper entries.[/color]

Using Leopard Time Machine to Backup of a Network

1. Go into Applications / Utilities and open up terminal
2. Copy and paste this command into terminal (all on one line)

defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1

3. Hit enter / return
4. Mount your network share, in my case my share is off our server called INAS1 and my share is called User-Backups
5. Go to System Preferences and open Time Machine
[url=http://www.imulus.net/george/software/using-leopard-time-machine-to-backup-of-a-network/]link[/url]

adding/renaming a group of computers to domain (ZT)

Remotely add a group of PCs into the Domain.

Example : After ghosting several PCs, you will need to rename each PC, and join each PC to the domain.
You can join all of the PCs to the domain by using a vbs script = "addmachine.vbs".

This vbscript will make use of "netdom.exe"to add the PC into the domain.

Create a text file with a list of Computernames that you want to add to the domain eg. "the.txt".

Put all three files = "netdom.exe" , "addmachine.vbs", "the.txt" into the same folder eg. C:\

You need to edit the script before you can use it :-

You need to know in which OU the PC is located in the domain eg.
> Students Machine > Teaching Facility > PCLAB > PCLAB2 in Domain: Computing
Replace the "username" and "password" with the correct domain username and password.
Replace the "pcusername" and "pcpassword" with the correct PC local administrator's username and password.
Edit the correct path to the.txt. eg. > file1 = "c:\netdompc2\the.txt"

To run it > open up Command Prompt, and type > cscript addmachine.vbs
Remotely reboot the PCs after successful completion (eg. reboot.bat).

CREATE BARTPE FAT32 FLASH DRIVE (Great for 8+ gigabyte drives)

Prerequisite: Bartpe installed and successfully build an CD image

Method 1 ( from UBCD4WIN forum with a little modification).

Tools Required :
                         HP USB Disk Storage Format Tool
                          PE2USB
                          Windows 98SE Bootable Floppy Disk
                          GRUB4DOS 0.4.3
                          Winimage.exe

Steps:
1. use unzip attached file to a folder named x(any drive letter):\bartpe and open
SP27608.exe to install HP USB format tool      
2.Open the HP USB Disk Storage Format Tool, Select your USB key and set the file system to FAT32
             Check "Create a DOS startup disk"
             Tell it to use the DOS system files located at x:\bartpe\boot98se
             Click "Start" and let it go.
3.Open PEtoUSB.exe, select source folder from BARTPE folder
            Check "Enable File Copy" and select Overwrite Always from the drop-down
            Click "Start" and wait for the file copy to finish
4.Select all the files for GRUB4DOS and copy them to the root of the USB key.
            Allow it to overwrite config.sys
5.Open config.sys and edit the second line as following:
CODE
device=grub.exe --config-file="color black/cyan yellow/cyan;timeout 0;default 0;title find and load NTLDR of Windows NT/2K/XP;find --set-root /ntldr;chainloader /ntldr"
This will allow it to go straight to the NTLDR process.
Boot your USB key.

Method 2:

required tools: Flashboot

Steps:  simply open flashboot and check first radio button, then next and give the path of bartpe CD image, then next to select flash drive that will be used
            next step, you have options to format flash drive or HDD, then click on next and finish, your flash drive will be bootable

install XP from USB flash drive

This was tested under Bartpe environment and it should work with all other PE environment too.

1.Boot into PE and create a primary partition and format it with FAT32/NTFS

2.Go to X drive (x is where xp installation files are stored, here is D drive for example)
3.Run D:\i386\winnt32.exe /syspart:C: /tempdrive:C: /makelocalsource. Replace C: with the drive you want to install Windows to.
Proceed with the installation. When asked to convert the installation volume to NTFS, answer No. The setup program incorrectly believes that your USB drive (which is formatted as FAT) needs conversion.

The setup program will then silently close, which might make you think that something went wrong. Don’t worry though. Reboot your system, remove the USB drive(s) and – if all went well – you can now finish setting up Windows XP

Here we can create unattended installation file to automate entire process

"It is Now Safe to Turn Off Your Computer" error message

[b]SYMPTOMS[/b]

When you try to shut down your Microsoft Windows XP-based or Microsoft Windows 2...When you try to shut down your Microsoft Windows XP-based or Microsoft Windows 2000-based computer, the computer may stop responding, and you may receive the following message:
It is now safe to turn off your computer


[b]CAUSE[/b]

This behavior may occur if one or more of the following conditions are true: You...This behavior may occur if one or more of the following conditions are true:
Your computer supports the Advanced Power Management (APM) feature, but the Advanced Configuration and Power Interface (ACP)-compliant basic input/output system (BIOS) is not configured correctly to permit the operating system to turn off the power supply.
During an upgrade of the operating system, Windows does not detect that the computer is ACPI-compliant.
An OEM device driver or service is installed on your computer that is preventing the computer from correctly shutting down.
Your computer is not ACPI-compliant.

[b]RESOLUTION[/b]

To solve this problem, follow these steps: Step 1: Enable Advanced Power Managem...To solve this problem, follow these steps:
Back to the top
Step 1: Enable Advanced Power Management support
Click Start, click Control Panel, and then double-click Power Options.

Note If you are using Windows XP, click Switch to Classic View in Control Panel to more easily follow these steps.
Click the APM tab.

Note If you are using multiple monitors, the APM tab may not be available.
Select Enable Advanced Power Management Support, and then click OK.


Step 2: Confirm that the computer's CMOS/BIOS settings are correct
Warning This procedure may involve changing your computer's complementary metal-oxide semiconductor (CMOS) settings and altering the BIOS. Incorrect changes to the BIOS of your computer may cause serious problems. Change the computer's CMOS settings at your own risk.

Incorrect or damaged CMOS and BIOS settings can cause startup and shutdown problems. For information about the correct CMOS and BIOS settings for your computer and about how to check and change these settings, see the documentation that came with your computer or contact the manufacturer. To confirm that the computer's BIOS is current, contact the computer manufacturer to inquire about the latest BIOS update that is available for your computer.
Back to the top
Step 3: Verify that the computer is ACPI-compliant
Click Start, click Control Panel, and then double-click System.
Click the Hardware tab, and then click Device Manager.
Expand the Computer branch. A specification that is similar to one of the following will appear:
ACPI Multiprocessor PC
ACPI Uniprocessor PC
Advanced Configuration and Power Interface (ACPI) PC
Compaq SystemPro Multiprocessor or 100% Compatible
MPS Uniprocessor PC
MPS Multiprocessor PC
Standard PC
If your computer is listed as Advanced Configuration and Power Interface (ACPI) PC, go to "Step 4: If the computer is ACPI-compliant."

If your computer is listed as a Standard PC, the issue will occur. However, you may be able to work around this issue. Go to "Step 5: If the computer is not ACPI-compliant."

If your computer is listed as a Standard PC, but you are sure that the computer is ACPI-compliant, go to "Step 4: If the computer is ACPI-compliant."
Back to the top
Step 4: If the computer is ACPI-compliant
If your computer is ACPI-compliant, follow these steps:
Click Start, click Control Panel, and then double-click Add or Remove Programs.
See if any one of the following programs is installed:
Logitech mouse drivers
Adaptec/Roxio software
Zone Alarm
If any one of these programs is installed, either contact the manufacturer of the program for an updated version or temporarily remove the program.
Try to shut down the computer to see if the issue is resolved.
If the issue still occurs, use Task Manager to determine the programs that are currently running on the computer. Manually quit each program that is listed in Task Manager, and then shut down and restart the computer to test if the shutdown problem is resolved. To do this, follow these steps:

Note All programs that are currently running on the computer may not be listed in the Applications tab of Task Manager.
Press CTRL+ALT+DELETE, and then click Task Manager.
Click the Applications tab.
In the Task column, click the program that you want to quit, and then click End Task.
Quit Task Manager.
Shut down the computer.
If the issue still occurs, contact the manufacturers of any additional devices on your computer, such as video adapters or sound cards, to obtain the latest drivers for the devices. For information about how to contact a vendor, click the appropriate article number in the following list to view the article in the Microsoft Knowledge Base:
65416  ([url=http://support.microsoft.com/kb/65416/]http://support.microsoft.com/kb/65416/[/url] ) Hardware and Software Third-Party Vendor Contact List, A-K

60781  ([url=http://support.microsoft.com/kb/60781/]http://support.microsoft.com/kb/60781/[/url] ) Hardware and Software Third-Party Vendor Contact List, L-P

60782  ([url=http://support.microsoft.com/kb/60782/]http://support.microsoft.com/kb/60782/[/url] ) Hardware and Software Third-Party Vendor Contact List, Q-Z
If the issue still occurs after you install current drivers, you may be able to work around this issue by converting the computer to be ACPI-compliant by changing the driver for the item under the Computer branch.

Important This procedure contains information about changing the Hardware Abstraction Layer (HAL) driver. Before you continue, make sure that the computer is ACPI-compliant, and make sure that you know how to restore Windows if a problem occurs.

For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
237556  ([url=http://support.microsoft.com/kb/237556/]http://support.microsoft.com/kb/237556/[/url] ) How to troubleshoot Windows 2000 Hardware Abstraction Layer issues
Warning Modifying the HAL incorrectly can cause serious problems that may require you to reinstall your operating system. Do not try to change from a standard HAL to an ACPI HAL unless you are sure that the computer is ACPI-compliant. For example, determine if the ACPI HAL is supported before you upgrade your operating system, or confirm that the computer supports ACPI by inspecting the BIOS. Incorrectly modifying the HAL can cause your computer to stop starting. Microsoft cannot guarantee that problems that are caused by incorrectly changing the HAL can be solved. Change the HAL at your own risk.

If you are sure that your computer is ACPI-compliant, follow these steps:
In Control Panel, double-click System.
Click the Hardware tab, and then click Device Manager.
Expand the Computer branch, and then double-click the detected HAL. For example, double-click Standard PC.
Click the Driver tab, and then click Update Drivers.

Note You can only change or update your HAL from Device Manager under Computer Type when you change from a Standard PC HAL to an ACPI HAL. If you change from an ACPI HAL to a Standard HAL, you may not be able to start your computer.
Back to the top
Step 5: If the computer is not ACPI-compliant
If the computer is not ACPI-compliant, you may be able to work around this issue by installing the NT APM/Legacy Device. Before you install the NT APM/Legacy device, you must first disable the Microsoft ACPI Device if it is installed.

To disable the Microsoft ACPI Device:
Open Control Panel, and then double-click System.
Click the Hardware tab, and then click Device Manager.
On the View menu, click Show Hidden Devices.
Expand Non-Plug and Play Drivers.
Do either of the following:
If Microsoft ACPI Driver is not listed:

In the NT APM/Legacy Support branch of the device tree, you will see the item NT Apm/Legacy Interface Node. It will show a red X to indicate that it is disabled.

Right-click NT Apm/Legacy Interface Node, and then click Enable.

After you follow these steps, Windows will shut down correctly.
If Microsoft ACPI Driver is listed, follow these steps:
Double-click Microsoft ACPI Driver.
Click the Driver tab, and then in the Type box, click Disabled.
Click OK, and then restart the computer.
When Windows restarts, repeat these steps to open the Microsoft ACPI Driver Properties dialog box, and then click the Driver tab.

Verify the following:
Disabled appears in the Type box.
Stopped appears in the Status section.
After you verify that the Microsoft ACPI Device is disabled, continue with the following steps to install the NT APM/Legacy device:
Open Control Panel, and then double-click Add Hardware.
When the Hardware Wizard stops searching for new hardware, click Yes, I have already connected the hardware, and then click Next.
Scroll to the bottom of the Installed Hardware list, click Add a new hardware device, and then click Next.
Click Install the hardware that I manually select from a list (Advanced), and then click Next.
Under Common Hardware Types, click NT Apm/Legacy Support, and then click Next.
Click NT Apm/Legacy Interface Node, and then click Next.
Click Next again, and then click Finish.
The computer will now correctly shut down.

The third-party products that this article discusses are manufactured by companies that are independent of Microsoft. Microsoft makes no warranty, implied or otherwise, regarding the performance or reliability of these products.
Microsoft provides third-party contact information to help you find technical support. This contact information may change without notice. Microsoft does not guarantee the accuracy of this third-party contact information.
Back to the top
MORE INFORMATIONFor additional information, click the following article numbers to view the arti...For additional information, click the following article numbers to view the articles in the Microsoft Knowledge Base:
266169  ([url=http://support.microsoft.com/kb/266169/]http://support.microsoft.com/kb/266169/[/url] ) How to troubleshoot problems with Standby, Hibernation, and shutting down your computer in Windows 2000
257562  ([url=http://support.microsoft.com/kb/257562/]http://support.microsoft.com/kb/257562/[/url] ) Hibernate and standby features are not available when using Standard VGA
313290  ([url=http://support.microsoft.com/kb/313290/]http://support.microsoft.com/kb/313290/[/url] ) Your computer may not shut down after you upgrade to Windows XP
237551   ([url=http://support.microsoft.com/kb/237551/]http://support.microsoft.com/kb/237551/[/url] ) Advanced Power Management features are disabled with Terminal Services
259889   ([url=http://support.microsoft.com/kb/259889/]http://support.microsoft.com/kb/259889/[/url] ) Standby option not available in multiple-processor configuration
255182   ([url=http://support.microsoft.com/kb/255182/]http://support.microsoft.com/kb/255182/[/url] ) Hibernate tab is not available in Power Options tool in Control Panel
197477   ([url=http://support.microsoft.com/kb/197477/]http://support.microsoft.com/kb/197477/[/url] ) The system cannot go to standby mode because the...
257199   ([url=http://support.microsoft.com/kb/257199/]http://support.microsoft.com/kb/257199/[/url] ) Device driver error message is displayed when the computer enters standby or hibernate mode
247480   ([url=http://support.microsoft.com/kb/247480/]http://support.microsoft.com/kb/247480/[/url] ) Error message after setting hibernation on computer with modem
247290   ([url=http://support.microsoft.com/kb/247290/]http://support.microsoft.com/kb/247290/[/url] ) APM Standby option is missing on PCs without a battery
252471   ([url=http://support.microsoft.com/kb/252471/]http://support.microsoft.com/kb/252471/[/url] ) Error Message: Removable Storage Manager refused the request to hibernate or suspend the system
259623   ([url=http://support.microsoft.com/kb/259623/]http://support.microsoft.com/kb/259623/[/url] ) Standby feature is available on computers with a battery or ACPI
211205   ([url=http://support.microsoft.com/kb/211205/]http://support.microsoft.com/kb/211205/[/url] ) Dell and IBM notebook computers may not suspend
247238   ([url=http://support.microsoft.com/kb/247238/]http://support.microsoft.com/kb/247238/[/url] ) Standby in shut down not available in IBM ThinkPad 380XD when APM is enabled
211271   ([url=http://support.microsoft.com/kb/211271/]http://support.microsoft.com/kb/211271/[/url] ) Cannot hibernate Windows 2000 after installing or uninstalling McAfee AntiVirus 3.1.4

-- ------------------------------------------------------------------------------

APPLIES TO
Microsoft Windows XP Home Edition
Microsoft Windows XP Professional
Microsoft Windows 2000 Advanced Server
Microsoft Windows 2000 Professional Edition
Microsoft Windows 2000 Server

MS support link[url=http://support.microsoft.com/kb/810903]: [url]http://support.microsoft.com/kb/810903[/url][/url]

computer rebooting after user logs in a while

Symptoms: computer suddently freezes and powers off with some windows dll error msg.

Troublshooting: tried reimage with sysprep image and tried ghost from another computer too in case the image i used was wrong. but none worked, then realized it's Hardware issue and took out 2 pieces memory sticks, tested work, then tested each of 2 taken out, found one bad. Also, switched onboard memory sticks to different slots just in case problem resides in slots.

Cause: one of 4 pieces DDR2 SIMM is damaged and once it's taken out of box, computer back to normal

solution: filed RMA

Delete local cached domain account

The Start>Run>control userpasswords2>Advanced>Manage Passwords optiion can be used to delete locally cached credentials but it won'r clear the domain cached credentials. These are  stored as hashes in the local systems registry at the values HKEY_LOCAL_MACHINE\SECURITY\CACHE\NL$1 through NL$10 and you can delete these id tou want. Note (Unless you change the security you require SYSTEM level privileges to access)