>Blogs
  >Links
  >Downloads
  >Photos
  >Contact
  >Feedback
  >MOBILE
Valid CSS!

Server Cluster:

Email
Pass
Sign In:
User:
Pass


Google
Tracking
YouTube
eBay
Ency
Wiki
° CONVERT
F:
C:

Wed 10th Mar, 2010 02:29 pm

Quick Links

Lastest Blog posts @ Curveo
Do a Quick Search
Posts to show?
Batch File Help3-9-2010
from curtis

Creating a batch file

MS-DOS users
Microsoft Windows and other users

MS-DOS users

To create a basic batch file in MS-DOS, follow the below steps that give you an example of how to create a basic batch file.

  1. Open an MS-DOS command window or get to MS-DOS. Additional information about doing this can be found on document CHDOS.
  2. At the MS-DOS prompt, type: edit test.bat and press enter.
  3. If typed properly, you should now be in a blue screen. Within the screen, type:

    pause
    dir c:windows
    dir c:windowssystem

  4. Once the above three lines have been typed in, click File and choose exit; when prompted to save, click "Yes." Users who do not have a mouse cursor can accomplish this same task by pressing ALT+F to access the file menu, then pressing "X" to exit, and pressing enter to save changes.
  5. Once you are back at the MS-DOS prompt, type: test and press enter. This will execute the test.bat file and begin running the file. Because the first line is pause, you will first be prompted to press a key. Once you press a key the batch file will run line-by-line; in this case, listing the files in the windows and windowssystem directories.

If you wish to add more lines to this batch file you would simply type "edit test.bat" to edit the file again.

Additional information about the MS-DOS edit command can be found on our edit command page. Some versions of MS-DOS and bootable diskettes may not have the edit command; if this is the case, you would either need to obtain the edit.com file to access this file or use the copy con command.

Microsoft Windows and other users

A Windows user can still use the above MS-DOS steps if they wish to create a batch file. If, however, you're more comfortable using Microsoft Windows or your operating system, you can use any text editor, such as Notepad or Wordpad, to create your batch files, as long as the file extension ends with .bat. In the below example we use the Windows notepad to create a batch file.

  1. Click Start
  2. Click Run
  3. Type: notepad and press enter.
  4. Once notepad is open, type the below lines in the file or copy and paste the below lines into notepad.

    @echo off
    echo Hello this is a test batch file
    pause
    dir c:windows

  5. Click File and click Save; browse to where you want to save the file. For the file name, type "test.bat", and if your version of Windows has a "Save as type" option, choose "All files", otherwise it will save as a text file. Once all of this has been done click the Save button and exit notepad.
  6. Now, to run the batch file, simply double-click or run the file like any other program. Once the batch file has completed running it will close the window automatically.

Batch commands

Just like all MS-DOS commands, all batch file commands are not case sensitive. However, in the below listing we have listed all commands in all caps to help you identify what is a command and what is not.

@Does not echo back the text after the at symbol. This is most commonly used as @ECHO OFF to prevent any of the commands in the batch file from being displayed, just the information needed.
%1The percent followed by a numeric value, beginning with one, allows users to add variables within a batch file. The below line is an example of what can be used in a batch file.

ECHO Hello %1

When the above one-line batch file is created, add your name after the batch file. For example, typing myname (being the name of the bat file) and then your name:

myname bob

would output:

Hello bob

Note: This can be extended to %2, %3, and so on.

::One of two ways of adding remarks into the batch file without displaying or executing that line when the batch file is run.
:LABELBy adding a colon in front of a word, such as LABEL, you create a category, more commonly known as a label. This allows you to skip to certain sections of a batch file such as the end of the batch file. Also see GOTO.
CALLThis is used to run another batch file within a batch file. When the batch file that is called is completed, the remainder of the original batch file is completed. Note if the batch file does not exist it will give an error message.
CHOICESee running different programs for an example of how to use this command.
  • Additional information and the syntax of this command in each version of Windows and MS-DOS can be found on our CHOICE command page.
CLSJust like the DOS command would clear your screen.
  • Additional information and the syntax of this command in each version of Windows and MS-DOS can be found on our CLS command page.
ECHOWill echo a message in the batch file. Such as ECHO Hello World will print Hello World on the screen when executed. However, without @ECHO OFF at the beginning of the batch file you'll also get "ECHO Hello World" and "Hello World." Finally, if you'd just like to create a blank line, type ECHO. adding the period at the end creates an empty line.
EXITExits out of the DOS window if the batch file is running from Windows.
  • Additional information and the syntax of this command in each version of Windows and MS-DOS can be found on our EXIT command page.
GOTO LABELUsed to go to a certain label, such as LABEL. An example of GOTO would be to GOTO END. For an example of this see running different programs.
  • Additional information and the syntax of this command in each version of Windows and MS-DOS can be found on our GOTO command page.
IFUsed to check for a certain condition if the condition exists. If that condition exists it will perform that function. To see an example of this see running different programs.
  • Additional information and the syntax of this command in each version of Windows and MS-DOS can be found on our IF command page.
PAUSEPrompt the user to press any key to continue.
REMOne of two ways of adding remarks into the batch file without displaying or executing that line when the batch file is run.
SHIFTChanges the position of replaceable parameters in a batch program.
  • Additional information and the syntax of this command in each version of Windows and MS-DOS can be found on our SHIFT command page.
STARTUsed for Windows 95, Windows 98, and Windows NT 4.0 and above to start a windows application; such as START C:WINDOWCALC would run the Windows Calculator. Users running Windows 3.x need to utilize the WIN command.  For example, WIN C:WindowsCALC.EXE would run Windows and then Calculator after Windows has finished loading. 

Batch file examples

Running different programs
How to start Windows files and programs from a batch file
Creating a batch file delay
How to make a time log

Running different programs

Below is a simple example of how you can implement the choice options into your batch files. Each line that is in red can be left out of the batch file. They have been included to help explain some of what the batch file means. Windows 2000 and Windows XP users will need to substitute the choice command with the set command; see our set command page for additional help and information with this command.

@ECHO OFF
REM - LABEL INDICATING THE BEGINNING OF THE DOCUMENT.
:BEGIN
CLS
REM - THE BELOW LINE GIVES THE USER 3 CHOICES (DEFINED AFTER /C:)
CHOICE /N /C:123 PICK A NUMBER (1, 2, or 3)%1
REM - THE NEXT THREE LINES ARE DIRECTING USER DEPENDING UPON INPUT
IF ERRORLEVEL ==3 GOTO THREE
IF ERRORLEVEL ==2 GOTO TWO
IF ERRORLEVEL ==1 GOTO ONE
GOTO END
:THREE
ECHO YOU HAVE PRESSED THREE
GOTO END
:TWO
ECHO YOU HAVE PRESSED TWO
GOTO END
:ONE
ECHO YOU HAVE PRESSED ONE
:END

How to start Windows files and other programs from a batch file

To run Microsoft Windows programs or files use the START command. The below example would run Windows Notepad.

START /MAX NOTEPAD

You can also specify the direct location of the file by typing the below command.

START /MAX C:WindowsNOTEPAD.EXE

*Windows users who have a different directory (e.g. Windows 2000 users) would need to substitute WINNT or the name of their directory in place of Windows in the above example.

The /m representing it to start the window Maximized. See our start command page for additional information about this command.

Creating a batch file delay

Below is an example of how to delay a batch file any where from 5 to 99 seconds. In the below example we illustrate a 5 second delay.

TYPE NUL | CHOICE.COM /N /CY /TY,5 >NUL

Additionally, you could use the sleep file found on our utility download section.

How to make a time log in a batch file

The below example demonstrates how to create a time log of when the batch file is loaded, or for example, this could be used in the autoexec.bat when someone logs into a computer that supports this file.

ECHO. |TIME > TIME
COPY LOG +TIME

An alternate, slightly more complicated method that, to our knowledge, cannot be used in Windows NT, Windows 2000 or Windows ME would be the following:

echo @prompt set date=$d$_set time=$t$h$h$h > {a}.bat
%comspec% /e:2048 /c {a}.bat > {b}.bat
for %%v in ({b}.bat del) do call %%v {?}.bat
echo %date% %time% >> log

Another alternative is:

echo. |time |find "current" >> log

For the above batch file to work properly you must create a file called log, by typing edit log and then save and exit the file, creating a 0 bytes file. If this file is not created or not created properly you will receive the error message Content of destination lost before copy.

Source = http://www.computerhope.com/batch.htm


View Comment(0) | Submit Comment | Submit FEEDBACK
iPod Nano 8g - Black2-28-2010
from curtis

I bought an iPod touch and no longer need this ipod. It comes with all cases, cables, a Speck case, Nike+ arm band case, & receiver for nike+ kit (iPod end only). It does NOT come with ear phones as i am using them for my new iPod. I have owned it for about 6 months, its in perfect condition. (NOTE: not most current gen w/camera)


  • Location: Mill Creek, WA
  • it's NOT ok to contact this poster with services or other commercial interests
image 1620745859-0 image 1620745859-1
image 1620745859-2

Source = http://seattle.craigslist.org/sno/ele/1620745859.html


View Comment(0) | Submit Comment | Submit FEEDBACK
How to fix "Page cannot be found" type errors when upgrading the connector2-16-2010
from curtis

Windows Home Server stores certain files in the home server shares, because they need to be available in a variety of ways. Included are the Windows Home Server Connector install files. Power Pack 1 documentation includes a list of the critical folders, which should not be moved or deleted.

If you have deleted them, you will need to recreate the connector software folder to upgrade the connector when you have installed Power Pack 1. The only supported way to recover that folder if it has been removed is via a server reinstallation. However, you may be able to recover by:

  • Recreate the folder "Home Server Connector Software" in your Software share.
  • Create a folder "DOTNETFX20" in the "Home Server Connector Software" folder.
  • Create a folder "WindowsInstaller31" in the "Home Server Connector Software" folder.
  • Log on to your server using Remote Desktop. Be cautious when logged in in this fashion; it's unsupported, and there are tools available which, while familiar from other operating systems, may cause severe issues (up to and including complete data loss) when used on a Windows Home Server based computer.
  • In Remote Desktop, copy the following files to "localhostHome Server Connector Software" (Note: there is a .cmd file which should perform this step: C:WHSConnectorInstallAssistant.cmd):
    • C:WHSsetup.exe
    • C:WHSWHS_ConnectorHelp.chm
    • C:WHSWHSConnector.msi
    • C:WHSWHSConnector_x64.msi
    • C:WHSWHSConnectorInstall.exe
    • C:WHSWHSVersionUpgrade.dll
    • C:WHSWHSVersionUpgrade_x64.dll
  • In Remote Desktop, copy the following files to "localhostSoftwareHome Server Connector SoftwareDOTNETFX20":
    • C: edistrdotnetchk.exe
    • C: edistrdotnetfx.exe
  • In Remote Desktop, copy "C: edistrWindowsInstaller-KB893803-v2-x86.exe" to "localhostSoftwareHome Server Connector SoftwareWindowsInstaller31".
There may be additional steps required in order to completely restore connector installation functionality, depending on whether you have made other changes to your server.

If you have an OEM product (an HP MediaSmart Server, for instance) there may be additional files and folders required by the OEM extensions to the WHS platform. In this case, you may be forced to perform a server recovery according to the instructions in the manuals you received with your server, as I see no easy way to recover those file

Source = http://social.microsoft.com/Forums/en-US/whsfaq/thread/144dda77-d40a-4fe9-a5bc-bf71fa66b0d5


View Comment(0) | Submit Comment | Submit FEEDBACK
Bugati Veyron Vids12-27-2009
from curtis

Source =


View Comment(0) | Submit Comment | Submit FEEDBACK
Integrate the New Hulu Desktop into Media Center12-5-2009
from curtis

Integrate the New Hulu Desktop into Media Center

Posted By: Sarah Perez | May 29th @ 12:03 PM | 27,480 Views | 80 Comments
Formats:

On Thursday, Hulu announced  a new desktop software program for watching videos on your PC without a web browser. The software, simply called Hulu Desktop, was designed to operate with Windows Media Center remote controls. So now, instead of having to choose from a ton of add-ins in Media Center, you can use the official software provided by Hulu themselves to see videos on your desktop.

The folks over at Missing Remote have put together a guide on how to add Hulu Desktop to Media Center as a shortcut from the main screen. This isn’t the only way to get this done, but at least it’s well-documented! Thanks guys.

STEPS (via Missing Remote):

Note, the following steps assume you installed into the default Hulu directory, which is C:UsersYOURUSERNAMEAppDataLocalHuluDesktop. If you changed the directory, simply replace the directories in the ini and xml files.

  1. Download the file here: HuluMCE Plugin
  2. Unzip the folder into your Hulu directory (which default is C:UsersUSERNAMEAppDataLocalHuluDesktop)
  3. The files should result in a HuluMCE folder (C:UsersUSERNAMEAppDataLocalHuluDesktopHuluMCE).
  4. IMPORTANT STEP: Browse to the above HuluMCE folder, and Right Click on the HuluMCEreg.xml file and select EDIT
    1. Replace the username "Mike" from the following line with YOUR USERNAME:  imageUrl="C:UsersMikeAppDataLocalHuluDesktopHuluMCEicon.png"
  5. Still in the above folder, right click on the InstallHulu.cmd and select Run as Administrator
  6. A dialog box will appear with the message Success
  7. Close all your windows, launch Media Center with your remote, and the shortcut for Hulu Desktop will appear under the TV+Movies row, as well as in the Program Library

*NOTE: If you prefer to have the shortcut appear in the TV+Movies row, you will need to edit theHuluMCEreg.xml file (Right click > Edit). On the line which says  , replace TV with Pictures. (eg., You can visit the followingMSDN Webpage for a full list of category entrypoints you can launch from.

For more details, check out their blog post.

Tag: Windows Media Center

Source = http://on10.net/blogs/sarahintampa/Integrate-the-New-Hulu-Desktop-into-Media-Center/


View Comment(2) | Submit Comment | Submit FEEDBACK
pg# 2|3|4|5|6|7|8|9|37|38|39| >>


Coypwrite Email Me
All rights reserved