Jump to content
Xtreme .Net Talk

jorge

Avatar/Signature
  • Posts

    240
  • Joined

  • Last visited

Everything posted by jorge

  1. hey all, how do i change the ImagePath of a service form with vb.net?
  2. won't a proccess.start("myhelpfile.chm") open it?
  3. Hi, made a windows service but when i install it via: install /u myapp.exe it will use myapp.exe as executable for the service, but it need's to use myapp.exe -server so how can i make installutil.exe install it with the -server switch?
  4. Writing to console Hello, I have a application that acts as a windows service, but i would like todo is when you run: myexe.exe -start/stop that it stops itself, that part i have figured out but how can i write output to the command line when it is called form it? console.writeline() wo'nt work
  5. I stumble ont the awnser by acident when i do: Apache_Proc.Refresh() after i start the procces it exit's normaly. so i don't need tp wait
  6. No, sins it doesnt close by itself
  7. i have a program i run, and i read the output, it stays open if i don't close it with: Apache_Proc.CloseMainWindow() but if i do it to soon, i cant read the output. Private Sub ap_test() With Args .FileName = sApache_dir & "\bin\apache.exe" .Arguments = "-t -n """ & sApache_service & """ " .UseShellExecute = False .RedirectStandardError = True .RedirectStandardOutput = True .WindowStyle = ProcessWindowStyle.Hidden End With Apache_Proc = Process.Start(Args) System.Threading.Thread.Sleep(5000) Try Apache_Proc.CloseMainWindow() Catch ex As Exception 'do nothing End Try Dim sData As String = Apache_Proc.StandardError.ReadLine If sData = "Syntax OK" Then txtStatus.Text = txtStatus.Text & vbCrLf & "[" & GetTime() & "] " & "Apache Test result: Syntax OK" If Me.Visible = False Then SysTray.ShowBalloon(NotifyIcon2.NotifyIcon2.EBalloonIcon.Info, "Apache Test result: Syntax OK", "ApacheMon", 5) End If Else txtStatus.Text = txtStatus.Text & vbCrLf & "[" & Date.Now.Hour & ":" & Date.Now.Minute & ":" & Date.Now.Second & "] " & "Apache Test result: Error found, please check your config" If Me.Visible = False Then SysTray.ShowBalloon(NotifyIcon2.NotifyIcon2.EBalloonIcon.Info, "Apache Test result: Error found, please check your config", "ApacheMon", 5) End If End If End Sub this is what i have now, and yes on a slow computer 5 sec maybe to litle, but i see no other way(if you do, feel free to comment)
  8. thanx, i'll try that
  9. Hi, i'm at a point where i need to wait 5 seconds befor contineuing, how do i do that? :confused:
  10. Thnx i'll play with it a bit
  11. euhm and what is the easy way? i'm not quite following you sry. and yes i want to acces thing from inside the sub. here is the code i have problems with: server.vb: ----------- Protected Overrides Sub OnStart(ByVal args() As String) MyServer.SetPort(sApache_server_port) MyServer.SetRunLevel(Threading.ThreadPriority.Normal MyServer._start() End Sub MyServer and sApache_server_port are both definde in main.vb but i can't acces them
  12. hey, is there a way to use varibale and classes defined outside it to work inside a Protected sub? doesn't seem to work.
  13. Hi all, i want to install a service from inside a program i'm writing, it that posible? like the user klick install service and my programm will do the rest?
  14. these ae a good start thanx
  15. i want to write a plug in in vb.net for a other app that is exendible via complugins
  16. Hi, i have a plication with a few forms, but i'd like to add suport to start a part of it as a service, is that pasible without creating a new exe? like start with my.exe -service it will laod as service, start notmal it wil load in gui mode?
  17. Hey, are there any good guide on howto use com and com+ in vb.nt? I want to try and develop a plug in for coolmon 2.
  18. disable skinning, is a good start, like Nerseus disbale soem services, run from an ntfs filesystem, maybe disable some useless ntfs funtion like file modifyed date(not recoment, but a litte faster if you open en edit files lot), if you have more than 512mb ram, lock the kernal in memory or just get more ram and a faster cpu(that what i'm going to do when i have more money, it hard being a kid lol)
  19. my machien craches about every 5 weeks but hey i run a webserver, photoshop, dreamwever, debug software without rebooting lol so it is a bit normal but still
  20. set all treads to run in background (name. IsBackground = 1) will do they will terminate when the application ends.
  21. lol, thre is hope for a bug free windows, watever, it will never happen :( . personaly i don't want to see the windows code, i'm paroind as it is, i don't want to know what windows does wihout me knowing, or i mich move to linux
  22. To save data to the regestry use: SaveSetting("Name of app", "Folder", "keyname", "value") to retreve it: GetSetting("Name of app", "Folder", "keyname", "default value if key doesn't exist")
  23. ok i pass /k apache -t to cmd.exe, but it only returns: instead of systax ok, and nothing when i start apache.exe instread of cmd and pass the argument "-t"
  24. yes, sry thah i didn't explean mysellf clearly(sry happen a lot :( ) I have a application and i call: pacth to exe/apache.exe -t, it open a command windows with the text syntax ok, or a error msg if somthing is wrong, instead of showing the command windows i would like to put the information into a textbox.
×
×
  • Create New...