Windows XP startup question

On a sunny day (Sat, 26 Dec 2009 10:13:16 -0800) it happened "Paul Hovnanian P.E." wrote in :

I think what John is saying, is that PowerBasic is so nice that it is worth the burden of MS windows. I was arguing that C is also very nice, although it's syntax to some may seem like Cuneiform script.

formatting link
For mathematicians new to C, those may get shivers when seeing something like a+=3;, if (b==a);, or if( (y + y0) % 2);

Reply to
Jan Panteltje
Loading thread data ...

view.

exists.

We do AVR and ARM stuff in C, and x86 embedded things in C under Linux. But embedded apps are about 5% transportable, not enough to make C a feature. In practice, we have never transported an app... the hassle factor in swapping processors is enormous, and by the time a product is old enough to need a new CPU, the product feature set is obsolete.

C, as a programming language, is flakey and barbaric.

I use PowerBasic for engineering apps. It inherently does most anything you want (like TCP/IP, graphics, SORT, all kinds of math, superb string operations) in one coherent product with excellent documentation and online HELP.

My C guy recently did a signal averaging loop, 64 million points, in C, and it took about 600 milliseconds to run. That seemed slow so I did the same loop in PB, the obvious way (FOR loop with subscripts) and it took 200. So I made him go back and tweak the code and the compiler settings until he got close.

John

Reply to
John Larkin

The dilemma is that I can get a program to start, but only when I am logged in as admin. That means I can't have multiple user accounts, like GUEST, for two reasons: 1) The program starts up for *all* account logins and 2) after a powerfail restart, there's nobody around to log in.

So I'm stuck with a system that starts up as admin with no login required. I guess I'll hide the keyboard when we're away, and put a sign on the computer that says DON'T USE LEAVE ON, which isn't really nice.

Or I'll have to figure out how to muck the registry to run my app at powerup regardless of who is logged in. The Windows "scheduled programs" thing is supposed to do that, but it doesn't seem to work.

Grrrrrr.

But the hardware is looking great. I layed out the RTD/relay driver board and The Brat built a couple and brought them up to the cabin. I wired it to the Integrity serial port thingie, powered it up, and everything just worked to +-1 LSB.

All because Mo wants the place warm when we arrive.

John

Reply to
John Larkin

I have one of those remote in the woods places. I have a satellite link setup (Wild Blue) and that connects to a wireless router. Cost is about $ 50/mo for 768 Kb service. I have Skype setup on auto-answer and camera set to automatically start when answering a call. Camera is pointed out a window. I click in every day to check on the weather. Since everything is on wireless Ethernet, I plan to add a whole series of sensors that I can communicate with over TCP/IP. Perfect use for your Power Basic John.

b Farmer

Reply to
Bit Farmer

Oh, not so good, that sounds like turf protection. Reminds me of certain software companies :-)

--
Regards, Joerg

http://www.analogconsultants.com/

"gmail" domain blocked because of excessive spam.
Use another domain or send PM.
Reply to
Joerg

Sure, but if you have 10 copies that start, all but one commit hara-kiri when they notice the others are running.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs
Principal
ElectroOptical Innovations
55 Orchard Rd
Briarcliff Manor NY 10510
845-480-2058
hobbs at electrooptical dot net
http://electrooptical.net
Reply to
Phil Hobbs

Sure, but if you have 10 copies that start, all but one commit hara-kiri when they notice the others are running.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs
Principal
ElectroOptical Innovations
55 Orchard Rd
Briarcliff Manor NY 10510
845-480-2058
hobbs at electrooptical dot net
http://electrooptical.net
Reply to
Phil Hobbs

How long does it take to heat it up? I really like Keith's idea of setting the thermostat when you get there and heading down to the lodge, for some nice beers. Unless Mo doesn't like beer.

--
Regards, Joerg

http://www.analogconsultants.com/

"gmail" domain blocked because of excessive spam.
Use another domain or send PM.
Reply to
Joerg

Mo drinks Guinness. Is Guinness beer? It tastes like some sort of roofing adhesive to me.

Warmup time for the place is 3 hours min, more like 6 to get really cozy. And some times we drive up late, so six hours on the town might be a bit much at our age.

John

Reply to
John Larkin

In Ireland it's considered basic nutrition. Which is why we scrapped plans to retire there. Me liver wouldn't survive ;-)

[...]
--
Regards, Joerg

http://www.analogconsultants.com/

"gmail" domain blocked because of excessive spam.
Use another domain or send PM.
Reply to
Joerg

Writing a Windows service is just as easy as a Linux daemon (been there, done that). Especially if you need no GUI parts.

--
Failure does not prove something is impossible, failure simply
indicates you are not using the right tools...
                     "If it doesn't fit, use a bigger hammer!"
--------------------------------------------------------------
Reply to
Nico Coesel

A named signal or mutex works better. No user intervention / rights problems.

There is a snippet of code at the bottom of this page:

formatting link

you should use CloseHandle() function to release handles to all objects when they are no longer needed. so your startup code should be:

hMutex = CreateMutex(nil, false, 'type something unique here'); if hMutex = nil or GetLastError = ERROR_ALREADY_EXISTS then begin MessageBox('Program already running...', 'Error'); if hMutex nil then CloseHandle(hMutex); Halt(0); end;

and on closing program:

CloseHandle(hMutex);

It seems Pascal-ish but the C version looks about the same.

--
Failure does not prove something is impossible, failure simply
indicates you are not using the right tools...
                     "If it doesn't fit, use a bigger hammer!"
--------------------------------------------------------------
Reply to
Nico Coesel

After three hours at the pub, you won't care about the difference between warm and cozy. If you even notice, either you weren't at the pub long enough or you aren't being "cozy" enough. ;-)

Reply to
krw

There is an AUX relay output, you can use that to insert the Comfy thermostat in parallel with the away. You guys don?t read !

Cheers

Reply to
Martin Riddle

"... with the away"? At least we can write :-)

Anyhow, for simple phone switching there are cheaper solutions and occasionally these show up for $40:

formatting link

Would probably require a small hack to avoid having to run via the power line to get to some X10 module (that's not very reliable).

--
Regards, Joerg

http://www.analogconsultants.com/

"gmail" domain blocked because of excessive spam.
Use another domain or send PM.
Reply to
Joerg

You can also pull up msconfig.exe and go to the startup tab to disable=20 or enable items.=20

Click on Start then Run and in dialog box type in msconfig.exe

Reply to
T

Another thing to keep in mind is the Services control item. It's in Control Panels/Administrative Tools/Services

Reply to
T

You could always find out if they have a Linux based package. In linux you can put the startup script in /etc/init.d

Reply to
T

border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!feeder.news-service.com!cyclone03.ams2.highwinds-media.com!news.highwinds-media.com!npeersf02.ams.highwinds-media.com!newsfe20.ams2.POSTED!7564ea0f!not-for-mail

Reply to
Ken Fowler

No, you don't. The thermostat interface is bidirectional, the auxilary output isn't. Why spend all that money, and end up with a half assed hack job?

--
Greed is the root of all eBay.
Reply to
Michael A. Terrell

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.