piffy

Esempio ShellExecute

Aug 30th, 2014 (edited)
460
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.57 KB | None | 0 0
  1. #include <windows.h>
  2. #include <tchar.h>
  3. #include <iostream>
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.  ShellExecute( NULL, "open", "calc.exe", NULL, NULL, SW_SHOWNORMAL );
  9.  //Esecuzione semplice di un programma
  10.  ShellExecute( NULL, "open", "c:\\temp\\Installazione.pdf",NULL, NULL, SW_SHOWNORMAL);
  11.  //Esecuzione del programma associato ad un file
  12.  ShellExecute( NULL, "open","C:\\Program Files\\7-Zip\\7z.exe","e c:\\temp\\Archivio.zip -oC:\\temp",
  13.     NULL, SW_SHOWNORMAL);
  14.  //Estrazione di un archivio compresso, passando gli opportuni parametri a 7-zip.
  15.     return 0;
  16. }
Add Comment
Please, Sign In to add comment