CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 10 of 10
  1. #1
    Join Date
    Sep 2011
    Posts
    13

    [RESOLVED] Windows CE 4.2, mapping a remote file

    I trying to map a remote file with net use, but when i add the password after username and alwaysa error status appears.only work without the password in the net use command

    MY steps:
    1.First create a bat file with this command:

    net use Server \\Copernico\Configuration /user:Pablo med

    comment ( "med = password")
    comment("Copernico=computername)
    comment("Configuration=filename")

    2. transfer the bat file with activesync to my device.
    3. run the bat file in the Windows CE framework 4.2 device

    How to mapping a remote file using a bat file with the net use command,using the password ?

  2. #2
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Windows CE 4.2, mapping a remote file

    To see the parameters of a command, use the /? flag.

    net use /?
    also, .CMD files are the new BATCH file, and Powershell is the new DOS!
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  3. #3
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: Windows CE 4.2, mapping a remote file

    Your post would be better in the mobile devices section as it has nothing to do with vb.net.

    How is your device connected to the network when you try to execute this bat file?
    Always use [code][/code] tags when posting code.

  4. #4
    Join Date
    Sep 2011
    Posts
    13

    Question Re: Windows CE 4.2, mapping a remote file

    is connected to the computer with the ethernet and usb cable, the computer have static ip and the folder is share.
    Im trying to first used the net use, and later create a form in vb.net.

    today I try the addconnection method but the device have the 4.2 framework, no drive like c:.
    Not sure if is going going to work

  5. #5
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: Windows CE 4.2, mapping a remote file

    So it is connected with an ethernet cable or a usb cable or wireless connection?

    Have you tried mapping the folder using windows explorer on the device?

    I have not tried to share a drive back on the pc from a device. Instead I use a client/server approach with a server program running on the pc and a client on the device and use TCP/IP sockets for data exchange.

    btw what version of VB are you planning to use? You will need VB2003 to develop for CE 4.2
    Always use [code][/code] tags when posting code.

  6. #6
    Join Date
    Sep 2011
    Posts
    13

    Re: Windows CE 4.2, mapping a remote file

    Is connected with both usb and ethernet, but when the process complete the mapping, going to be ethernet only.

    Only left mapped folder process., but with the password net use is not working...

    he work fine from Windows Explorer but I need to do this automatic.
    Last edited by pcfry; September 29th, 2011 at 02:08 PM.

  7. #7
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: Windows CE 4.2, mapping a remote file

    Unless you have found something that I have not you will not be able to deploy an app from VB2005 to CE 4.x VB2005 supports CE 5.x but these programs will not run on a 4.X device nor will those which target the pocket pc or windows mobile platforms.

    I have both 2003 and 2005 installed on 2 different machines specificaly in order to develop for both CE 4 and CE 5 devices. Ironically I have saw no option for CE 6 on any version of VS but apps developed in VB2005 for CE 5 will run under CE 6 or at least the ones I have tried will.
    Always use [code][/code] tags when posting code.

  8. #8
    Join Date
    Sep 2011
    Posts
    13

    Thumbs up Re: Windows CE 4.2, mapping a remote file

    The server application is created in vb6, the client device in vb2005 and the applications work fine . Is posible to use addconnection or other method, what app i can deploy from VB2005 to the same that net use login ...?


    Today:
    Resolve the net use error using /password:med, running the .bat a map the file succesfull, but
    now happen that when the device restart and click the network file prompt for password.
    New syntax:
    net use Interswift \\Copernico\Configuration /user:Pablo /password:med
    pause
    Old sysntax:
    net use Server \\Copernico\Configuration /user:Pablo med

    Thanks for your time.
    Last edited by pcfry; September 29th, 2011 at 02:44 PM.

  9. #9
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: Windows CE 4.2, mapping a remote file

    So you have managed to build a working app for a CE 4.2 device under VB 2005? What target are you using in VB for this? I have not saw any way to get a working app for ce 4.2 using vb2005, all references point to vb2003.
    Always use [code][/code] tags when posting code.

  10. #10
    Join Date
    Sep 2011
    Posts
    13

    Thumbs up Re: Windows CE 4.2, mapping a remote file

    ok I correct my stament, the device use .NET Compact Framework 4.2 for Windows Embedded CE 6.0 ...

    my device is: Model NO. mk-100 mini kiosk
    Last edited by pcfry; October 5th, 2011 at 03:57 PM.

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured