July 30, 2009 by gkaur3
If you ever download something and its an image file (.iso), you have two options. Either you can burn it to a cd or you can mount it to a virtual cd drive.
To mount it to a virtual cd drive, you need to download Virtual CD-Rom control panel for windows xp from Microsoft website :
Virtual CD-Rom Download
After you download and upzip it:
1. Double click on VCdControlTool.exe
2. Click on ‘Driver Control’
3. Click on Install Driver button. Navigate to the folder where you unzipped the software and locate
and double click on the file called: VCdRom.sys
4. Click Start
5. Click OK
6. Click ‘Add Drive’. Select an unused drive
7. Click Mount
8. Find the image (.iso) that you wanted to mount and click OK.
Now you can go to My Computer and double click on the drive that you just created. It will act as if you were using a regular cd.
Tags: cd burn, iso image, mount image, virtual drive
Posted in Useful Stuff | Leave a Comment »
July 30, 2009 by gkaur3
In windows, you can create batch file using notepad. Type in your commands in notepad and when you save it make sure to select “all files” under “Save as file”. Name the file with the extension .bat.
For example: myfile.bat
After you have created and saved the file, double click to run it.
To copy folders from one directory to another:
Simple way of doing it:
xcopy “X:\webservices\tubWebService” “C:\movefolder” /s
Above will copy whatever is in folder tubwebservice to the folder movefolder
Below are additional options for the xcopy command:
XCOPY source [destination] [/A | /M] [/D[:date]] [/P] [/S [/E]] [/V] [/W] [/C] [/I] [/Q] [/F] [/L] [/H] [/R] [/T] [/U] [/K] [/N] [/O] [/X] [/Y] [/-Y] [/Z] [/EXCLUDE:file1[+file2][+file3]…]
source Specifies the file(s) to copy.
destination Specifies the location and/or name of new files.
/A Copies only files with the archive attribute set, doesn’t change the attribute.
/M Copies only files with the archive attribute set, turns off the archive attribute.
/D:m-d-y Copies files changed on or after the specified date. If no date is given, copies only those files whose source time is newer than the destination time.
/EXCLUDE:file1[+file2][+file3]… Specifies a list of files containing strings. When any of the strings match any part of the absolute path of the file to be copied, that file will be excluded from being copied. For example, specifying a string like \obj\ or .obj will exclude all files underneath the directory obj or all files with the .obj extension respectively.
/P Prompts you before creating each destination file.
/S Copies directories and subdirectories except empty ones.
/E Copies directories and subdirectories, including empty ones. Same as /S /E. May be used to modify /T.
/V Verifies each new file.
/W Prompts you to press a key before copying.
/C Continues copying even if errors occur.
/I If destination does not exist and copying more than one file, assumes that destination must be a directory.
/Q Does not display file names while copying.
/F Displays full source and destination file names while copying.
/L Displays files that would be copied.
/H Copies hidden and system files also.
/R Overwrites read-only files.
/T Creates directory structure, but does not copy files. Does not include empty directories or subdirectories. /T /E includes empty directories and subdirectories.
/U Copies only files that already exist in destination.
/K Copies attributes. Normal Xcopy will reset read-only attribute
/N Copies using the generated short names.
/O Copies file ownership and ACL information.
/X Copies file audit settings (implies /O).
/Y Suppresses prompting to confirm you want to overwrite an existing destination file.
/-Y Causes prompting to confirm you want to overwrite an existing destination file.
/Z Copies networked files in restartable mode.
To copy a file:
copy a:\readme.txt a:\windows\help.txt
To delete file:
del filename
To rename a file:
Ren oldfile newfile
Posted in batch script | Leave a Comment »
July 29, 2009 by gkaur3
Creating Objects
set wordObj = createobject(“word.application”)
If you want to see the document after its created
wordObj.Visible = True
Create New Word Document
set doc = wordObj.documents.add
set selection = wordObj.selection
Write to Document
selection.typetext “Writing to document!”
Format text and display
selection.Font.Name = “Arial”
selection.Font.Size = “18″
To go to next line
selection.TypeParagraph()
To display date
selection.TypeText “” & Date()
To display value of a variable
selection.TypeText”"&myvariable
Save and Close document
doc.SaveAs(“C:\Scripts\mydocument.doc”)
wordObj.Quit
Posted in vbscript | 1 Comment »