Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automatically starting vfp on Windows Startup 3

Status
Not open for further replies.

alan232

Programmer
May 19, 2004
144
US
Hi All;

I have no idea how to accomplish this or what terms to use to describe it (or where to post it).

I want to start a vfp 6.0 program automatically when the computer (Windows XP) is first booted up. A small icon (to join the many others there) on the bottom right of the desktop would be nice too.

This program has its own form and running timer to service my PDA and will be independent of any other vfp program.

Any help will be sincerely appreciated.
Thanks,
Alan
 
alan232,
This is really quite easy. Just drop the shortcut into the "Startup" folder off of the Start Menu, and it will start every time you boot up the PC.



Best Regards,
Scott

"Everything should be made as simple as possible, and no simpler."[hammer]
 
TheManiac,

That will only start VFP for the logged in profile. Not necessarily when the computer reboots.

You will probably have to have it do an automatic login to run it every time.


-Dave Summers-
[cheers]
Even more Fox stuff at:
 
Hi ;

Thanks much Scott and Dave.

What is 'an automatic login' and how do I accomplish it?

Thanks again,
Alan
 
Hi Again;

Anyway, dropping the desktop shortcut with the execution line of:
"C:\Program Files\Microsoft Visual Studio\Vfp98\VFP6.EXE" -T -CC:\projects\PocketDoc\PocketDoc.cfg

into
c:\documents and settings\all users\start menu\programs

did NOT result in it being started when the machine booted.

Any suggestions are welcome,
Thanks
Alan
 
Sorry,

When I moved the shortcut to the right place, i.e., ..programs\startup\, it did start.

However, I'm still stuck with the fox on the bottom left-middle of my desktop. Any idea on how not to get the fox on the bottom left-middle, but rather add it neatly to the bottom right (as a very very small icon)?

Thanks again,
Alan
 

Hi Alan,

It's difficult to answer without knowing how your desktop is configured.

Do you mean you want the icon in the bottom right of the actual desktop? If so, then just drag it there with the mouse.

Or do you mean the "quick start" area of the toolbar? This is by default at the bottom left (the left-hand end of the toolbar), but you might have moved yours to the right. If that's what you mean, again you can just drag it there from the main part of the desktop. But you might need to unlock it first. To do so, right-click in the quick start area and remove the tick againt "Lock the taskbar".

Finally, if you mean the "notification area" (which contains the clock, and possibly a loud speaker icon and a network icon), then I think you're out of luck. As far as I know, you can't interactively control what goes there.

If none of the above applies, please clarify where you want the icon to appear.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
I *think* Alan wants his application to start as a service on his machine - like his anti-virus or SQL server would - before ANYONE logs in. After a login, he wants to see an icon in the system tray (by the clock).

Is that right?

Regards

Griff
Keep [Smile]ing
 
Griff,

That's impression I got too.

And this thread:
Creating a service
thread1251-1232465

Would be an ideal candidate for the service part, but I have yet to get it to work. So all I am going to do is point to it and say "Good luck".


-Dave Summers-
[cheers]
Even more Fox stuff at:
 
Hi All:

Thank you all very very much!

Sorry for my ignorance.

I was trying to get a small icon next to my clock. I gather from the discussion that this is not the desktop but rather the 'notification area'. On my machine, I have about 19 very small icons that appear without my intervention on boot-up. This includes the network icons and antiviral icons, etc.

I'm getting the feeling that it is not a simple thing to automatically start a vfp program that shows up in this area. I appreciate the thread, I am curious why it should be so difficult.

Thanks Again,
Alan
 
Alan, before going in deeper details (should it be service or not) just answer:
do you need this program running on a machine when you are NOT logged on?
Or it will be enough if you log in - program starts and waits you. (because my Palm connection program (by PALM Inc) work just like that).
 

Alan,

I'm getting the feeling that it is not a simple thing to automatically start a vfp program that shows up in this area. I appreciate the thread, I am curious why it should be so difficult.

I'm curious to know why you want to do this. The notification area is designed to provide a point of contact with running services (as opposed to applications).

If your main aim is to have a quick way of switching to VFP, just click on the normal taskbar button, which will appear whenever VFP is running.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Hi All;

I tried reading the thread, but I'm afraid my French is terrible.

Anyway, short answer: I do not want to depend on anybody (my receptionist) logging in to have vfp service my PDA (and just thought it would be nice if the icon was next to the clock).

Long Answer: When the vfp application is running, it checks certain files for 'instructions' uploaded wirelessly from my PDA and acts accordingly. This allows me to do database searches, printing, etc., from my PDA by using VFP as the middle man. I can depend on my staff to boot the machine, but not start the required vfp program. So I made a form that automatically initializes the clock sequence to start the VFP 'server'. Currently, as suggested above, it will start in the startup group--but this leaves the fox icon in the bottom left center (system tray?) and is easily confused with other running VFP applications that use the same fox icon. I guess, if I could simply change the displayed ICON in the bottom tray, that would be sufficient--but I don't know how to do that either.

Thanks for all the great help!
Alan
 
Hi All ;

Thanks very much! I think I can get it from here. Both the icon and the pcstats.com reference appear to work--I will try them tonight.

I'll be back to report.
Start to you All!
Thanks,
Alan
 
Hi Dave:

To quote, "There is do or not do. There is no try."

I not do.

I followed all instructions to the T.

After downloading, instsrv.exe and srvany.exe, from the windows resource tool kit 2003, and following the instructions, my service, 'pocketdoc', does show up on the windows xp service.msc window as described. But when I do a simple set bell and ?? chr(7) routine in the timer event,I get nothing. So I gather it is not running despite what is being reported. ( I put instsrv.exe and srvany.exe under c:\toolkit\ whereas my service is at c:\projects\pocketdoc\ ---does it matter?)

Any ideas? Does it matter if \\ or \ is used in the path?
Is it case sensitive??? Does the directory for AppDirectory have to end in a \ ??

Thanks,
Alan
 
I used the same exact code as what was in the example, which use the MessageBeep() function. It works.
As for ??CHR(7), I don't know. But whatever code you use in the textmerge portion of the code should work though, maybe change it to just write something to a log file.

Does your service show up as 'running'? Or is it just there?

Your service will work fine being in a different folder than toolkit. The registry entries just need to point to where your service is.
And yes, for the registry edits, you need to use '\\' and not '\' in the paths. I don't know if it's case-sensitive or not, but it won't hurt to use the same case.
My 'AppDirectory' entry doesn't end with a '\'. Just the folder name, which in my case is "c:\vfp_source\misc"


-Dave Summers-
[cheers]
Even more Fox stuff at:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top