2009年8月24日 星期一

VB Script - Change ODD Drive Letter To 1st Available Drive Letter

1.
Set FileSystemObject = CreateObject("Scripting.FileSystemObject")'Create a filesystem
object
Set Drives = FileSystemObject.Drives 'Create a drives collection

2.
'step through the drive collection, and extract'the drive letter and the type of drive
'according to the Microsoft VBScript documentation
'there are 6 distinct types of drive

For Each DiskDrive in Drives
DriveLetter = DiskDrive.DriveLetterDriveType = DiskDrive.DriveType
Select Case DriveType
Case "0" DriveType = "Unknown type of drive"
Case "1" DriveType = "Removable drive"
Case "2" DriveType = "Fixed drive"
Case "3" DriveType = "Network drive"
Case "4" DriveType = "CD-ROM drive"ODD = DriveLetter
Case "5" DriveType = "RAM Disk"
End Select

'WScript.Echo "Drive " & DriveLetter & " is a " & DriveType
Next
'WScript.Echo "ODD drive letter is " & ODD

3.
' Search the first available drive letter
For i = 67 to 90
strDrive = Chr(i)
If FileSystemObject.DriveExists(strDrive) Then
Else NewODD = strDrive
Exit For
End If

Next
'Wscript.Echo NewODD & " is the new ODD drive letter"

4. call diskpart to change the ODD drive letter

2009年5月31日 星期日

運動日記

ref :
http://www.takesport.idv.tw/gym/workout/chest/chest.asp
http://www.takesport.idv.tw/gym/workout/tricep/tricep.asp
http://www.takesport.idv.tw/gym/workout/abs/abs.asp\

5/31 (Sun)

平臥啞鈴飛鳥
8, 8, 8
仰臥起坐
8, 8, 8
坐姿啞鈴三頭肌伸展
8, 8, 8


6/2 (Tue)

平臥啞鈴飛鳥
8,8,8
仰臥起坐
8,8,8
坐姿啞鈴三頭肌伸展
8,8,8


6/4 (Thu)

平臥啞鈴飛鳥
8,8,8
仰臥起坐
8,8,8
坐姿啞鈴三頭肌伸展
8,8,8

2009年1月12日 星期一

Start A Console Application in Minimized State

You can use this command to start a console application in minimized state from a batch file :

start /min

Ex : start /min echo hihi