ServerRoot
+ Apps
+ AppName
+ Data
+ Reports
+ Updates
The app is installed locally. My app looks for the data folder using UNC path. It then backs up one level and knows [with code] that all program updates are in the Updates folder in the data tree. I do an adir() on the Updates folder and loop through all the files in that array. If the date/time stamp is newer than what is in the app installation folder or the file does not exist in the installation folder, I copy that file from the server. The last line of code in my launcher EXE is to DO ("MyAppName").if version(2) = 2 exit endif>Ed Rauh and George Tasker just mentioned they use a Launcher() for LAN apps.
>n = ADIR(laLocal, "MyProg.Exe") && find local copy >IF n > 0 > n = ADIR(laRemote, lcCSSPath + MAINPROGRAM) && find remote copy to compare > * compare name and date/time stamp > IF (laLocal[1,3] == laRemote[1,3]) and (laLocal[1,4] == laRemote[1,4]) > * they are equal > ELSE > * different, inform user and update local copy > ENDIF >ENDIF >>
>oReg = CREATEOBJECT("SFRegistry") >lcDataPath = ADDBS(oReg.GetKey(lcSubkey, lcDataKeyName)) >* or >lcDataPath = loWshShell.RegRead("HKCU\" + ADDBS(lcSubkey) + lcDataKeyName) >>
oReg.IsKey()
while WSH does not have a direct way to query if a key exists (that I can see).