Proper place for an executable, CLI tool used by Win32 application

This is a discussion on Proper place for an executable, CLI tool used by Win32 application within the Windows Programming forums, part of the Platform Specific Boards category; I have a Win32 application and I need to use a .Net command line utility that creates folders and files ...

  1. #1
    Registered User
    Join Date
    Mar 2007
    Posts
    142

    Proper place for an executable, CLI tool used by Win32 application

    I have a Win32 application and I need to use a .Net command line utility that creates folders and files at the same place where it is. And I can't force it to use another place for its files.

    I was naive and put it in my GUI app's AppData folder (CSIDL_APPDATA) but it works only if I'm admin. Where should I put a cli tool so my app can call it (via ShellExecute[Ex]) and where that thing can create, read and write its own files? And it should be some reliable place. And it should work from XP to Win8.
    Last edited by idelovski; 03-27-2013 at 05:19 PM.

  2. #2
    Registered User
    Join Date
    Aug 2010
    Location
    Poland
    Posts
    682
    I don't know if this helps, but ShellExecute() has a parameter called lpDirectory which allows you to specify the working directory. If the utility doesn't force system to place files in its own directory, it should work.
    I never put signature, but I decided to make an exception.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Same Executable for Win32 GUI and XWindowSystem possible?
    By LokVadnod in forum Windows Programming
    Replies: 5
    Last Post: 12-11-2010, 01:29 PM
  2. new functions in a win32 application
    By xniinja in forum Windows Programming
    Replies: 30
    Last Post: 07-30-2010, 09:55 PM
  3. Replies: 9
    Last Post: 06-21-2009, 01:13 AM
  4. Win32 Application
    By miiisuuu in forum Windows Programming
    Replies: 11
    Last Post: 10-27-2007, 08:49 PM
  5. win32 application
    By GravtyKlz in forum Windows Programming
    Replies: 5
    Last Post: 02-28-2003, 01:53 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21