ShellExecute, strange !!

This is a discussion on ShellExecute, strange !! within the C Programming forums, part of the General Programming Boards category; I dunno why, but today shellexecute works in a strange way.. Code: #include <stdio.h> #include <stdlib.h> #include <windows.h> int main(int ...

  1. #1
    Registered User
    Join Date
    Mar 2004
    Posts
    161

    Thumbs down ShellExecute, strange !!

    I dunno why, but today shellexecute works in a strange way..


    Code:
    #include <stdio.h>
    #include <stdlib.h>
    #include <windows.h>
    
    int main(int argc, char *argv[])
    {
      ShellExecute( NULL, "open", "calc.exe", "", "./", SW_SHOW );
       system("PAUSE");	
      return 0;
    }
    if i execute it, it popups a windows like if i want to save a file...
    have a loot to the atteached file..

    wha'ts going on ?
    Attached Images Attached Images  

  2. #2
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,789
    Maybe it's the directory param that you are passing?

    try ShellExecute( NULL, "open", "calc.exe", "", NULL, SW_SHOW );

  3. #3
    Registered User
    Join Date
    Mar 2004
    Posts
    161
    thanx very much
    what should i write to say to the program : "work in the folder of the exe i've created!!"

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Strange results using dnsapi and windns
    By Niara in forum Networking/Device Communication
    Replies: 3
    Last Post: 08-13-2005, 10:21 AM
  2. ShellExecute() string problem
    By henrikstolpe in forum Windows Programming
    Replies: 2
    Last Post: 05-21-2003, 09:54 AM
  3. bcc32 compiling error (really strange!!)
    By jester in forum C++ Programming
    Replies: 14
    Last Post: 01-26-2002, 03:00 PM
  4. ShellExecute and popups or MessageSending
    By Unregistered in forum Windows Programming
    Replies: 0
    Last Post: 01-03-2002, 08:50 AM

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