Jump to content


Photo

Start Uniserver with UniTray and Stop it on exit


  • Please log in to reply
No replies to this topic

#1 Ampeter

Ampeter

    Newbie

  • Member
  • Pip
  • 1 posts
  • Main OS: Windows 7

Posted 01 August 2012 - 08:34 AM

After fumbling around for a while I managed to make UniTray stop UniServer when pressing the Exit button in the tray menu (so that you don't have to stop the server and then close the tray eeeeevery time) by editing UniServer\plugins\tray_menu\lang\English_tray.ini and changing:

Type: item; Caption: "E&xit"; Action: exit; Glyph: 13

to:

Type: item; Caption: "E&xit"; Action: multi; Actions: My_Exit_Actions; Glyph: 13

and appending this to the end of file:

[My_Exit_Actions]
Action: run; FileName: "Wscript.exe"; Parameters: "%USRoot%\plugins\tray_menu\server_control.wsf StartUniServerProgram";  Flags: waituntilterminated
Action: exit;


I'm not sure it's the best way to do it but it LOOKS like it's working.

Now I also want to do something to start UniServer when I start UniTray. Editing [StartupAction] so that it looks something like this:

[StartupAction]
Action: run; FileName: "Wscript.exe"; Parameters: "%USRoot%\plugins\tray_menu\kill_htas.wsf";  Flags: waituntilterminated
Action: run; FileName: "Wscript.exe"; Parameters: "%USRoot%\plugins\tray_menu\server_control.wsf StartUniServerProgram";  Flags: waituntilterminated
Action: run; FileName: "Wscript.exe"; Parameters: "%USRoot%\plugins\tray_menu\reload.wsf";  Flags: waituntilterminated
Action: readconfig;


doesn't work and throws an error about plugins\tray_menu\start_stop_update.wsf having a not valid Null: 'Split' on line 420.


I'm not sure what to try now. By the way, ┐shouldn't this be default behavior or at least an option? I'm guessing most people using UniServer use it as a development and testing environement so they'd prefer to have it in the tray and start and stop it at the same time you open and close the tray icon-menu-thing.

Any ideas? Thanks!


PS:
So far I'm loving Uniform Server, though it could do with some more user friendliness... I'm sure other (inferior) WAMP alternatives are much more popular because they are easier to install and use. For instance, it took me quite a while to find out there was a tray plugin and where was the correct version to download even though I've used sourceforge before.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users