UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Prevent Users From Opening Fe From The Network Drive., Any Version    
 
   
Kamulegeya
post Aug 22 2019, 03:30 AM
Post#1



Posts: 1,857
Joined: 5-September 10
From: Kampala,Uganda The Pearl of Africa


Hi Members,

What is the best way to prevent users from opening the FE from a network drive?

I was thinking of creating a function like one below.

CODE
Public Function FEOpenedFromNT() As Boolean
Dim strPath As String
FEOpenedFromNT() = False
strPath = CurrentProject.Path
'P is the mapped net work drive shared by all users where i keep a copy of the FE for distribution to users by use of version control routine.
If Left(strPath, 2) = "P:" Or Left(strPath, 2) = "\\" Then
'it is open in a network location
FEOpenedFromNT() = True
End If
End Function


Then i can call the function in the start up routine...

Any better idea?

Ronald
Go to the top of the page
 
dale.fye
post Aug 22 2019, 05:33 AM
Post#2



Posts: 161
Joined: 28-March 18
From: Virginia


That is basically the way I do it.

--------------------
Dale Fye
Microsoft Access MVP 2013-2016
Developing Solutions, LLC
Go to the top of the page
 
GroverParkGeorge
post Aug 22 2019, 07:42 AM
Post#3


UA Admin
Posts: 36,043
Joined: 20-June 02
From: Newcastle, WA


That'll work unless a user knows to press and hold down the shift key to bypass your startup code (AutoExec macro and/or start up form).

You can disable that bypass key to increase the odds of keeping all but the most determined snoopers out.

--------------------
My Real Name Is George. Grover Park Consulting is where I do business.
How to Ask a Good Question
Beginning SQL Server
Go to the top of the page
 
jleach
post Aug 22 2019, 08:11 AM
Post#4


UtterAccess Editor
Posts: 10,215
Joined: 7-December 09
From: St Augustine, FL


Another potential issue may be if they change the network mapped drive, let's say P to Q. Currently your code makes an assumption, where I think you should be able to use a Windows API call to get the UNC path of a mapped drive. You can use this to check if the drive is mapped to a network location.

Something like:

CODE
Dim DriveLetter As String
DriveLetter = Left(CurrentProject.Path, 1)
If IsAlpha(DriveLetter) Then If IsDriveLetterMappedToNetwork(DriveLetter) Then blah


Maybe this one: https://docs.microsoft.com/en-us/windows/wi...i-getdrivetypea



--------------------
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    17th November 2019 - 06:36 PM