Results 1 to 3 of 3

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    èíæ. ìàãüîñíèê worm4's Avatar
    Join Date: Jul:2005
    Location: Varna
    Posts: 20,295

    Ñúçäàâàíå ñúðâèñ

    Ïèøà ñè òóêà åäíî ïðoãðàì÷å êîåòî èñêàì äà ïóñíà êàòî ñúðâèñ.
    Ñúçäàäîõ ñè íîâ ïðîåêò íà VS 2010, ñëîæèõ ìó äà å windows service, äîáàâèõ ProjectInstaller ñëîæèõ ñè êîäà ïóñêàì äåáúã è íà:
    cannot start service from the command line or debuger....
    Íå æåëàÿ äà äåáúãâàì, êîäà óæ å òåñòâàí ïðåäâàðèòåëíî, èñêàì ñàìî äà ãî ïóñíà êàòî ïðîöåñ.

    Ïðîáâàì äà ãî äîáàâÿ ñ èíñòàëëóòèë

    Code:
    C:\Documents and Settings\asen>C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ins
    tallutil C:\Temp\Debug\HVACControlServer.exe
    Microsoft (R) .NET Framework Installation utility Version 2.0.50727.3053
    Copyright (c) Microsoft Corporation.  All rights reserved.
    
    
    Running a transacted installation.
    
    Beginning the Install phase of the installation.
    See the contents of the log file for the C:\Temp\Debug\HVACControlServer.exe ass
    embly's progress.
    The file is located at C:\Temp\Debug\HVACControlServer.InstallLog.
    Installing assembly 'C:\Temp\Debug\HVACControlServer.exe'.
    Affected parameters are:
       logtoconsole =
       assemblypath = C:\Temp\Debug\HVACControlServer.exe
       logfile = C:\Temp\Debug\HVACControlServer.InstallLog
    No public installers with the RunInstallerAttribute.Yes attribute could be found
     in the C:\Temp\Debug\HVACControlServer.exe assembly.
    
    The Install phase completed successfully, and the Commit phase is beginning.
    See the contents of the log file for the C:\Temp\Debug\HVACControlServer.exe ass
    embly's progress.
    The file is located at C:\Temp\Debug\HVACControlServer.InstallLog.
    Committing assembly 'C:\Temp\Debug\HVACControlServer.exe'.
    Affected parameters are:
       logtoconsole =
       assemblypath = C:\Temp\Debug\HVACControlServer.exe
       logfile = C:\Temp\Debug\HVACControlServer.InstallLog
    No public installers with the RunInstallerAttribute.Yes attribute could be found
     in the C:\Temp\Debug\HVACControlServer.exe assembly.
    Remove InstallState file because there are no installers.
    
    The Commit phase completed successfully.
    
    The transacted install has completed.
    Ñêðèò/Hidden: ðåçóëòàò îò installutil


    Ïîñëå êàêâî? Òðÿáâà äà ñå ïîÿâè â windows services /services.msc/? Ïðè ìåí ãî íÿìà.
    ×åòîõ çà regsvcs, íî ðàçáðàõ å òî å çà dll, à àç èìàì exe?

    --------- Äîáàâåíî â 12:41 --------- Ïðåäèøíî ìíåíèå: â 12:22 ---------

    ñåãà ïðîáâàõ äà ïóñíà installutil íà åõå îò release, à íå íà äåáúã ïàïêàòà è òîçè ïúò èìàøå ìàëêî ïîâå÷å ïðîãðåñ
    Ïîèñêà ìè ïîòðåáèòåë è ïàðîëà,
    Code:
    C:\Documents and Settings\asen>C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ins
    tallutil C:\Temp\release\HVACControlServer.exe
    Microsoft (R) .NET Framework Installation utility Version 2.0.50727.3053
    Copyright (c) Microsoft Corporation.  All rights reserved.
    
    
    Running a transacted installation.
    
    Beginning the Install phase of the installation.
    See the contents of the log file for the C:\Temp\release\HVACControlServer.exe a
    ssembly's progress.
    The file is located at C:\Temp\release\HVACControlServer.InstallLog.
    Installing assembly 'C:\Temp\release\HVACControlServer.exe'.
    Affected parameters are:
       logtoconsole =
       assemblypath = C:\Temp\release\HVACControlServer.exe
       logfile = C:\Temp\release\HVACControlServer.InstallLog
    Installing service VRFToMODBUS...
    Creating EventLog source VRFToMODBUS in log Application...
    
    An exception occurred during the Install phase.
    System.ComponentModel.Win32Exception: The account name is invalid or does not ex
    ist, or the password is invalid for the account name specified
    
    The Rollback phase of the installation is beginning.
    See the contents of the log file for the C:\Temp\release\HVACControlServer.exe a
    ssembly's progress.
    The file is located at C:\Temp\release\HVACControlServer.InstallLog.
    Rolling back assembly 'C:\Temp\release\HVACControlServer.exe'.
    Affected parameters are:
       logtoconsole =
       assemblypath = C:\Temp\release\HVACControlServer.exe
       logfile = C:\Temp\release\HVACControlServer.InstallLog
    Restoring event log to previous state for source VRFToMODBUS.
    
    The Rollback phase completed successfully.
    
    The transacted install has completed.
    The installation failed, and the rollback has been performed.
    Ñêðèò/Hidden: ðåçóëòàò îò êîíçëàòà


    Äàâàì ìó ïîòðåáèòåë, íÿìà ïàðîëà íî âúïðåêè òîâà ãëåäàì òîâà è ñå ÷óäÿ:
    An exception occurred during the Install phase.
    System.ComponentModel.Win32Exception: The account name is invalid or does not ex
    ist, or the password is invalid for the account name specified
    "Arbeit macht frei" -òîëóïà òèêâåí
    Èäèîò - Òîâà å ÷îâåê ñ èäåè. Àêî ñúì ïðîïóñíàë ïðåïèíàòåëíè çíàöè, òóê èìà ðåçåðâíè:..,,--?!
    OgiDogi: Çàìåðâà ñå ñ ÿéöà, ÿáúëêè, êàìúíè è ò.í., à åëåêòðè÷åñêèòå âåëè÷èíè ñå èçìåðâàò

  2. #2
    Âåãàí íà ìåñíà äèåòà XaMaB's Avatar
    Join Date: Nov:2001
    Location: Ñîôèÿ
    Posts: 20,387
    Äèðåêòíî êàòî ñúðâèñ íå ìîæå äà ãî ïóñíåø ïðåç ñòóäèîòî.

    Âàðèàíòèòå çà èíñòàëàöèÿòà ñà èëè ïðåç installutil (êàêòî ñè òðúãíàë) èëè ïî-ëåñíîòî ñëåä êàòî âåäíúæ ãî êîíôèãóðèðàø - äîáàâÿíå íà îùå åäèí "Setup project" êúì solution-a è òàì äîáàâèø äà òè èíñòàëèðà output-à íà òâîÿ ïðîåêò.

    Íî è çà äâåòå òè òðÿáâà äà èìàø Installer class êúì òâîÿ ïðîåêò. Òóê å îïèñàíî äîáðå êàê ñòàâà.

    Îòäåëíî òè ïðåïîðú÷âàì íåùî ïîäîáíî êàòî êîä çà Main ìåòîäà:
    Code:
            static void Main(string[] args)
            {
                if (args.Count() == 0)
                {
                    //Service Mode 
                    ServiceBase[] ServicesToRun;
                    ServicesToRun = new ServiceBase[] 
    			    { 
    				    new MyService() 
    			    };
                    ServiceBase.Run(ServicesToRun);
                }
                else
                {
                    //Console Mode 
                    MyProcess process = new MyProcess();
    
                    Console.ReadLine();
                    process.Dispose();
                }
    
            }
    Ñ òîâà àêî MyService òè å îïèñàíèåòî íà ñúðâèñà, à â MyProcess òè å ëîãèêàòà, ïðè äèðåêòíî ñòàðòèðàíå òðúãâà êàòî ñúðâèñ, à êàòî ñëîæèø â ñòóäèîòî íÿêàêúâ ïàðàìåòúð ìîæå äà ñè äåáúãâàø è ëîãèêàòà
    Ïîñëåäíà ðåäàêöèÿ: èçâúðøåíà îò XaMaB; íà äíåøíà äàòà. 0.42 ñåêóíäè ñëåä ïóñêàíå íà ïîñòà

    In God we Trust (all others must submit a X.509 certificate). Àêî ñïîðèø ñ èäèîò, âåðîÿòíî è òîé ïðàâè ñúùîòî èëè ñè ïîïàäíàë íà ïàðòèåí (íåïúëåí) ÷ëåí

  3. #3
    èíæ. ìàãüîñíèê worm4's Avatar
    Join Date: Jul:2005
    Location: Varna
    Posts: 20,295
    Èñêàøå äà ìó äàì òîâà.
    Code:
                serviceProcessInstaller.Account = ServiceAccount.LocalSystem;
    è ñå èíñòàëèðà.
    "Arbeit macht frei" -òîëóïà òèêâåí
    Èäèîò - Òîâà å ÷îâåê ñ èäåè. Àêî ñúì ïðîïóñíàë ïðåïèíàòåëíè çíàöè, òóê èìà ðåçåðâíè:..,,--?!
    OgiDogi: Çàìåðâà ñå ñ ÿéöà, ÿáúëêè, êàìúíè è ò.í., à åëåêòðè÷åñêèòå âåëè÷èíè ñå èçìåðâàò

Posting Permissions

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

Copyright © 1999-2011 Õàðäóåð ÁÃ. Âúçìîæíî å ñúäúðæàíèåòî íà òàçè ñòðàíèöà äà å îáåêò íà àâòîðñêè ïðàâà.
iskamPC.com | mobility.BG | Bloody's Techblog | Êðèïòîâàëóòè è ìàéíèíã | 3D Vision Blog | Ìàãàçèí çà åëåêòðîííè öèãàðè