Jumat, 19 April 2013

[MS_AccessPros] Re: Remote shut down of a Front End db

 

Duane

Thanks for reminding me to add the reg key code for trusted locations.

Bill

--- In MS_Access_Professionals@yahoogroups.com, Duane Hookom <duanehookom@...> wrote:
>
> I use a script like the following which:
> - creates a folder in the user's C:\Users\ directory
> - sets the folder as a trusted location in Office 12 and Office 14
> - copies the application file from the network to the new directory
> - runs the application
>
>
> '===================
> ' File: SetAccessSecurity.vbs
> '===================
>    Const SystemFolder= 1
>    Dim fso  'to be used for file related code
>    Dim SysFolder
>    Dim SysFolderPath
>    dim strUserLogin 
>    Dim RegEdPath
>    Dim strAppFolder
>    Dim strAppName
>    Dim strAppFile
>    Dim strAppNetworkFile 
>    strAppName = "MyAppName"
>    strAppFile = "MyFileName.accdb"
>    strAppNetworkFile = "H:\APPS\Projects\MyAppName\Application\MyApp_AP.accdb"
>
>    Set fso = wscript.CreateObject("Scripting.FileSystemObject")
>    Set SysFolder =fso.GetSpecialFolder(SystemFolder)
>    SysFolderPath= SysFolder.Path
>
>    'initialize the script shell object
>    Set WshShell = WScript.CreateObject("WScript.Shell")
>    strUserLogin = WshShell.ExpandEnvironmentStrings("%USERNAME%") 
>    strAppFolder = "C:\users\" & strUserLogin & "\" & strAppName
>    if not fso.FolderExists(strAppFolder) Then
>       fso.CreateFolder strAppFolder
>    End If
>
>
>    ' Office 12
>    RegEdPath = "HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Access\Security\Trusted Locations\"
>    WshShell.RegWrite  RegEdPath  ,strAppName
>    'Write the values into the registry
>    WshShell.RegWrite  RegEdPath & strAppName & "\Path" , "C:\Users\" & strUserLogin & "\" & strAppName & "\"
>    WshShell.RegWrite  RegEdPath & strAppName & "\AllowSubfolders" , 1, "REG_DWORD"
>
>    ' Office 14
>    RegEdPath = "HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Access\Security\Trusted Locations\"
>    WshShell.RegWrite  RegEdPath  ,strAppName
>    'Write the values into the registry
>    WshShell.RegWrite  RegEdPath & strAppName & "\Path" , "C:\Users\" & strUserLogin & "\" & strAppName & "\"
>    WshShell.RegWrite  RegEdPath & strAppName & "\AllowSubfolders" , 1, "REG_DWORD"
>
>    wscript.Echo strUserLogin & " Security Setup Complete!"
>
>    fso.CopyFile strAppNetworkFile ,strAppFolder & "\", 1
>    wscript.Echo strAppFolder & "\" & strAppFile
>    wshshell.Run strAppFolder & "\" & strAppFile
>
> wscript.Quit
>
> Duane Hookom MVP
> MS Access
>
> > To: MS_Access_Professionals@yahoogroups.com
> > From: wrmosca@...
> > Date: Fri, 19 Apr 2013 15:52:02 +0000
> > Subject: Re: [MS_AccessPros] Remote shut down of a Front End db
> >
> > Funny you should mention that, Liz. I wrote an article on how to do exactly that. It's on my site at http://www.thatlldoit.com/Pages/howtosarticles.aspx
> >
> > Regards,
> > Bill Mosca, Founder - MS_Access_Professionals
> > http://www.thatlldoit.com
> > Microsoft Office Access MVP
> > https://mvp.support.microsoft.com/profile=C4D9F5E7-BB03-4291-B816-64270730881E
> > My nothing-to-do-with-Access blog
> > http://wrmosca.wordpress.com
> >
> >
> >
> > --- In MS_Access_Professionals@yahoogroups.com, Liz Ravenwood <liz_ravenwood@> wrote:
> > >
> > > John, is there any way you can have the users run a script that they only get a copy of the front end to their local drive? That way, they each run their own version of the database and don't impact each other. The data of course would still be linked in the back end.
> > >
> > > Respectfully,
> > > Liz Ravenwood
> > > Programmer/Analyst
> > > Super First Class Products
> > > B/E Aerospace
> > > O: 1.520.239.4808
> > > www.beaerospace.com
> > >
> > > -----Original Message-----
> > > From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of jfakes.rm
> > > Sent: Friday, April 19, 2013 6:32 AM
> > > To: MS_Access_Professionals@yahoogroups.com
> > > Subject: [MS_AccessPros] Remote shut down of a Front End db
> > >
> > > I've seen processes on how to remotely close a frontend but I thought I'd ask the experts on this site as to the best way to do this.
> > >
> > > It happened again yesterday, I had a user log into a frontend and edit a form (I know, don't let users edit forms, but thats the way the db was set up. I also know not to share a fe with more than one user, but...) Anyway, the user walked away from her computer leaving the fe locked up. The other user tried to get into the db but got the dreaded admin locked error. I suggested adding another fe in, but eventually the user closed the db and the issue was resolved.
> > >
> > > In the future if this happens, I want to be able to safely close that frontend. Whats the best way to do this remotely? I do not have special permissions on the server to close it.
> > >
> > > John F
> > >
> > >
> > >
> > > ------------------------------------
> > >
> > > Yahoo! Groups Links
> > >
> > >
> > >
> > >
> > > This email (and all attachments) is for the sole use of the intended recipient(s) and may contain privileged and/or proprietary information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
> > >
> >
> >
> >
> > ------------------------------------
> >
> > Yahoo! Groups Links
> >
> >
> >
>

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (7)
Recent Activity:
MARKETPLACE


.

__,_._,___

Tidak ada komentar:

Posting Komentar