[AccessD] A2K: WIN 98 machines are driving me crazy

MG mgauk at btconnect.com
Tue Jul 27 02:48:14 CDT 2004


Here is the code that I use.  I put in each person's c:\ root and then call
it in their startup menu.  Adjust to suit.
Max Sherman
CODE:
' Max Sherman Jan 2004
' Program to run (1) from Startup and (2) from User Desktop
' copies over the version on the Server to the user's PC -  It does not
check for dates as per Version 1.
' It also synchonises times on all machine to agree with that on Server.

  Dim FSO, fServer, fLocal, fServerDateLastModified, fLocalDateLastModified,
fOnServerPC, fOnLocalPC
  Dim strUser,objShell,objNetwork

  Set FSO = CreateObject("Scripting.FileSystemObject")
  Set objShell =  wscript.createobject("WScript.shell")
  Set objNetwork =  wscript.createobject("WScript.Network")

  strUser = objnetwork.userdomain
'  wscript.echo struser

  objShell.run("NET TIME \\Server /SET /YES")

  if strUser = "MAX" then
    ' wscript.Echo "Skipped"
  else
    fOnServerPC = "\\Server\Svr-c\_MCM\MCMFrontEnd.mdb"
    fOnLocalPC = "C:\_MCM\MCMFrontEnd.mdb"
      wscript.Echo ("Checking For MCM File Updates:  Please Click OK and
then wait until the messagebox re-appears")

    ' Server File
    If (FSO.FileExists(fOnServerPC)) Then
      Set fServer = FSO.GetFile(fOnServerPC)
      FSO.CopyFile   fOnServerPC ,   fOnLocalPC 
      wscript.Echo ("The Server Copy of the MCM Database (FrontEnd) has now
been copied onto your computer")
    Else
      wscript.Echo ("WARNING: The MCM Database file (" & fOnServerPC & ") is
missing from the Server.  Please Report This Immediately")
    End If
  End if

  Set FSO = nothing
  set objShell = nothing
  set objNetworkl = nothing

 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Darren DICK
Sent: 27 July 2004 05:30
To: AccessD List
Subject: [AccessD] A2K: WIN 98 machines are driving me crazy

Hello all
I have some code that looks to the Back end of the app to determine if there
is a 'new' version of the app.
If there is a 'new' version then the app looks to a predefined place on the
server where the 'new' version is sitting and it copies the 'new' version to
the local machine. So for the current session the user is using the 'old'
version but next time they spark up the app they are automatically using the
'new' version Excellent.  - on XP and WIN2000 at least

Win 98 machines are not doing this. I am getting Permission denied errors.
Of course this is because the destination where I am copying the 'new' file
to is in use.
Obviously XP and WIN2000 open each dB in its own memory space and thus you
can copy underneath but WIN98 does not. OK whatever....

So I thought I would just launch the app from the users desktop with a BATCH
file.
The batch file copies the new version each and every time (whether it's new
or not) then sparks up the app, all from within the batch file Simple - on
XP and WIN2000 at least

Here is the batch file...............
REM START BATCH FILE###########################################
echo Updating your system to the latest Version of TruMan...
copy S:\Truman\Update\TRUMAN.MDB c:\Progra~1\Truman\Truman.mdb
c:\Progra~1\Truman\Truman.mdb REM END BATCH FILE
###########################################
on XP and WIN2000 No Problem But when I run the BATCH file on a 98 machine I
get...
1 file(s) copied (Great it copied the file) Bad command or file name (Bugger
it doesn't spark up the app)

The S drive location of the new app is valid. The destination folder in
Program files and the existence of the 'old' version is valid. (Remember
this works on XP and WIN2000)

The on the Win 98 machine if I copy the line "
c:\Progra~1\Truman\Truman.mdb" from the batch file and clickon Start|Run and
paste c:\Progra~1\Truman\Truman.mdb it sparks up the app as desired. So it
works from Start|Run but not a batchfile?????!!!!!!!

I'm stumped - any suggestions?

Many thanks

Darren


--
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.726 / Virus Database: 481 - Release Date: 22/07/2004
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.726 / Virus Database: 481 - Release Date: 22/07/2004
 




More information about the AccessD mailing list