Re: Shared folders
- From: "Senen" <senen@xxxxxxxxxx>
- Date: Mon, 10 Mar 2008 23:59:54 +0100
KM,
I did some tests with the net.exe command and I get the same result as with
the explorer.
It looks to be the easiest way to create the authentication channel.
I will also try the WNet functions in the future.
Thanks again for your help
Senen
"KM" <konstmor@xxxxxxxxxxxxxxxx> a écrit dans le message de news:
eFBXl4ugIHA.5780@xxxxxxxxxxxxxxxxxxxxxxx
Senen,
There are multiple ways how to create an authentication channel between to
Windows PC. Depending on the language your HMI app is written in it may be
easier to use API (like WNet functions) or script (WMI objects) or
directly issue the net.exe command.
Please note that for the net.exe command I showed earlier it is safe to
leave the drive letter out. Then only the authentication channel is
created (if the user credentials are properly provided within the command)
but no drive mapping happens. then you can safely access the server PC
shared resources from the other PC where the channel was created from
(certainly I refer to the resources available for the user account used).
In other words, the follwoing command should do it:
net use \\IP\sharename /USER:<user> password
--
=========
Regards,
KM
Hello KM,
My problem is as following:
The HMI working on the remote PC (Windews XP or 2000) has to access files
located in the XPe machine.
After sharing the folder in the XPe machine with the command:
net share MyShareFolder=D:\MyShareFolder
The HMI program performs a simple
fd=fopen("\\xxx.xxx.xxx.xxx\MyShareFolder\MyFileName.xxx",...);
This works fine but the first time the HMI app is running on a remote PC,
the access to the file in the shared folder of the XPe target is denied.
If manually I open the explorer and type in the address bar:
\\xxx.xxx.xxx.xxx then I will be prompted for a username and password.
After that the access from the HMI program works fine.
What I would like is to find a way (some extra code in my HMI program)
where I can send the username and password to avoid the user to have to
go through the explorer and manually type the IP address of the XPe
machine, the username and the password.
I suppose that your command to define a network drive would work, the
problkem is that I don't know which driver letter is available and there
is still a manual command to perform.
Thanks
Best Regards
Senen
"KM" <konstmor@xxxxxxxxxxxxxxxx> a écrit dans le message de news:
uBLh2bifIHA.5160@xxxxxxxxxxxxxxxxxxxxxxx
Senen,
I thought you asked how to avoid typing IP address of that machine in
Explorer.
You can also use "net use <drive letter> \\IP\sharename /USER:<user>
password" command to map the share. This way you can use the proper user
account credentials even if they are different on both PCs.
--
=========
Regards,
KM
"Senen" <senen@xxxxxxxxxx> wrote in message
news:47cd0c80$0$905$ba4acef3@xxxxxxxxxxxxxxxxx
Hello KM,
Thanks for the advises.
There is no problem with the machine name because I use the IP address:
\\192.168.10.1 for example.
I can't have matching user accounts on both machines.
I will look as you suggested in the direction of the Guest account in
the XPE machine.
Thanks again for the help
Senen
"KM" <konstmor@xxxxxxxxxxxxxxxx> a écrit dans le message de news:
%23mtlWEYfIHA.1132@xxxxxxxxxxxxxxxxxxxxxxx
Senen,
If by protection you meant creating an authentication channel between
two PCs then all you have to do is to make sure:
- either use matching user accounts on both PCs
- or enable Guest account (on both machines again). Read more about
Guest access on XP on the Web.
As for the name of the machine, looks like it doesn't get resolved on
your network. Check it out with ping command. Check all the firewall
settings on your XPe device and make sue Server service is up and
running on that device.
--
=========
Regards,
KM
"Senen" <senen@xxxxxxxxxx> wrote in message
news:47cc5f53$0$833$ba4acef3@xxxxxxxxxxxxxxxxx
Good Day,
I have a problem with a (network) shared folder on my XPE system:
When trying to open a file in this folder from a remote XP machine,
the first time it doesn't work.
I have to manually open Windows Explorer and type \\IPofXPeMachine\
then I'm prompted for a user name and password.
After the access grant I can shutdown the client machine, stop the
app, . the network access to the shared folder works fine.
The way I share the folder in the XPe machine is simple and it works
fine:
Net share MySharedFolder=D:\MySharedFolder.
If anyone has an idea about how to proceed to not have to manually
type the IP address in the explorer and type the username and
password.
I would like to open any file in the shared folder without any
protection.
Thanks
Senen
.
- References:
- Shared folders
- From: Senen
- Re: Shared folders
- From: KM
- Re: Shared folders
- From: Senen
- Re: Shared folders
- From: KM
- Re: Shared folders
- From: Senen
- Re: Shared folders
- From: KM
- Shared folders
- Prev by Date: Re: Shared folders
- Next by Date: Re: Target Designer Help
- Previous by thread: Re: Shared folders
- Next by thread: Re: Adding run-once registry entries from .NET application
- Index(es):
Relevant Pages
|