CMD developer help

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

desmin

Thread Starter
Banned
Joined
Jul 10, 2007
Messages
57
Hey, ive made about 4-6 usefull BAT files
but with this BAT file script im having trouble. Its suppose to open up google in IE7 and also what ever the user typed in it will search that in google heres my code

Code:
@echo off

echo Enter Your Search Here

REM *this is suppose to be where there types *
REM *then it goes at the end of the URL to open* 


call "C:\Program Files\Internet Explorer\iexplore.exe" "www.google.com/search?hl=en&q="
so i dont know how to do this even the COMPUTER MASTA needs help sometimes
thx in advance
 

desmin

Thread Starter
Banned
Joined
Jul 10, 2007
Messages
57
no no no i want a user to be able to enter text and it goes at the end of the url to open
 

desmin

Thread Starter
Banned
Joined
Jul 10, 2007
Messages
57
it will when a user adds text ot be put in at the end of the URL to open
 
Joined
May 29, 2007
Messages
842
You can do this in C++ and it would be really easy to do. If you'd like I can guide you through how to do it.
 

desmin

Thread Starter
Banned
Joined
Jul 10, 2007
Messages
57
im learnnig VB.NET so i dont know any C++ but i want to know how to do it
PS this forum is great really fast replys too
 
Joined
May 29, 2007
Messages
842
I'm actually still learning C++ myself and know..very little. But I should be able to come up with some code for this :D
 

desmin

Thread Starter
Banned
Joined
Jul 10, 2007
Messages
57
ok if you can post it here inthis topic or someone help me with this batch file problem
 
Joined
Aug 17, 2001
Messages
7,486
You didn't assign the address to a variable. Try this:

Code:
@echo off

Set /p key=Enter Your Search Here  

start "%programFiles%\internet explorer\iexplore.exe" "www.google.com/search?hl=en&q=%key%"
Set /p key will wait for them to enter their search and then assign to the variable named key.

So now you add %key% to the google and google now searches.

I used start instead of call. That closes the command window for you without waiting for you to close the IE which is opened to search Google.
 
Joined
May 29, 2007
Messages
842
you should be able to leave out the %program files%\internet explorer part and just put "iexplore". i sometimes launch IE from the run prompt by typing iexplore >_>
 
Joined
Aug 17, 2001
Messages
7,486
you should be able to leave out the %program files%\internet explorer part and just put "iexplore". i sometimes launch IE from the run prompt by typing iexplore >_>

True. But only if you use Start. When you use Start, it causes the command to look here in the registry for the path to iexplore.exe:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\IEXPLORE.EXE

This is because Iexplore.exe is not located in the usual path statement and so is not found by looking in the usual places. If you do not use Start, it won't be found.
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Members online

Top