Re: Mapping with CreateProcess
From: Ben Rush (kwendex_at_yahoo.com)
Date: 02/01/05
- Next message: Daniel Petersson, Cefalo: "Re: Possible huge clue into unmanged/managed problem"
- Previous message: Peter Huang: "RE: QueryInterface for interface ITypeInfo failed"
- In reply to: Ed McAndrew: "Mapping with CreateProcess"
- Next in thread: Daniel Petersson, Cefalo: "Re: Mapping with CreateProcess"
- Reply: Daniel Petersson, Cefalo: "Re: Mapping with CreateProcess"
- Reply: Ed McAndrew: "Re: Mapping with CreateProcess"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 31 Jan 2005 23:44:15 -0600
Hello Ed,
What user are you running your task under; what are the permissions? It's
possible the user might not have appropriate priviledges to create the
process.
"Ed McAndrew" <EdMcAndrew@discussions.microsoft.com> wrote in message
news:D9631534-DA22-4454-A92A-0412590B9162@microsoft.com...
> I'm trying to map a network drive share in c# with:
>
> CreateProcess("net", @"use " + LocDrive + " " + Quotes + userShare +
> Quotes
> + " " + userPass + " /USER:" + userName, out exitCode, out output);
>
> Everything is right, and it works perfectly when the compiled executable
> is
> launched manually from a command line.
>
> However; when I attempt to use this console app from a scheduled task, the
> create process event fails. I'm not sure what is going on. There are no
> exceptions being thrown at all. The output is simply null
>
> The purpose of this executable is to run the app as a scheduled task every
> 10 minutes to ensure that a drive mapping is still connected.
>
> I'm not sure how much code or what code of mine you would like to see.
>
> Thanks in advance,
>
> Ed
- Next message: Daniel Petersson, Cefalo: "Re: Possible huge clue into unmanged/managed problem"
- Previous message: Peter Huang: "RE: QueryInterface for interface ITypeInfo failed"
- In reply to: Ed McAndrew: "Mapping with CreateProcess"
- Next in thread: Daniel Petersson, Cefalo: "Re: Mapping with CreateProcess"
- Reply: Daniel Petersson, Cefalo: "Re: Mapping with CreateProcess"
- Reply: Ed McAndrew: "Re: Mapping with CreateProcess"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|