|
Hi,
By the looks of it creating a folder and password protect it seems a rare find. What I am trying to do is to create folders through VB.NET one for each person on a separate server drive and have it password protected. I have a database and I managed to create a folder for each record with a name found in Column1.
But now I need to set a password through code and possibly link it to column2.
Is this possible guys. I know there is the FileSystemWatcher and NotifyFilter but I dont know how to use them or if they will do the trick. Anyone has any idea please??
|
|
|
|
|
wrote: By the looks of it creating a folder and password protect it seems a rare find.
There's a reason for that. It "mostly" cannot be done. It kind of can, Microsoft released a free product to do that a while back, and 3 days later pulled it.
wrote: one for each person on a separate server drive and have it password protected
Imagine the total chaos if a person created 10 different folders, password protected them all with different passwords, and then called you to reset that password when they forgot them.
wrote: But now I need to set a password through code and possibly link it to column2.
Not possible since NTFS doesn't support this.
wrote: FileSystemWatcher and NotifyFilter
Has nothing to do with security of this kind.
Basically what you want to do isn't possible, for administrative reasons at the least. How it's properly done is to create a folder on the server, then assign the appropriate permissions for that users account to that folder and making sure noone else (except admins of course) have permission to that folder.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
okay David many thanks for your professional reply.
Our problem is that in our organisation we need to allocate one folder for each user. Now if the password protection isnt possible maybe there is another solution1. I was doing a search on the internet for this pssoibility and seems workable. It is this:
Create folders on server. Folder name will be the same as login name on the network. On user login his Folder will be visible on the desktop and he can store his files and subfolders in it. He will not have access to the Server and all folders created on it will be hidden. Only on boot up individual folder will be set to Normal for its user. On logging the folder will be sent to the server and marked as hidden.
Now I guess this involves Windows Services on which I have little experience. Can you see this solution feasible please?? Im kind of new in VB.NET windows manipulations so everything is a help.
cheers!
|
|
|
|
|
Doesn't windows already do this kind of thing when you setup remote profiles within a network. Each user has their own profile and when a user logs on Windows selects the correct profile across the network giving the user access to their own folder(s), drive mappings and so on, but locking out other folders. These folders can be mapped to things like "My Documents" and so on.
Unfortunately I don't really know the details about how to set that up, you are best asking a network administrator for help with that one.
|
|
|
|
|
focusit wrote: Create folders on server. Folder name will be the same as login name on the network.
So far so good. It's usually done under a shared folder on the server called, oddly enough, Home . The permissions on this folder are stripped for the Domain Users. On each individual folder under home, the folder inherits the permissions from its parent folder, meaning that noone (except an Admin) has permissions to any of the folders under home. For each individual folder under Home, you reinstate the permissions for that folders particular owner. This way, they can see their own home directory, but no others.
In your login script, you map a drive letter to the users Home\folder. Done, problem solved.
focusit wrote: On user login his Folder will be visible on the desktop
Usually not. Unless your login script, or something else, specifically creates a shortcut on the Desktop for the user.
focusit wrote: He will not have access to the Server
Unless you give the users permissions to other folder on the server and possibly map some drive letters for those areas.
focusit wrote: Only on boot up individual folder will be set to Normal for its user. On logging the folder will be sent to the server and marked as hidden.
You don't have to do any of this. You mark anything hidden or visible, ever. It turns into a administrative nightmare if you do.
focusit wrote: Now I guess this involves Windows Services on which I have little experience.
No, it doesn't. It's strickly Windows Networking. I suggest picking up a book on it before you even attempt to continue this. Anything you do in code is just going to needlessly complicate your situation.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi Dave,
Many thanks for your reply. Right so the folder handling system I will leave that to the network manager.
Now we very often have 2 people working together on a file on the same PC logging naturally with one username. I have created an application to transfer the file to the other person's folder. It works fine on my computer. Now will this application still be possible if I change the path to the server with all the domain and permissions you suggested. I am only selecting a file with the Showdialogu Window and copying a file to the other person's folder. Is this possible?
Cheers
|
|
|
|
|
No, scince each user is the only person who has access to their own home folder. This CAN change if the user grants the other some rights to the folder, or creates a sub-folder and grants the other user rights to it.
The usual way around this is a shared folder that everyone has access to. They can create their own folders in there and collaborate using the files stored in that.
But that's also something you have to setup with your LAN Admin.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I am writing an application that needs lots of things dynamically created, Labels etc.
Here is the code I use to add a label to the form:
Dim lblTitle as label
With lblTitle
.Left = 24
.Top = 24
.Width = 632
.Height = 48
.BackColor = Color.Black
.ForeColor = Color.White
.Font = New Font("Arial", fontsize, FontStyle.Regular)
.Enabled = True
.Text = "Title of the song"
.AutoSize = False
End With
controls.add(lblTitle)
I want to make a scrolling label, so I need to create a panel on the form, then create a label in the panel with a width wider than the panel width, and move the .left of the label to make it look as if it is scrolling.
I can do this when dropping the items onto a form normally, but not by dynamically creating them, please can someone help, I have been trying for days.
Thanks
|
|
|
|
|
You didn't create an instance of the label. Change your first line to this:
Dim lblTitle As New Label
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Sorry, I did use: Dim lblTitle As New Label,
Bu, my question is, how to dynamically create a panel with a Label in it.
|
|
|
|
|
Create the panel using the same method, add it to the Controls collection of the form. Create the label the way you're doing it now but add it to the Controls collection of the Panel, not the form.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Excellent.
I used:
'panel1.controls.add(txtTitle)'
and it worked fine.
Thanks again
|
|
|
|
|
Set the parent property of the label to the panel you create. Set the parent property of the panel to the form on which you want it to appear. The labels location coordinates will be relative to the top left corner of the panel. If you want the panel to show on the form you must set its visibility property to true and call BringToFront. You must do the same for the label so it shows on the panel.
|
|
|
|
|
I am trying to write a DVD player in VB.net
I have used the WMP SDK and embedded WMP in a VB application. I can open an mpg file, avi etc, but when I load a dvd 'VIDEO_TS.ifo' file into the embeded WMP it plays, but without sound.
Here is the code I use to load the DVD into WMP:
OpenFileDialog1.ShowDialog()
If OpenFileDialog1.FileName <> Nothing Then
file = OpenFileDialog1.FileName
AxWindowsMediaPlayer1.URL = file
End If
As I said before, the sound is heard, but no video is shown.
|
|
|
|
|
Does it play just using Windows Media Player?? Don't use your application to try and play it, just launch WMP.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Yes, WMP works fine
Confusing....!
|
|
|
|
|
I have created a project that includes a dataset pointing to a SQL Server Table "Equipment". When I build my project I am getting the following errors in the Error List:
1.) Reference to a non-shared member requires an object reference - I've got several of these errors on the file Equipment_Dataset.vb (which VB.NET generated automatically for me). The real kicker is that the errors are in the Data Access Attributes.
i.e.
<system.diagnostics.debuggernonusercodeattribute()> _
Friend Sub New(ByVal rb As System.Data.DataRowBuilder)
MyBase.New(rb)
Me.tableEquipment = CType(Me.Table,EquipmentDataTable)
End Sub
The System has the squiggly blue underline attached to the Error message
2.) Data is not a member of String
Again, the error is located in the file Equipment_Dataset.vb (auto generated by VB), but this time the error is on the following code:
Dim previousConnectionState As System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State
If ((Me.Adapter.UpdateCommand.Connection.State And System.Data.ConnectionState.Open) _
<> System.Data.ConnectionState.Open) Then
Me.Adapter.UpdateCommand.Connection.Open
End If
The System.Data has the squiggly blue underline attached to the Error message.
I cannot find help on this anywhere. Do I need to add a particular reference to my project? Am I doing something wrong?
Help!
Thanks,
Trav
|
|
|
|
|
The above code is interesting, but I already have a connection, and am passing the row id to the module. All I want to do is get the information from that row of data. There must be an easier way? Thanks
sdkgolf
|
|
|
|
|
Hey all..
i'm sort of new to this..but please help me on this one...
i'm trying to find a program that can handle a three way connection between 3 or more laptops. more specifically, i need every node to be able to receive messages from other node and then forward them to the nodes that havent received it yet. the case that i'm trying to handle is the hidden station problem in the case of a wireless ad hoc network between 3 or more laptops or nodes. if a node sends a message to another node, i need the receiving node to forward that message to the nodes that its connected to that are not in turn connected to the original sending node.
if no such application exists...which i doubt..but i cant find one anyway...at least tell me what i should be looking for.
thx!
Ghassan.
|
|
|
|
|
You need a server that all the laptops can get to because you can use that server as a hub where all the laptops would connect. when a laptop sends a message, the program on the server will distribute the message to every laptop logged in.
Otherwise how do you know what laptops are on line and managing the connections and the distributing of messages would be a nightmare.
my humble opinion of course....
Nathan
|
|
|
|
|
hello
I use wizard of VS.net 2005 for access.
I push the save button but it not save in access.
please help me.
thanks for your help
|
|
|
|
|
Hello
thanks for your answer .
my database is access.i connect it to the VB.net 2005 and drag the one feild in form and VB.net 2005 create dataset,BindingSource,dataAdapter,BindingNavigator.
when I push the save button in BindingNavigator but when i exit my program and run it agian nothing save in my access database.
i'm not add Oledbconnection because it's work but not save the data in access data base
please help me
|
|
|
|
|
I still don't understand what you mean. Your description is still too vague.
alek hunter wrote: i'm not add Oledbconnection because it's work but not save the data in access data base
Without a connection to the database nothing will work because the application will not be able to connect to the database in order to issue it with instructions. Especially instructions to insert data.
|
|
|
|
|
hello
I use wizard of VS.net 2005 for access.
I push the save button but it not save in access.
please help me.
thanks for your help
|
|
|
|
|
You're going to have to add a lot more detail to the question than this.
Which wizard did you use? What do you want to do with the Access database? What Save button?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|