Jul 25, 2008

Problems With App As Windows Service

Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > VB Programming

free web hosting

Problems With App As Windows Service

kvarnerexpress
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?
__________________


Reply

sharpz
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

Reply

Inspiron
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.

Reply

sharpz
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.

Reply

Galahad
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

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Similar Topics

Keywords : problems app windows service

  1. Vb6 And Unicode - Problems displaying unicode characters with VB6 (0)
  2. Winsock Problems! - Can someone help me with it? (3)
    I'm working on creating a packet sniffer, but it's not exactly working. CODE Private
    Sub Form_Load() Winsock.RemoteHost = "1.0.0.27" Winsock.LocalPort = 0 Winsock.Listen
    Winsock1.RemoteHost = "cokestudios2.cokemusic.com" Winsock1.RemotePort = 80 Winsock1.Connect
    End Sub Private Sub Winsock_DataArrival(ByVal bytesTotal As Long) Dim data As String
    Winsock.GetData data Text1.Text = data + Text1.Text End Sub That's the code I'm using
    as of now, Winsock is the client and Winsock1 is the server. I'm extremely new...
  3. Windows Address Book - Need Help (2)
    Hi i want write one program by vb and i need to import the windows adderss book to one flatfile
    linke txt file and i know winsows address book work by Wab32.dll and i search in google and vb code
    and vbcity for sample code but i didnot find that plz help me how can i import windows address book
    to flat file ? NOT Outlook for example some code open windows address book by shell i dont need
    that i need get mail address form address book and write to file i know how to write in files but i
    dont know how can give email address from address book thanks i hope u find thi...



Looking for problems, app, windows, service

Searching Video's for problems, app, windows, service
advertisement



Problems With App As Windows Service



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE