Results 1 to 6 of 6

Thread: [02/03] Need Suggestions about Windows Services

  1. #1

    Thread Starter
    Addicted Member hyousuf2's Avatar
    Join Date
    Dec 2004
    Location
    Dublin
    Posts
    226

    [02/03] Need Suggestions about Windows Services

    I have an application which is to be run on a webserver, and the purpose of the application is to automate a few tasks without any sort of user interaction. the applicatin is ready, but the problem is that it is a windows application and user will have to log in to the Web Server and keep it running, (by Locking the Server) which is not desireable. How do I convert my project to the Windows Service project withouth using any of the functionality ?
    Women ...r like tea bags, you neva know how strong they really r untill u put them in hot water

    Huzefa Yousuf
    Software Engineer
    Verticity Inc.
    +92-345-2235303

    [email protected]

  2. #2

    Thread Starter
    Addicted Member hyousuf2's Avatar
    Join Date
    Dec 2004
    Location
    Dublin
    Posts
    226

    Re: [02/03] Need Suggestions about Windows Services

    Sorry ! my mistake ! correction in the last line
    How do I convert my project to the Windows Service project withouth loosing any of the functionality ?
    Women ...r like tea bags, you neva know how strong they really r untill u put them in hot water

    Huzefa Yousuf
    Software Engineer
    Verticity Inc.
    +92-345-2235303

    [email protected]

  3. #3
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: [02/03] Need Suggestions about Windows Services

    You'll have to understand how Windows Services work.
    Since your app doesn't have froms I guess it'd be very easy to convert it

    If you provide your source or the part you have a problem converting it'd be a good idea to post it
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

  4. #4

    Thread Starter
    Addicted Member hyousuf2's Avatar
    Join Date
    Dec 2004
    Location
    Dublin
    Posts
    226

    Re: [02/03] Need Suggestions about Windows Services

    actually the thing is that my application has graphical interface. all im trying to achieve at the moment is that a windows service should start and it should start my application, but that thing doesnt happen. see here's the code

    VB Code:
    1. Protected Overrides Sub OnStart(ByVal args() As String)
    2.         ' Add code here to start your service. This method should set things
    3.         ' in motion so your service can do its work.
    4.         System.Diagnostics.Process.Start("notedpad")
    5.     End Sub

    but nothing happens ! how should i achieve it now
    Women ...r like tea bags, you neva know how strong they really r untill u put them in hot water

    Huzefa Yousuf
    Software Engineer
    Verticity Inc.
    +92-345-2235303

    [email protected]

  5. #5
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [02/03] Need Suggestions about Windows Services

    Notepad probably is starting but under another user's credentials, hence your user can't see it. Watch the Task Manager when your service starts up and see if a Notepad process starts too. I'm betting that it does. If your service is using different credentials to the currently logged on user thne any processes it starts will also use those credentials.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  6. #6

    Thread Starter
    Addicted Member hyousuf2's Avatar
    Join Date
    Dec 2004
    Location
    Dublin
    Posts
    226

    Re: [02/03] Need Suggestions about Windows Services

    yes exactly .. the process is starting under "SYSTEM" account. i tried to make it run Administrator account, the application compiles and when i try to install it using InstallUtil, it asks me for a UserName n Password. I give it Administrator account's id n password, but then it throws the following error

    An exception occurred during the Install phase.
    System.ComponentModel.Win32Exception: No mapping between account names and security IDs was done
    Women ...r like tea bags, you neva know how strong they really r untill u put them in hot water

    Huzefa Yousuf
    Software Engineer
    Verticity Inc.
    +92-345-2235303

    [email protected]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width