Re: Accessing network PCs

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



The easiest solution for this is to create a "use record" for your login
session.
the command should look like:
"net use \\otherpc\sharename passwd /user:validUserOnOtherpc"
The way you do this is by placing a "net use" command in your autoexec.bat
file.
Another option is to execute the above "net use" from your code (using
System.Diagnostics.Process.Start), this way you can delete the network
connection when done with it.
Note that you can use the IPC$ instead of a share name, this gives you
access to all of the resources on the "other" pc.

There should be a .NET function for this somewhere however since spawning
"net.exe" from code is ugly IMO (and he shouldn't publish his password in a
batch file if he decides to go that route). Also note that IPC$ is really
just a login (authentication) resource for all intents and purposes (unlike
other resources where a DACL check is immediately conducted against the
resource). Once your're authenticated on the remote machine using IPC$, your
network session on that machine is still subject to normal access checks on
whatever resources you touch (which gets into shared resource permissions vs
normal NTFS permissions but that's another story). Access denied can still
occur IOW if you later touch a resource you don't have access to (whereas
access denied will occur right away if you authenticate against the target
resource from the outset, opposed to IPC$).


.



Relevant Pages

  • Re: Waitstats Performance on sql 2005
    ... so are you saying I should pay you for now for attending my sessions:). ... In the waitstats report example code from my session I filter out a fair number of waits that you might want to have a look at. ... I am also trying to understand which wait types should be thrown away and have had help from Jonathan Kehayias and Bob Ward amd am waiting for Bob's gathering together of all the wait types and their meanings. ... During the execution of that task if the thread has to wait on a resource such as physical disk it starts tracking the time and the thread gets pulled off the processor so another runnable thread can run. ...
    (microsoft.public.sqlserver.server)
  • Re: Waitstats Performance on sql 2005
    ... You should have introduced yourself at the end of the session, ... You imply that a thread is a resource and when it comes to waits ... available the thread must put back onto a scheduler to run again. ... typically indicate CPU pressure such as too few cores for the given work ...
    (microsoft.public.sqlserver.server)
  • Re: Localization / Globalization / language versions - Where to start?
    ... Encoding and Localization: ... When you want the application support another culture later, ... Translate the resource text into another language, ... type the following command in the VS2005 ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Localization / Globalization / language versions - Where to start?
    ... Encoding and Localization: ... When you want the application support another culture later, ... Translate the resource text into another language, ... type the following command in the VS2005 ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Clustered VMs - High Availability vs Fault Tolerance
    ... Most are running an application that requires a user initiated telnet ... session is disconnected. ... You are right that in HA, when there is a move or a failover of a resource, clients will lose their connections and will have to reconnect to the resource after the resource is started on another node. ... In Live Migration, the resources are moved with the memory on the active location being copied live during the move process. ...
    (microsoft.public.windows.server.clustering)