CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: How to hardcode user run as in your VB exe

  1. #1
    Join Date
    Jun 2009

    Question How to hardcode user run as in your VB exe

    Hi Guys I have a simple VB application which open's read write file on the shared network drive. But unfortunately there are n number of manual file modifications started. I want to keep all of these files which are going to my network drive to be secure and safe so no one can able to access or update them over the network.
    Solution to this will be I remove all the rights of other users which has RW access to this folder. But by doing that my application will fail RW. I don't want anyone in my team to know the password of a user who have R&W access to folder and want to hard code this username password in my VB application so that only this application is allowed to do RW operations to my network drive.
    One way in XP or in Vista is to right click the exe and select run as and enter username and password. But I want to implement the same kind of thing inside my application so the user does not have to know the password and only my VB exe knows about it. How can I code this in my VB application? Please advice.

    Last edited by HanneSThEGreaT; June 30th, 2009 at 10:33 AM. Reason: Removed Email

  2. #2
    Join Date
    Jul 2001
    Sunny South Africa

    Re: How to hardcode user run as in your VB exe

    [ Moved ]
    All my Articles

  3. #3
    Join Date
    Dec 2001

    Re: How to hardcode user run as in your VB exe

    Suppose you put the files in a database, and set a user/pass for the db, which you hard code into your app? Or, write a small app which would sit on the server, to which read/write commands are sent from over the network. Then, that server app could be the only one to access the files.
    Please remember to rate the posts and threads that you find useful.
    How can something be both new and improved at the same time?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)