Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Secure Shared Folder Or Drive


Hii

i have created a program to lock the system in vb but if there is a folder that is shared or a drive that is shared then on the network that perticular machine's folder or drive is accessable..
i want is when i run that program to lock the desktop the drives or the folders that are shared should also be locked and there should be no access to those folders or drives until the right password is entered for that desktoplock program..
can someone help me pls its urgent..
thanks




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Network Drive Shared Folder Password In VB
Hey all.

Is it possible to open a password-protected folder on the network drive through VB if I know the password?

If you know this, please let me in on it.

Thanks so much.

Wengang

Problem Running Macros From A Shared Folder/mapped Drive
I have an Excel workbook that exchanges data with an Access database using ADO. Both files are in the same directory

The VB code references the database by saying (abbridged)


Code:
chdir Thisworkbook.path
Set cnn = New ADODB.Connection
cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=DBName.mdb;"

The database and the workbook are stored on Computer#1. I would like to be able to use them from Computer#2 as well.

Everything works fine on Computer#1. On Computer #2 I get an error message saying something to the effect of "file c:..." not found". Of course it's not found, the file is not on Computer#2's C-drive!

I added a test subroutine that contains one line


Code:
msgbox thisworkbook.path

and ran it from Computer#2 (remember the file actually resides on Computer#1). The path was identified as one on Computer#2?!

What can I do to have the path properly identified? (say I map Computer#1's C-drive as E: on Computer#2, when run from Computer#2 can I list the path as E:...?)

If there is a different approach I should be taking, let me know.

Copy Files From Shared Folder To The Local C: Folder
Hai
This is Kiran,
I am working with Access 2002 ( XP ).
I have to copy required Excel files from the shared folder to the Local system C: drive for example.
Can any one help me that how can I do it with VBA in MS Access.
Thanks in advance.
Kiran Karnati.

Shared Drive
hi all, is it possible to write a program that sits in the background on my pc, looking at a drive thats shared on the network and then when someone else tries to access it from another computer, display a message asking me if i would like to let them access it? if so how would i do this?

thanks

Shared Drive
How can I detect if a drive is shared on current system? (The drive with the hand on the icon)

Shared Drive
Is there vb code that can automatically run and create a share on your c drive? Can anyone help me please???
Thanks

Check To If C: Drive Is Shared
All,

I need a way to see if the C: drive is shared on my networked computers. Does anyone know how to do that? I have no idea...


Thanks.

Detecting A Shared Drive
Hi folks.

I writing an audit programme for my company and one of the things we are attempting to stamp out are shared drives without a password (on a lan).

I searched the forum and found a thread that pointed me to this site

http://www.mvps.org/vbnet/index.html...umresource.htm

This appeared to be what i wanted. The c: on my PC is set up so it is shared with another user but the routine fails to detect this. Am i on the right path or completely lost!?

Any help would be great

cheers

Filesystemobject On Shared Drive
Hello,

When I try this:



VB Code:
set fso = server.CreateObject("Scripting.FileSystemObject")if fso.FileExists("c: estfile" ) then      msgbox "Hello world"end if



it works perfectly. However, when i try to do the same thing on a shared drive it wont work...why is that?

Connecting To A Shared Drive...
Hi!

Im making a dll that is supposed to move files from server A to server B.
Server B has a shared drive: \serverBdir, user = test and pass = test.

The problem is that Im not allowed to map \serverBdir on server A as a drive.
And I want the dll to make the connection automatic the first time it runs.

I have tryid using "net use \serverBdir test /user:test" with Shell. But this
is no good because the dll doesnt wait until the Net Use is finnished.

Code:
Shell "net use " & sDrive & " " & sPass & " /user:" & sUser


I have looket att MapNetworkDrive, WNetAddConnectio2, WNetUseConnection etc without any success.

Code:
Set WshNetwork = CreateObject("WScript.Network")
WshNetwork.MapNetworkDrive "s:", sDrive, True, sUser, sPass


Is there anyone out there that have solved this problem or has any good idés?

//Jalas

Get UNC From Shared/Mapped Drive???
Does anyone know how to the UNC Path for a mapped drive? I would like to be able to have a user browse for a file, but then convert the path to UNC when they save the path. Example: if the user selects the file ...

"M: est extfile.txt"

and M: is mapped to "\Svr1Files",

I want to have the filename converted to

"\Svr1Files est extfile.txt"

Any help would be appreciated.

Shared Folder Creation And User Creation And Accessing Shared Folder Using User Id
hi,

I want to create a shared folder called 'Accounts' as Accounts$ in windows 2000 pro, windows server 2000, windows XP,windows 2003 server?

I want to create a shared folder called 'Accounts' in windows 98 with password protection.

Also I want to create a user called 'AccUser' with password 'AccUser' in windows 2000 pro, windows server 2000, windows XP,windows 2003 server?


How can access the folder 'Accounts' using AccUser userid from VB 6 application?

Regards

S. Muhilan

Logging In To Shared Drive On Another Computer
What i want to do is logon to the shared drive of another computer from inside my vb6 program.

The problem is before some of the stuff in my program can run it needs to be able to access a shared drive on another computer. Windows tends to drop the connection after a while so I want my program to be able to log in to the shared drive supplying the username and password so my program can reach the drive.

for example I want ot get to this folder using the username and password below
\thecomputer hefolder
username:user password:pass


Does anyone know of an easy way to do this.

Thanks
Kelly

Code Help SQLServer On Shared Drive
I have this working on a single pc ie the SQL database and the app is on one pc only. Now I need to adapt it to have SQL Server on a network shared drive. You will notice that the image gets saved to a folder called rp currently on a single pc. I need to have the images saved to the same Drive as SQL Server (shared drive)on a server in a folder called rp. Can anyone help me as to how to modify the code so that the images will be saved to the proper folder on same drive as SQl Server and also the path that is inserted into the record in SQL be correct. At present it is setup only on one pc so I used C: etc for saving to the rp folder and also as the path in the database to the image. Don't worry bout the chkboxes they work fine. Since they are saved directly in SQL.

Any help would be greatly appreciated.

Private Sub Command1_Click()
On Error GoTo ErrorHandler
If Check4.Value = False And Check5.Value = False And Check6.Value = False Then
iReturnValue = MsgBox("C or S1 or S2 must be selected", vbOKOnly)
Else
Dim strFilename
Dim strPath
Dim i
Dim strSourceFileName
Dim strDestinationFileName

For i = 1 To frmImages.File1.ListCount
strFilename = (frmImages.File1.FileName)
strPath = (frmImages.File1.Path)
Next

Set fs = CreateObject("Scripting.FileSystemObject")
If chkKeep = 1 Then
fs.CopyFile Text1.Text, "c:
p"
ElseIf chkKeep = 0 Then
fs.MoveFile Text1.Text, "c:
p"
File1.Refresh
Set fs = Nothing
End If
Dim objConn
Set objConn = New ADODB.Connection
objConn.ConnectionString = "DSN=eDoan;UID=sa"
objConn.Open

Dim objRS
Set objRS = objConn.Execute("Select * from tblImages")

Dim strSQL


If objRS.RecordCount <> 0 Then

ClaimID = (frmImages.txtClaimNumber.Text)

End If
strPath2 = ("C:
p")
strSQL = "insert into tblImages (ClaimID, Description, Checked, CheckedS1, CheckedS2) values ('" & frmImages.txtClaimNumber.Text & "','" & strPath2 & strFilename & "','" & Check4.Value & "','" & Check5.Value & "','" & Check6.Value & "')"

objConn.Execute (strSQL)

Set objRS = Nothing
objConn.Close
Set objConn = Nothing

iReturnValue = MsgBox("Image has been saved", vbOKOnly)
End If
Exit Sub
ErrorHandler:
If (Err.Number = 58) Then
MsgBox "The file already exists in the database", vbInformation, "Error"
Else
MsgBox "Unexpected error", vbCritical, "error"
End If
End Sub

System Files Over A Shared Drive?
I suspect this would be easy enought to try but I don't have access to a network...so I can't!

If a VB application is installed on a network shared drive to be run on client machines connected to that shared drive, does each and every client machine need all the VB system files (Msvbvm60.dll, .ocx's etc) installed LOCALLY or do they only need to be installed once to the server?

Thanks in advance for any replies.

Files On Shared Windows Drive
I have a program needs to work on the files located on windows shared drive.
I'd like to the files in that forder only be accessed( processed) by my program. I don't want other people to see the files and delete one of my files.
The only probelm is the VB.exe program will be run by anyone.
How should I approach this?
Do I need to do something within my VB program?



Thanks for your help!

Julie

Connect To Shared Network Drive?
One little thing that might be a big thing. I'm  getting ready to deploy an app at work which will connect to a shared network drive
Path = H:MfgSharedMachinetime.mdb
At home I have an "H" drive on a second hard drive as a partition. So obviously I can connect to it no problem.
Problem?
I made the ASS U ME tion" If I can connect to it with Explorer from my workstation at work..........."
Question:
Will I have difficulties at work when the drive is not mapped the same way? Or will I need to have somthing like the ODBC string below?

oConn.Open "Driver={Microsoft Access Driver (*.mdb)};" & _
           "Dbq=H:\MfgSharedMachinetime.mdb;" & _
           "Uid=admin;" & _
           "Pwd="
 


If you invite abuse, it's impolite not to accept it.
Hawkeye Pierce to Frank Burns. MASH c.1980
I try not to invite abuse these days!

How Do I Open File On Remote Shared Drive?
I'm trying to open and read in a file on the network.

The file exists in a shared folder e.g.:

\servernamesharedfolder$directoryfilename.txt

This is the actual path:

\uschmsis02
arrowcastsavedmail$TEST- PPP Commissions For Yesterday-Store635.txt

How do I open this file? I have tried both the open and filesystem object open commands and it keeps failing.

I have even tried mapping a drive on the server to the shared folder and it still won't open. Permissions are ok.

Is there a problem accessing files remotely from another server or something?

Create New Folder Into A LAN Shared Folder
Hi, as the tittle says, I need to create a new folder from my PC into other LAN shared folder, I'm using a FileSystemObject to create the folder but this returns the "Access Denied" error # 70. How I can solve this !?

Thanks !!!

Standard.exe On Network Shared Drive Couldn't Be Deleted
Hi,

During testing period, I compiled a standardard.exe on the shared drive
to allow a few users to test it out.

Somehow I couldn't delete the program even when no one is using the
program.

I will get "Error Deleting File or Folder" message: Make sure the disk
is not full or write-protected and that the file is not currently in
use.

I am very sure that on one was using it because I made a log procedure
if anyone opened the program, it will log it.

How could this happen?

How To Secure The Folder For Recieving File Extension
I need Help and Im just wondering on how to secure the folder for recieving other file extension, I want to limit the recieving of file extension of my folder...

For Example: i created a folder in My Documents named it MARK then the MARK folder will only recieve the .MP3,.WMV,.MOV,.AVI files and not other file extension or else it will prompt file extension is not accepted ...

Thanks in Advance

Shared Folder?
Hello!

I would like shared a folder in VB?

(WInnt and win98)

How can i do?

THank's !


Cybercool

Shared Folder
Hello!


I would like share a folder in VB source code.
How can i do?

Thank

Cybercool

Shared Folder
Hi
Does anyone know how to unshare a path through API?

Thanks in advance
Washington

Log On To Shared Folder With Api?
Hi,
I need to fetch a file from a shared folder via a vb app.  The app is on win98, and the remote machine will be win98, but may be win2k in the future.  I will use the FileSystemObject to search and find it, then I'll either be doing FileCopy to bring it local or just Open it remotely to read it, but I get an error because I haven't logged onto the shared folder--it is password protected.  How do I use code (some api perhaps?) to log on in code to this folder?
Thanks,
--Jsteph

How To Log Onto A Shared Folder
Greetings guru's!

My problem is that I need to log onto a remote share so that my client apps can see my shared database. At present, I have to log onto the share through explorer. Is there a way to do this in vb? Has anyone done it or seen an article on it? If so, please point me in the right direction.

Thank you all

Connect To A Shared Folder
I would like to access network shares using something like the FileListBox. The FileListBox seems to work for network shares, but not if they are password protected. How can I allow the user to enter in the password to be able to display the folders contents?

Network Shared Folder
For one of my programs (i really have to many in progress!-darn, why do i volanteer), i have to create network shared folders, such as the "Net Share" command through a DOS promt does, the only thing is i dont want to drop loads of batch files to create a share. can anyone point me in the direction for this?

Shared Folder Sessions
In Windows XP, if you right click My Computer, and click manage - then "Shared Folders", and then Sessions - it shows if a user is connected to any of the shares on the local machine...

Is there an API to "grab" this collection of information from VB?

I need to be able to read this collection in my VB application, and I'm not sure if there is an API that does it, or what code I need to do it...

Any help is greatly appreciated!

-Dave

Printer / Folder Shared ?
How to display Printer / Folder is shared on Networking ?

Turnning Off/on A Shared Folder
I do not want the users to see or access the backup folder on the backup computer durning the day.
On the back computer: at 1 am turn on shared folder, then at 5am turn off shared folder.
Durning this time slot the PCs will backup their data.
Any thoughts?
Maybe VB-Script ?

Shared Folder... Permissions! ??
Hi everyone!
I am using JoshT code to share a folder on a computer with 2000 or xp.... and it works really good. Now.. the only thing is that this code gives permissions to everyone... and I need to give permissions only to a determined user.

So here is the code

VB Code:
'THIS CODE IS FOR NT/2000'5-3-2001 by JoshT Option ExplicitOption Base 0 Private Const STYPE_DISKTREE As Long = 0 'disk drivePrivate Const STYPE_PRINTQ As Long = 1 'printerPrivate Const STYPE_DEVICE As Long = 2Private Const STYPE_IPC As Long = 3 Private Type SHARE_INFO_2    shi2_netname As String 'LPWSTR    shi2_type As Long 'DWORD    shi2_remark As String 'LPWSTR    shi2_permissions As Long 'DWORD    shi2_max_uses As Long 'DWORD    shi2_current_uses As Long 'DWORD    shi2_path As String 'LPWSTR    shi2_passwd As String 'LPWSTREnd Type 'NetShareAdd returns 0 if no error''lpwstrServerName As Any, --the computer to create the share on,'                           NULL for local computer,'                           otherwise must begin with "\"'ByVal dwordLevel As Long, -- specifies the type struct that contains the data'       2 for SHARE_INFO_2 Struct'       502 for SHARE_INFO_502 Struct'ByVal lpbyteBuf As Any, -- pointer to the struct who type was specified above'lpdwordParmErr As Long, -- if an error in the struct, the number of the struct's parameter'                            that caused the error (0 is no error) Private Declare Function NetShareAdd Lib "netapi32.dll" _    (lpwstrServerName As Byte, _    ByVal dwordLevel As Long, _    ByVal lpbyteBuf As Long, _    lpdwordParmErr As Long) As Long      Private Sub TestIt()    Dim si2 As SHARE_INFO_2    Dim retval As Long    Dim parmerr As Long    Dim compname() As Byte        parmerr = 0    'compname = vbNullString    compname() = "\COMPUTER7" & vbNullChar        si2.shi2_netname = "Test2C" & vbNullChar 'the name of the share    si2.shi2_type = STYPE_DISKTREE 'the share is on the disk    si2.shi2_remark = "Testing Out NetShareAdd VB API" & vbNullChar 'the comment    si2.shi2_permissions = 0 'this should be ignored    si2.shi2_max_uses = -1 'unlimited connections    si2.shi2_current_uses = 0 'I don't think this is applicable    si2.shi2_path = "C:TEMP" & vbNullChar 'the path to the share    si2.shi2_passwd = vbNullString 'NULL, the password 'this should be ignored    retval = NetShareAdd(compname(0), 2, VarPtr(si2), parmerr)    End Sub Private Sub Form_Load()    TestItEnd Sub


I think I need to work around si2.shi2_permissions or si2.si2_permissions.... but I am lost.

PD. Have I told you how MSDN search sucks?

Making A DSN Through FTP Or Shared Web Folder
Guys:
We are developing application which is based on Client server functionality.WE have a database which is built in MS Access that is reside on server side .
I want to create DSN through which I can access this data base remotely at client side .will it be possible through making a DSN through shared web folder(WAN)? or there are any other suggestion to solve this problem.


thxs & regds.
Vikrant

Hidden Shared Folder
Hello All,

I want to do somthing like ... a file which is shared on the LAN and when any client run that shared file then he will redirected to a hidden shared folder with $ on my pc and have read only permission.

Thanks for reading.

Regards,
Hunaid ( munnobhai ).

Creating A Shared Folder In VB6
Hi all!
is there any way to create a network shared directory from VB?
i know how to create a "normal" directory, but how do i "share it" from VB?

WinNT 4 Shared Folder.
Can someone please tell me how can I access a file, any kind of file(data base), from a shared folder in NT4.



Thanks in advance!

Make A Shared Folder
I asked this question yesterday, but i didn't get a very clear answer...

How do i make a directory that is shared in a network??

Make A Shared Folder
How would i create a directory that is shared over a LAN?

Help With Windows Shared Folder
I wanted to connect to a windows shared folder on my local area network using the winsock control in vb6. Is there a possible way of doing that. I cant figure out what port to connect to. There are 8 ports listening on the machine i want to connect to. Thanks Matt

Set Permissions On A Shared Folder
Hi,

Does anyone know any code that will set permissions on a shared folder. I would also need to add groups (i.e. Owner/creator to the permissions list).

If anyone could help it would be cool.

Thanks,

Adam

Create Shared Folder In VB?
HI all,

I was wondwring if it was possible to created a share on a specified folder in VB 6.0. I have looked everywhere for some help but to no sucess.

EG. Directory is C:MY_DEMO

And I want to share it under the name "MY_DEMO", and let only authenticated people have full control.

Is this at all possible or does it have to be done manually?

Regards,



kloner

How To Access To The Shared Folder?(please Help)
LEt say, i got 2 computer, A and B, both are LAN connected. How can i access the shared folded in computer B from computer A using the Visual basic? IS there any method that i can use?
For example, computer A with ip address is 192.168.2.1 while computer B is 192.168.2.2.
i want use visual basic to access computer B, c drive directory, and xxx shared folder in order to copy the file inside the shared folder to computer A. So... can someone teach me... please. Thank

Network Shared Folder
hellow guys...!

is it possible to write a program using vb6 - that scans for a shared folder. Of course we can use windows explorer to find a shared folder, but what i want is how to code that thing...

is it possible?

thnks


¤¤¤(¯`·¸•´¯)¤¤¤])•—› shuryuhen8 ‹—•([¤¤¤(¯`·¸•´¯)¤¤¤
Mÿ Çødë Rðútìñès Crâw£s Øñ ¥ðúr PÇs ߣÓÖÐSTRÈÃM

Access Shared Folder
Hi Friends,
 i am developing an application to execute a file from the shared folder on the remote PC. i want help regarding this.
Thanks,
Suresh

Create Shared Folder
Hi guys,

Can some one help me with setting up a shared folder on a workstation.

Like I want to create a folder on workstation A and then set its property to Shared and then when I go to workstation B I wnat to access it from Workstation B only.


Tnx

Shared Folder Access?
Can I have access to shared folders on Network in VB? If yes then how?

Connect To Non-shared Folder
I know I have read somewhere that one can establish a connection (ado) even to a folder in a remote computer which is not shared, I have tried searching in the forum I cannot find it, I hope someone who knows how to do it will be kind enough to share it with me, a million thanks in advance....

How To Find A Shared Folder?
I need to get list of shared folder on a PC in the network.
In other words I know the PC name and I know that some its drives/folders are shared, but I don't know their names. Is there any way to find those names?
Thank you.

Shared.Local Folder
Is there any way to get the local location of a shared folder, that is the local location on the machine that is serving the folder. So if I looked at the shared folder \ServerFolder I could find that it is located at C:Folder on the server. Now that I think about it, if that is not possible then is there a way that if I put the local address in the comment section of the shared folder that I could get the comment information? Thanks in advance for any help!!

Copyright © 2005-08 www.BigResource.com, All rights reserved