•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the C++ section within the Software Development category of DaniWeb, a massive community of 425,824 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,976 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C++ advertiser: Programming Forums
Views: 333 | Replies: 0
![]() |
•
•
Join Date: Jul 2008
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
Hi guys.
I wrote a Win32 C++ program that uses C++ streams to open and read files. I log on a machine using a specific user (USER1) and password. It is supposed that this user has access to files spread across the network (file sharing). Therefore I'm using sentences like this (to open the files):
ifstream remote_file ("\\\\10.1.1.1\\directory\\file.txt",ios::in);
It works fine since I'm logged in using USER1. But now I need to deploy my application to another machine. I cannot log on using USER1, I have to use another user and as a consequence my application cannot open those remote files.
I tried by using the RUN AS command but Windows 2003 is unable to run it.
Any ideas? Maybe a Windows function that accepts my user and password so that I can read files remotely?
Thanks for the advice.
regards
berge
I wrote a Win32 C++ program that uses C++ streams to open and read files. I log on a machine using a specific user (USER1) and password. It is supposed that this user has access to files spread across the network (file sharing). Therefore I'm using sentences like this (to open the files):
ifstream remote_file ("\\\\10.1.1.1\\directory\\file.txt",ios::in);
It works fine since I'm logged in using USER1. But now I need to deploy my application to another machine. I cannot log on using USER1, I have to use another user and as a consequence my application cannot open those remote files.
I tried by using the RUN AS command but Windows 2003 is unable to run it.
Any ideas? Maybe a Windows function that accepts my user and password so that I can read files remotely?
Thanks for the advice.
regards
berge
![]() |
•
•
•
•
•
•
•
•
DaniWeb C++ Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
age amd blue gene chips database dell development dos drivers energy enterprise firefox games graphics hardware ibm ibm. news intel intel ibm internet it linux memory microsoft mozilla news open open source open-source opengl openoffice operating pc ps3 recession red hat remote working russia software source sun super supercomputer system trends ubuntu vista windows x86 xp
- problem reading remote file (Perl)
- Fake Microsoft Windows Security Warning (Viruses, Spyware and other Nasties)
- xp remote desktop across wan/lan (Windows NT / 2000 / XP / 2003)
- Removal of Home Search Assistent (Viruses, Spyware and other Nasties)
- About;Blank Please Help, Hijack Log File (Viruses, Spyware and other Nasties)
- I can't remove about:blank (Viruses, Spyware and other Nasties)
- Another Trojan.Bookmarker.Gen (Viruses, Spyware and other Nasties)
Other Threads in the C++ Forum
- Previous Thread: Call a void()
- Next Thread: loop switch


Linear Mode