Search | Active Topics



StartAccess must wait until Access has closed Options
DanteC
Posted: Thursday, April 15, 2010 1:44:13 AM
Rank: New Poster
Groups: Member

Joined: 4/12/2010
Posts: 1
Location: Switzerland
We use a script to start our Access Application, this does some work before the start of Access and after closing Access.

StartAccess3_2002.exe must necessarily wait until MSAccess (myApp.mde) has closed before the next statement is executed!

wait=0 is for us not the solution, because during this time the Application is opened, the protected registry values are not set!

our script:

Code:
Set WshShell = WScript.CreateObject("WScript.Shell")
'
' do some work bevore open myApp.mde
'
cmdline = chr(34) & ProgramFilesDir & "\Microsoft Access Runtime\Office10\StartAccess3_2002.exe" & chr(34) _
   & " /excl /runtime /wrkgrp C:\myAccApp\system\system.mdw C:\myAccApp\myApp.mde"               
'  & " -wait=0 /excl /runtime /wrkgrp C:\myAccApp\system\system.mdw C:\myAccApp\myApp.mde"
WshShell.Run cmdline, 1, True
' StartAccess3_2002.exe must necessarily wait until MSAccess (myApp.mde) has finished before the next statement is executed!
' wait=0 is no a solution, because otherwise the protected registry values are not setting.
WshShell.Popup "StartAccess3_2002.exe is finish.", 5, "Access App", 4096
'
' do some work after closing myApp.mde
'
WScript.Quit
'-----------------------------------------------------------------
Function ProgramFilesDir
    Dim objShell, objFolder, objFolderItem
    Const PROGRAM_FILES = &H26&
    Const PROGRAM_FILESX86 = &H2A&
    Set objShell = CreateObject("Shell.Application")
    Set objFolder = objShell.Namespace(PROGRAM_FILESX86)
    If (objFolder Is Nothing) Then
        Set objFolder = objShell.NameSpace(PROGRAM_FILES)
    End If
    Set objFolderItem = objFolder.Self
    ProgramFilesDir = objFolderItem.Path
End Function


Does somebody have a solution?

Does exist a switch, i.e. -WaitOnReturn for StartAccess3_2002.exe which protect the registry values while it waits till the application is closed?
Or is it possible to implement a switch like -WaitOnReturn for StartAccess3_2002.exe?
fpahl
Posted: Friday, July 16, 2010 7:18:13 AM
Rank: New Poster
Groups: Member

Joined: 11/19/2009
Posts: 1
Location: Germany
We have the same problem with StartAccess_2003.exe.
Any solution so far?
ColeS
Posted: Friday, July 16, 2010 9:25:51 AM

Rank: SageKey Staff
Groups: Administration , Member

Joined: 3/27/2009
Posts: 1,376
Location: Canada
We have worked out a solution to this and are building it into our next release. I'll update here with more information when it is available. Our time line is 1-2 weeks.
DavidM
Posted: Tuesday, March 10, 2015 9:49:56 AM
Rank: Member
Groups: Member

Joined: 5/8/2012
Posts: 9
Location: United Kingdom
Hi Cole,

You never did come back to this issue.. I am having a problem with the protected keys being used from a secondary AccDE opened from within the Access opened using the StartAccess3_2010 executable and am investigating the possible ways to avoid the reading of pre-StartAccess3 keys when the new AccDE is opened.
Can you please elaborate what can be done so that the StartAccess3 is restoring the reg keys at a later stage?

I.e. the ideal variant would be:
- I use StartAccess to open the intermediate AccDB (instructing it to wait like 10-15 seconds before restoration takes place)
- I swap the AccDB with an AccDE. The reason is the usage of encryption.. back then the StartAccess did not deal with it.. and I haven't checked whether something has changed in SageKey since.. (I am not sure where to check for things like that to be honest)
- After the given time period is gone the registry keys are restored to their old values.

Best Regards,
David
ColeS
Posted: Monday, June 01, 2015 9:08:20 AM

Rank: SageKey Staff
Groups: Administration , Member

Joined: 3/27/2009
Posts: 1,376
Location: Canada
Hi David,

If you are looking to have StartAccess wait X seconds before restoring the registry information to the other Access version, then the command you are looking for is the StartAccess command line of -wait.

Used as:
-wait=X000
Where X is the number of seconds you want to wait. The default is -wait=10000.
Be sure that you allow enough time for your application to get all the Access references it needs before the revert, or it will potentially be getting the incorrect versions when the registry information then points to the other installed Access version.

Then if you are launching a second database, if you know StartAccess is closed, you can use a second instance of StartAccess to open the new database.
This will ensure you continue to have the protection from Access reconfiguration and that the database application opens in the correct Access version pointing to the correct Access references.

I hope this is clear, please let me know if you have more questions.

As this is the Access User Group forum, I encourage any one else with anything to add to post a reply as well. If you want to ensure higher visibility with SageKey staff, post your queries under the Access Deployment Wizard forum section.

Users browsing this topic
Guest


Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Main Forum RSS : RSS

Forum theme created by Colin Olson, SageKey Software.
Powered by Yet Another Forum.net version 1.9.1.8 (NET v4.0) - 3/29/2008
Copyright © 2003-2008 Yet Another Forum.net. All rights reserved.
This page was generated in 0.049 seconds.