You are here

Created an interesting Autorun Program (Internet connection detection)

29 posts / 0 new
Last post
BluePlanet
Offline
Last seen: 16 years 4 months ago
Joined: 2007-09-27 13:35
Created an interesting Autorun Program (Internet connection detection)

I created a autorun program, that only runs a specified application(s) when it detects an internet connection. I use my drive in a variety of places and not all of them have internet. I had set my Thunderbird and other apps to autorun, but got tired of them popping up even when I didn't have internet So I wrote a small program that detects a connection, and optionally asks you if you would like to start your applications, if there is no connection nothing happens. Currently you have to enter the drive-less paths to the applications you want to be run in the .ini file, but I can create a GUI to add apps if someone would like. Does anyone want this program? I can post it if anyone wants it.

ohajo
Offline
Last seen: 13 years 3 months ago
Joined: 2007-04-06 16:29
Wood be happy to test it.

Wood be happy to test it. nice idea.

mstinaff
Offline
Last seen: 14 years 4 months ago
Joined: 2006-10-01 10:58
Brilliant.

I'll second that.

Key ID: 0xDAE3095F
Fingerprint: 5D98 65D2 1844 21A5 76C1 F0F6 4BE6 D689 DAE3 095F

rab040ma
Offline
Last seen: 1 week 3 days ago
Joined: 2007-08-27 13:35
Yeah, quit teasing.

Yeah, quit teasing.

MC

shookmon
Offline
Last seen: 7 years 2 weeks ago
Joined: 2007-02-21 16:26
For ideas on how to deal

For ideas on how to deal with USB drives and the autorun check out this thread:

https://portableapps.com/node/5449

Michael D. Shook

Aciago
Aciago's picture
Offline
Last seen: 8 months 3 weeks ago
Joined: 2007-01-24 14:23
I want it!!!

and that includes the GUI... Wink

If a packet hits a pocket on a socket on a port,
and the bus is interrupted as a very last resort,
and the address of the memory makes your floppy disk abort,
then the socket packet pocket has an error to report Biggrin

BluePlanet
Offline
Last seen: 16 years 4 months ago
Joined: 2007-09-27 13:35
Ok here it is! well... most of it :)

Ok here is the program,(In a zip with it's .ini file and the source) I haven't written a gui for adding apps yet, but it's pretty easy to edit the .ini file. I'll a write a GUI in a bit. Perhaps we could get something like this added to the portable apps menu?

http://www.divshare.com/download/3793637-fae

Here is an example of my .ini file.

[RunPrefs]
ShowMsgBox=1 ; "1" to ask to autorun apps, "0" or anything else to just run

[RunApps] ; these are the paths to the apps you want to autorun (without the drive letter)

RunApp1=\Programs\Misc. Programs\WeatherMate\WeatherMate.exe
RunApp2=\Programs\Audio Programs\OpenPandora\OpenPandora.exe
RunApp3=\Programs\Web Programs\ThunderbirdPortable\ThunderbirdPortable.exe
RunApp4=\Programs\Messenger Programs\PidginPortable\PidginPortable.exe
RunApp5=\Programs\Web Programs\Firefox Portable\FirefoxPortable.exe
RunApp6=... ; You can keep adding apps, just keep adding to the number!
RunApp7=...

I think that computers run on smoke. Why? Because when the smoke comes out they don't work anymore! Biggrin

BluePlanet
Offline
Last seen: 16 years 4 months ago
Joined: 2007-09-27 13:35
Just so you know..

You have to add this program to your PAM menu and set it to autorun. I also have mine set to be hidden. (Or you can edit your drive Autorun.inf to run it also.) Wink

I think that computers run on smoke. Why? Because when the smoke comes out they don't work anymore! Biggrin

Aciago
Aciago's picture
Offline
Last seen: 8 months 3 weeks ago
Joined: 2007-01-24 14:23
nice!

Thank you very much...

If a packet hits a pocket on a socket on a port,
and the bus is interrupted as a very last resort,
and the address of the memory makes your floppy disk abort,
then the socket packet pocket has an error to report Biggrin

Aciago
Aciago's picture
Offline
Last seen: 8 months 3 weeks ago
Joined: 2007-01-24 14:23
Question

If I want it to autorun when I´m connected to Internet should set it with 1 and if I want it to run always should set it to 0?

I didn´t understood very good...

My idea is to set my PDrive to run Lost.exe first, then this App (modified with the exe protector I found and reported here) to then run PStart, Convey, CAFE Mod, texter, Ditto, CLCL, Rainlendar, pNotes... and if internet connection is found: TinyURL, nPOP, and Quick Google.

The exe protector does nothing else than confuse a possible intruder... Blum

If a packet hits a pocket on a socket on a port,
and the bus is interrupted as a very last resort,
and the address of the memory makes your floppy disk abort,
then the socket packet pocket has an error to report Biggrin

BuddhaChu
BuddhaChu's picture
Offline
Last seen: 1 week 6 days ago
Joined: 2006-11-18 10:26
You're pinging a static IP

You're pinging a static IP which is a bad practice. I suggest you change line 10 to ping the DNS name, not an actual server's IP address...which could change.

RunWait, cmd /c ping www.google.com -n 1 >%temp%\Ping.txt,, hide

By pinging a DNS name it'll get resolved to a server IP that's actually in use at that point in time. Bonus feature is it should resolve to an IP address of a server that's closer to people in other countries and not be a static IP of a server in the USA.

Cancer Survivors -- Remember the fight, celebrate the victory!
Help control the rugrat population -- have yourself spayed or neutered!

BluePlanet
Offline
Last seen: 16 years 4 months ago
Joined: 2007-09-27 13:35
Ok! Good Idea, I'll change that.

Ok I'll change the ping command, and add the options GUI as well. I'll post the new one soon.

I think that computers run on smoke. Why? Because when the smoke comes out they don't work anymore! Biggrin

Aciago
Aciago's picture
Offline
Last seen: 8 months 3 weeks ago
Joined: 2007-01-24 14:23
Question

I was thinking... is it possible to have and autorun window with options each time? I mean, when this window launchs launch for a) autorun internet Apps, b) autorun common/author/frecuent Apps, or c) autorun Office Apps, and then autorun those Apps I choose...?

If a packet hits a pocket on a socket on a port,
and the bus is interrupted as a very last resort,
and the address of the memory makes your floppy disk abort,
then the socket packet pocket has an error to report Biggrin

BuddhaChu
BuddhaChu's picture
Offline
Last seen: 1 week 6 days ago
Joined: 2006-11-18 10:26
TweakUI

I don't really understand your question, but if you're asking if you can add items to the Autorun/Autoplay menu that pops up on a certain machine then yes, you can add things. They're called "Handlers" and you can build a custom one with TweakUI.

http://dailycupoftech.com/configure-autoplay-with-tweakui/
http://windowsxp.mvps.org/addautoplay.htm

Cancer Survivors -- Remember the fight, celebrate the victory!
Help control the rugrat population -- have yourself spayed or neutered!

Aciago
Aciago's picture
Offline
Last seen: 8 months 3 weeks ago
Joined: 2007-01-24 14:23
no

No that popup...

I´m talking about an App that works with autorun.inf to autoplay a group of Portable Apps, but those apps to autorun are different depending on what I´m going to do...

For example: a) autorun OpenOffice with texter and Ditto, if I´m going to work with a text file, or b) autorun Thunderbird and Firefox if I´m going to check my mail and websurf.

I know Pstart let me run as much as apps as I want when loading Pstart, but I mean differente Apps depending on the ocasion...

I asked here, because this app is about running Apps when connecting to Internet and not running it when not connecting, well, when not connecting I want to configure two or three different options to autorun and choose them with just a button.

If a packet hits a pocket on a socket on a port,
and the bus is interrupted as a very last resort,
and the address of the memory makes your floppy disk abort,
then the socket packet pocket has an error to report Biggrin

BuddhaChu
BuddhaChu's picture
Offline
Last seen: 1 week 6 days ago
Joined: 2006-11-18 10:26
not gonna happen

Autorun.inf files aren't that "smart". You could launch an app to do what you want, but autorun itself can't do anything you describe.

You could create right click menu options to appear and launch an app (or more with a batch file). Here's one I created to use @ work that displays three menu options if you right-click on the drive icon in Explorer

[autorun]
icon=bin\icons\wi0111-48.ico

action=Howto Update an eTool
shellexecute=notepad.exe bin\howto-message.txt

label=eTool Update Drive

shell\a\command=notepad.exe bin\howto-message.txt
shell\a=Howto update an eTool directions

shell\b\command=update_portable_hd.bat
shell\b=Update portable hard drive

shell\c\command=update_etool.bat
shell\c=Update eTool

Cancer Survivors -- Remember the fight, celebrate the victory!
Help control the rugrat population -- have yourself spayed or neutered!

Simeon
Simeon's picture
Offline
Last seen: 9 years 8 months ago
DeveloperTranslator
Joined: 2006-09-25 15:15
I think

he doesn't want to do it with autorun.inf but with the program the OP was talking about.

"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate

Aciago
Aciago's picture
Offline
Last seen: 8 months 3 weeks ago
Joined: 2007-01-24 14:23
Buddhachu

If you start reading this thread from the beginning you'll understand what I'm talking about...

not autorun.inf... autorun.inf will call an App that will launch the Apps grouped according to what I'm going to do...

Since this thread is about an App that auto detect if there is an internet connection available and then launch (or not) internet related apps, I was asking if another app can be made to launch apps grouped depending on what I'm going to do, like games, office, internet, multimedia, etc, etc, etc...

If a packet hits a pocket on a socket on a port,
and the bus is interrupted as a very last resort,
and the address of the memory makes your floppy disk abort,
then the socket packet pocket has an error to report Biggrin

BluePlanet
Offline
Last seen: 16 years 4 months ago
Joined: 2007-09-27 13:35
You would probably have to get a custom program made.

It would be possible to create an app like that. (And very easy, just time consuming) But it would have to be custom made to suit your purposes.

I think that computers run on smoke. Why? Because when the smoke comes out they don't work anymore! Biggrin

Aciago
Aciago's picture
Offline
Last seen: 8 months 3 weeks ago
Joined: 2007-01-24 14:23
That

was my original question, if it can be done...

With probable an ini to configure which apps to launch... Wink

If a packet hits a pocket on a socket on a port,
and the bus is interrupted as a very last resort,
and the address of the memory makes your floppy disk abort,
then the socket packet pocket has an error to report Biggrin

BluePlanet
Offline
Last seen: 16 years 4 months ago
Joined: 2007-09-27 13:35
New Version! has GUI for adding Apps!

Here is the next version of WebAutoStart!

Screenshots

Main Screen http://www.divshare.com/img/3851025-6f6.png

Options Screen http://www.divshare.com/img/3851027-298.png

Zip File http://www.divshare.com/download/3851033-a63

I think that computers run on smoke. Why? Because when the smoke comes out they don't work anymore! Biggrin

Aciago
Aciago's picture
Offline
Last seen: 8 months 3 weeks ago
Joined: 2007-01-24 14:23
Thank you.-

I'm going to start using it right now... Smile

If a packet hits a pocket on a socket on a port,
and the bus is interrupted as a very last resort,
and the address of the memory makes your floppy disk abort,
then the socket packet pocket has an error to report Biggrin

Aciago
Aciago's picture
Offline
Last seen: 8 months 3 weeks ago
Joined: 2007-01-24 14:23
It doesn't work

I´m travelling then this have been the only chance I had to reconfigure my PDrive with all the new Apps and updates...

My PDrive runs this way:

autorun.inf -> lost.exe -> ClamWin GUI to detect runing viruses -> AppLauncher -> PStart and your Autorun Program to detect Internet...

The problem is, your program pings (or at least I see the ping.txt file appear and dissapear) but having Internet (256 Broad Band) your App doesn't autolaunch the Apps I told it to launch (npop-uk, quick google, and trayURL)... Is there any way to call the GUI again to verify paths?

If a packet hits a pocket on a socket on a port,
and the bus is interrupted as a very last resort,
and the address of the memory makes your floppy disk abort,
then the socket packet pocket has an error to report Biggrin

BluePlanet
Offline
Last seen: 16 years 4 months ago
Joined: 2007-09-27 13:35
Yes, you can pop up the options box again.

On the message box that asks you if you want to run your programs there is a button called settings. If you told it to not display that window, you will have to go and either delete the .ini and start over, or change the value in ShowMsgBox to 1.

When your programs fail to launch, does it pop up a message box telling you it can't start your programs? If it doesn't then the program thinks that your programs have launched successfully. Just so you know, the program launcher must be on the same drive that the programs to be launched are on. This is because it detects what drive it is on, and them assumes that the other programs have the same drive letter.

Hope this helps! Hope it starts working for you.

I think that computers run on smoke. Why? Because when the smoke comes out they don't work anymore! Biggrin

Riax
Riax's picture
Offline
Last seen: 9 years 1 month ago
Joined: 2007-09-06 14:41
I have a suggestion.

Having to delete or edit an initialization file every time I want to reconfigure which of my Internet-reliant apps start automatically is rather a pain. It would be easier if you added a switch to the executable that would make it run. Simply double-clicking the executable would open the configuration window, while executing something like "WebAutoStart.exe /run" would run your configured apps. Also, this would allow you to place the executable in, for example, "X:\PortableApps\WebAutoStart\", making it extremely easy to open the configuration window from the PortableApps platform.

On a side note, I make a habit of not using periods in naming files. A poorly-written program may take everything after the first period to be a file's extension. As long as the other programs that need to see the executable are well-written, it won't matter, but I think "WebAutoStart1_1.exe" would have been a better choice.

Her song leaves the other side in flight for their lives now;
They are not long for the world.
No one leaves; line up for inevitable wipeout.
All you've done - now it's what you deserve.
Machinae Supremacy ~ Laser Speed Force

Aciago
Aciago's picture
Offline
Last seen: 8 months 3 weeks ago
Joined: 2007-01-24 14:23
I mean

If it there isn't internet availble it does nothing, that's ok, that's mean to do... but, when there is and Internet connection it still does nothing and is supposed to launch the programs I told it to run... that's what is not working... maybe the ping takes to long and in that case needs to increase the time to wait for pong... just guessing here...

If a packet hits a pocket on a socket on a port,
and the bus is interrupted as a very last resort,
and the address of the memory makes your floppy disk abort,
then the socket packet pocket has an error to report Biggrin

wk
wk's picture
Offline
Last seen: 1 year 1 week ago
Joined: 2007-09-05 12:31
Doesn´t do anything..

no ping, no pong, no starting apps, but AutoMemScan does without complaint. Wonder why?

"Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis .." Friday Next -
"May The Schwartz be with You!" Yogurt the Yoda

Aciago
Aciago's picture
Offline
Last seen: 8 months 3 weeks ago
Joined: 2007-01-24 14:23
No

this one pings a server on internet... I see the ping.txt appear and disappear, but then nothing happend, that's why I think is a problem with the time the App waits for pong...

If a packet hits a pocket on a socket on a port,
and the bus is interrupted as a very last resort,
and the address of the memory makes your floppy disk abort,
then the socket packet pocket has an error to report Biggrin

wk
wk's picture
Offline
Last seen: 1 year 1 week ago
Joined: 2007-09-05 12:31
ok,

adjusted the firewall settings and checked both automemscan and the simple autorun, both gave a ping, but only automemscan reacts and gives a gui, whereas autorun doesn´t start anything and doesn´t give a notification though checked in the startup GUI. I´ll stick to automemscan, perhaps some settings have to be adjusted here?

"Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis .." Friday Next -
"May The Schwartz be with You!" Yogurt the Yoda

Log in or register to post comments