BetaONE will rise again!

BetaONE will rise again! (http:\\b1.hcanet.com\forum/index.php)
-   Software Support (http:\\b1.hcanet.com\forum/forumdisplay.php?f=45)
-   -   help on programming (http:\\b1.hcanet.com\forum/showthread.php?t=6615)

TheMysterio 8th Feb 03 11:19 AM

hi
is it possible to open IE and Outlook via a Batch File (.bat) . if so can any one tell me how to do that.

Thanks&Regards
TheMysterio

unicorn 8th Feb 03 01:42 PM

Yes. What OS? running this command in a command window:

X:\"program files"\"internet explorer"\iexplore.exe

substituting X with the letter for your system drive will start Internet Exploded if you are running XP. My guess is that Outlock can be started in a similar way. Then depending of the OS there are different ways to handle bat-files (minor differences) and their content. If you for example want a batfile to "stay open" in a command window while an application is running and close a little later the syntax differs. This can be a start though, I think you can see the basic ideea.

As always Google is your friend. There are lots of pages describing bat-files. Theese can bo made pretty advanced with some training and include commands like start, exit, call, and even time-delay functions. A tip, when done you sometimes can have good use of the fact that a shortcut laying on the desktop can be given different properties (rightclick and check it out).

Good luck!

JacKDynne 11th Feb 03 01:25 PM

You can also check this link Mysterio for some more examples and help ;)

http://www.labmice.net/scripting/batchfiles.htm

Hope this helps some :)

/JD

TheMysterio 13th Feb 03 11:58 AM

thanks for the link JD.
Sorry for the late reply

JacKDynne 13th Feb 03 03:45 PM

No problemo m8 :) Hope it helps, batch files can be really useful, I have one that clears all user's temp internet files on logon and logoff:

SET SRC1=C:\Documents and Settings
SET SRC2=Local Settings\Temporary Internet Files\Content.IE5
FOR /D %%X IN ("%SRC1%\*") DO FOR /D %%Y IN ("%%X\%SRC2%\*.*") DO RMDIR /S /Q "%%Y"

I use it on terminal servers where space needs to be conserved (just changed the drive letter) ;)

Works like a charm :)

/JD

TheMysterio 14th Feb 03 04:48 AM

actually when i switch on my comp everyday morning i used to goto nearly 10 websites and my outlook. So what i thought was instead of openign t10 browser window manually i thought of opening it via a batch file. so that i can put hat in the startup. I actualyl have done in VB now but wanted to do that as a Batch File. Still didnt find the solution

Thanks
themysterio

Sephiroth 14th Feb 03 05:16 AM

10 websites and outlook? that's easy :P, give this a whirl

Quote:


"%programfiles%\Internet Explorer\iexplore.exe" http://url/1/
"%programfiles%\Internet Explorer\iexplore.exe" http://url/2/
"%programfiles%\Internet Explorer\iexplore.exe" http://url/3/
"%programfiles%\Internet Explorer\iexplore.exe" http://url/4/
"%programfiles%\Internet Explorer\iexplore.exe" http://url/5/
"%programfiles%\Internet Explorer\iexplore.exe" http://url/6/
"%programfiles%\Internet Explorer\iexplore.exe" http://url/7/
"%programfiles%\Internet Explorer\iexplore.exe" http://url/8/
"%programfiles%\Internet Explorer\iexplore.exe" http://url/9/
"%programfiles%\Internet Explorer\iexplore.exe" http://url/10/
"%programfiles%\Microsoft Office\Office10\Outlook.exe"

make sure all of the internet explorer lines and the url are on the same line too, and just change http://url/x/ to the url you want to go to first, then second, then third, etc.....

with dos, to my knowledge there isn't a way to do ten exe's at one time in 2k / xp, i dunno what will happen on 9x, been too long since i've used it, and if 9x doesn't recognize %programfiles% just replace that with the path to your program files folder, eg, c:\program files\

but on nt, dunno about 9x, it will open url one, pause, and then once you are done with that site and close ie it'll open the second, third, fourth, and so on, and finally outlook, give that a shot and see if it works :)

Sephiroth 14th Feb 03 05:18 AM

Quote:

Originally posted by .unicorn@Feb 8 2003, 07:42 AM
and even time-delay functions.
time-delay functions? ooh, how :D , i knew how to do it from a linux shell but i didn't know it was possible in dos other than by using pause and waiting for user input

and JD: my school uses something similar to that, rmdir's the my docs folder, temp files folders, and ie's cache and recreates then @ every login :P, there's is a whole lot more simple though, RMDIR /S /Q c:\path\to\folders then MKDIR c:\path\to\folders lol

TheMysterio 14th Feb 03 09:58 AM

thanks Sephiroth for ure help

JacKDynne 14th Feb 03 04:14 PM

Seph,

How about this: A batch file that will run this:

netstat -a -e -n -o -r -s 60

then outputs to a text file that gets updated/added to every minute??

I got all but the last part...

Tricky :P :)

/JD

hmmm... I could prob make a bat that calls that netstat bat but how to append to the existing text file?


All times are GMT +1. The time now is 12:28 AM.

Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.