Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Update für Chat-Programm

Empfohlene Antworten

Veröffentlicht

Hy Leute,

ich möchte für ein kleines chatprogramm eine update-funktion bauen.

Da es nur eine sehr kleine stand-alone exe ist wollte ich das über eine bat-file lösen also dachte ich ich mach es so:



#define _MAX_PATH 50

void update(const userinput * const u)
{
FILE *update_file;
update_file = fopen("update.exe", "rb");

if(update_file != NULL)
{

fclose(update_file);

char modulename[_MAX_PATH] ;
char folder[_MAX_PATH] ;
FILE *bat_file;
bat_file = fopen("up.bat", "w");

GetModuleFileName(NULL, modulename, MAX_PATH) ;
strcpy (folder, modulename) ;
char *pb = strrchr(folder, '\\');
if (pb != NULL)
*pb = 0 ;

fprintf(bat_file, "@echo off\r\n"
":try\r\n"
"del \"%s\"\r\n"
"if exist \"%s\" goto try\r\n"
"move %s\\update.exe %s\r\n"
"del \"up.bat\"\r\n",
modulename, modulename, folder,modulename);

fclose(bat_file);

ShellExecute(NULL, "open", "up.bat", NULL, NULL, SW_HIDE);
}
else
{
printf("Update Datei \"update.exe\" nicht gefunden !\n");
return;
}

exit(1);
}
[/PHP]

Hat aber leider nicht funktioniert.

Die Bat wurde erstellt, aber das wars auch.

Sie hat die alte datei nicht durch die updtae.exe ersetzt.

hat jemand ne Idee wie ich das ans laufen bekomm ?

Thx

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.