|
|
|
|
![]() ![]() |
Nov 16 2005, 08:40 PM
Post
#1
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 407 Joined: 13-December 04 Member No.: 2,696 |
So I have this little program that has a server side and a client side. Basically, the client side just connects to the server, and then closes. The server, when it gets a request, runs through a script that maps a couple drives, deletes old files, then copies a new one, then disconnects the drives and writes a log.
When I run this as a normal application, it works fine. I found a tutorial on making it a service, and it shows up and everything, but it doesnt do anything. All the permissions are right, so I don't have a clue what the deal is. Does anyone know an easy way to make a program act as a service in vb 6? __________________ |
|
|
|
Nov 16 2005, 11:46 PM
Post
#2
|
|
|
Member [Level 1] ![]() ![]() ![]() ![]() Group: Members Posts: 67 Joined: 16-November 05 Member No.: 14,373 |
i dont think VB programs can be directly run as a service, what you could do instead is just add it to the registry under startup ( HKCU > Software > Microsoft > Windows > current version > run ) and it will startup and run fine
|
|
|
|
Nov 17 2005, 04:47 AM
Post
#3
|
|
|
Trap Grand Marshal Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 1,203 Joined: 25-March 05 Member No.: 4,883 |
If you just want to run your application on startup, an alternative is to place it's shortcut in "C:\Documents and Settings\%USERNAME%\Start Menu\Programs\Startup".
The application will simply start when you login to Windows. |
|
|
|
Nov 17 2005, 05:39 AM
Post
#4
|
|
|
Member [Level 1] ![]() ![]() ![]() ![]() Group: Members Posts: 67 Joined: 16-November 05 Member No.: 14,373 |
oh also, if you want it to start up for all users, not just the current logged in user, you have to add the app to
CODE Hkey_Local_Machine > software > microsoft > windows > current version > run if you want it to run only once, add to CODE Hkey_Local_Machine > software > microsoft > windows > current version > runonce hope this helps. |
|
|
|
Nov 22 2005, 11:08 AM
Post
#5
|
|
|
Neurotical Squirrel ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: [HOSTED] Posts: 590 Joined: 4-November 04 From: Novi Sad, Vojvodina Member No.: 2,127 |
Hi all,
Yes,those are very good solutions to automaticaly start an application,but what happens when that machine is not used by regular users,for example,it runs as a server,and never gets past the login screen.I thin windows doesn't process startup part of registry at this point,but waits for you to login.In this case,application wouldn't start. I wanted to try making my own service app,but never got around,so I can't be of any big help.What I can do,is tell you where you maybe should focus your attention.Maybe there is another way that services run,I do believe you need Sub Main,or something similar.Some extra piece of code that needs to be moved or so.If I get around to making application that runs as a service,I'll notify you on results. Cheers |
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 1st December 2008 - 04:35 PM |