one executable....many users
#1
somebody
Posted 17 April 2007 - 03:14 PM
Any suggestions would be greatly appreciated.
#2
Grumpy
Posted 17 April 2007 - 03:56 PM
Perhaps it is worth searching the forum, although finding the right keywords can be hard...
#3
BoBo
#4
Posted 17 April 2007 - 05:08 PM
It shounds messy, but is in fact quite easy. I can post the code if needed.
#5
somebody
Posted 17 April 2007 - 05:14 PM
#6
BoBo
Posted 17 April 2007 - 05:25 PM
You could set the exe to use AHK's OnExit to write the clients 'offline' status to a log hosted at the same place as the executable.I have an executable written in AHK sitting on a network drive
Another script watches out (reads the log) till all clients are stated as offline, to replace the executable once that happened.
JM2€C's. Good luck. 8)
#7
Posted 17 April 2007 - 05:46 PM
;*** marks things you need to change for your environment
main script
;autoexecute section
Loop,
{
IfNotExist, TurnOff.exe
{
IfNotExist, TurnOn.exe
{
break ;don't start until the trigger files are deleted
}
}
sleep, 5000
}
SetTimer, UpdateAll, 30000 ;Run every N milliseconds
;your code can go here
Return
UpdateAll:
;Check for reloader
IfExist, TurnOff.exe
{
Run, TurnOff.exe
ExitApp
}
Return
TurnOff.ahk
;Instructions
;Compile TurnOff.ahk
;wait for ready message
;Compile main script.ahk
;Compile TurnOn.ahk
;wait a few seconds
;delete turnoff.exe
;*** put the name of your program here to notify users that the program is reloading
MsgBox, MAIN SCRIPT is being updated to a new version. It will start again automatically in 2-3 minutes.
Sleep, 60000
EnvGet, username, USERNAME
IfEqual, username, YOURUSERNAME ;*** put your user name here to be notified when all scripts should be closed
MsgBox, Try it now - compile the main script`nwait a few seconds`ncompile TurnOn`nwait a few seconds`ndelete Turnoff.exe`nwait a few seconds`ndelete Turnon.exe
;You can also cause TurnOff.exe to compile your main script, but I did not do this.
Loop,
;Check for reloader
{
IfExist, TurnOn.exe
{
Run, TurnOn.exe
ExitApp
}
Sleep, 5000
}
TurnOn.ahk
Run, main script.exe ;*** change to name of your compiled script ExitApp
#8
somebody
Posted 17 April 2007 - 05:50 PM
#9
somebody
Posted 17 April 2007 - 09:47 PM
#10
Posted 04 May 2007 - 02:14 PM
#11
Posted 26 August 2009 - 08:43 PM
I use a web server to deploy scripts to a local desktop to run the scripts first line deletes itself
the web site is a trusted source so no active x prompts
if anyone is interested i might create a small template to demonstrate the technique
#12
Posted 26 August 2009 - 10:03 PM
#13
Posted 27 August 2009 - 02:17 AM
many development teams use something know as cvs CODE Versioning Store
this allows for instance JAVA developers to mercge changes when going live
My method of deploying applications made with ahk ensures the files are always fresh and never running from the server or network share so edits can be done freely. Wise developers push updates live at carefully scheduled times
#14
Posted 27 August 2009 - 03:46 AM
That'd be welcome.if anyone is interested i might create a small template to demonstrate the technique
#15
Posted 28 August 2009 - 02:02 AM
My method of deploying applications made with ahk ensures the files are always fresh and never running from the server or network share so edits can be done freely. Wise developers push updates live at carefully scheduled times
I would like to hear more about how you do this. I work with a 20 man helpdesk and would love to find a way to synch helpdesk hotkey list.




