Saludos
Cuando instalo mi sistema en OS Windows 8, al arrancar generar error GPF y sale del sistema
Debo otorgarle permiso , accedo a explorador, Mi PC, Propiedades, configuracion avanzada del sistema, rendimiento, prevencion de ejecucion de datos "DEP", boton Agregar, debo indicar la ruta y nombre del programa.
Necesito una manera directa de asignar este permiso y evitarle al usuario realizar demasiados pasos.
Harbour Error GPF., permiso para ejecutar binario
- jnavas
- Posts: 482
- Joined: Wed Nov 16, 2005 12:03 pm
- Location: Caracas - Venezuela
- Been thanked: 2 times
- Contact:
Re: Harbour Error GPF., permiso para ejecutar binario
Saludos a todos
Encontré esta funcionalidad, voy a probarla
http://freyes.svetlian.com/RunAs/RunAs.htm
runas /user:pippin /savecred miaplicacion.exe
Encontré esta funcionalidad, voy a probarla
http://freyes.svetlian.com/RunAs/RunAs.htm
runas /user:pippin /savecred miaplicacion.exe
- Antonio Linares
- Site Admin
- Posts: 42513
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 31 times
- Been thanked: 73 times
- Contact:
Re: Harbour Error GPF., permiso para ejecutar binario
http://www.source-code.biz/snippets/c/1.htm
la función del API de Windows que proporciona esta funcionalidad es: CreateProcessWithLogonW()
https://docs.microsoft.com/en-us/windows/desktop/api/winbase/nf-winbase-createprocesswithlogonw
la función del API de Windows que proporciona esta funcionalidad es: CreateProcessWithLogonW()
https://docs.microsoft.com/en-us/windows/desktop/api/winbase/nf-winbase-createprocesswithlogonw
Code: Select all | Expand
// miniRunAs - A minimalist "run as" for Windows (a runas.exe alternative)
//
// Home page: www.source-code.biz/snippets/c/1.htm
// License: GNU/LGPL (www.gnu.org/licenses/lgpl.html)
// Copyright 2008 Christian d'Heureuse, Inventec Informatik AG, Switzerland.
// This software is provided "as is" without warranty of any kind.
//
// Version history:
// 2008-03-09 Christian d'Heureuse (chdh@inventec.ch)
// Module created.
// 2011-07-05 Christian d'Heureuse (chdh@inventec.ch)
// lpDomain parameter of CreateProcessWithLogonW changed from L"." to NULL.
#define UNICODE
#define _WIN32_WINNT 0x0500 // Win2K and later
#include <stdio.h>
#include <Windows.h>
static const char* programVersion = "2008-03-09";
static wchar_t user[64];
static wchar_t password[64];
static wchar_t commandLine[1024];
static void displayHelp() {
printf ("\n");
printf ("miniRunAs - A minimalist \"run as\"\n");
printf ("\n");
printf ("Usage: miniRunAs <user> <password> <commandline>\n");
printf ("Example: miniRunAs administrator sesame ping localhost\n");
printf ("Author: Christian d'Heureuse, www.source-code.biz, chdh@inventec.ch\n");
printf ("License: GNU/LGPL (www.gnu.org/licenses/lgpl.html)\n");
printf ("Version: %s\n", programVersion); }
static void displayWin32ApiError (const char* routineName) {
DWORD errorCode = GetLastError();
wchar_t* msg = NULL;
int i = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_IGNORE_INSERTS,
NULL, errorCode, 0, (LPWSTR)&msg, 0, NULL);
if (i == 0) {
fprintf (stderr, "FormatMessage failed for error code %i.\n", errorCode); return; }
fwprintf (stderr, L"Error code %i returned from %S.\n%s\n", errorCode, routineName, msg);
LocalFree (msg); }
static const wchar_t* skipBlanks (const wchar_t* s) {
while (*s == L' ') s++;
return s; }
static const wchar_t* skipNonBlanks (const wchar_t* s) {
while (*s != 0 && *s != L' ') s++;
return s; }
static const wchar_t* skipPastChar (const wchar_t* s, wchar_t c) {
while (*s != 0) {
if (*s == c) {s++; break; }
s++; }
return s; }
static const wchar_t* parseNextWord (const wchar_t* s, wchar_t* wBuf, int wBufSize) {
const wchar_t* s1 = skipBlanks(s);
const wchar_t* s2 = skipNonBlanks(s1);
wcsncpy_s (wBuf, wBufSize, s1, s2-s1);
return s2; }
static bool parseCommandLineParms() {
const wchar_t* s = GetCommandLine();
s = skipBlanks(s);
if (*s == L'"')
s = skipPastChar(s+1, L'"'); // if the commandline starts with a quote, we have to skip past the next quote
else
s = skipNonBlanks(s); // otherwise the program path does not contain blanks and we skip to the next blank
s = skipBlanks(s);
if (*s == 0) { // no command-line parameters
displayHelp();
return false; }
s = parseNextWord(s, user, sizeof(user)/2);
s = parseNextWord(s, password, sizeof(password)/2);
s = skipBlanks(s);
wcscpy_s (commandLine, s);
if (commandLine[0] == 0) {
fprintf (stderr, "Missing command-line arguments.\n");
return false; }
return true; }
int main() {
if (!parseCommandLineParms()) return 9;
STARTUPINFOW si;
memset (&si, 0, sizeof(si));
si.cb = sizeof(si);
PROCESS_INFORMATION pi;
BOOL ok = CreateProcessWithLogonW (
user,
NULL, // change to L"." to use local account database only
password,
LOGON_WITH_PROFILE,
NULL,
commandLine,
0,
NULL,
NULL,
&si,
&pi);
if (ok == 0) {
displayWin32ApiError ("CreateProcessWithLogonW");
return 9; }
return 0; }
- jnavas
- Posts: 482
- Joined: Wed Nov 16, 2005 12:03 pm
- Location: Caracas - Venezuela
- Been thanked: 2 times
- Contact:
Re: Harbour Error GPF., permiso para ejecutar binario
Antonio
Saludos y Gracias,
Utilicé el comando
runas /user:administrator /savecred dpnmwin.exe
y aun persiste la incidencia, buscaré en el registro de windows lugar donde se almacena los binarios permisados.
Saludos y Gracias,
Utilicé el comando
runas /user:administrator /savecred dpnmwin.exe
y aun persiste la incidencia, buscaré en el registro de windows lugar donde se almacena los binarios permisados.
- karinha
- Posts: 7932
- Joined: Tue Dec 20, 2005 7:36 pm
- Location: São Paulo - Brasil
- Been thanked: 3 times
- Contact:
Re: Harbour Error GPF., permiso para ejecutar binario
Holá, en www.fivewin.com.br haga una busqueda por "Runas", ejemplo:
http://fivewin.com.br/index.php?/topic/24819-janela-dos-no-windows-10/#comment-275427
Saludos.
http://fivewin.com.br/index.php?/topic/24819-janela-dos-no-windows-10/#comment-275427
Saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
- jnavas
- Posts: 482
- Joined: Wed Nov 16, 2005 12:03 pm
- Location: Caracas - Venezuela
- Been thanked: 2 times
- Contact:
Re: Harbour Error GPF., permiso para ejecutar binario
Saludos y Gracias
El comando RUNAS.EXE no resuelve el permiso del binario.
Aun sigue generando el error GPF
El comando RUNAS.EXE no resuelve el permiso del binario.
Aun sigue generando el error GPF
Re: Harbour Error GPF., permiso para ejecutar binario
Hola Juan,
quizás esto te pueda ayudar
https://docs.microsoft.com/en-us/windows/desktop/memory/data-execution-prevention
como añadir tu aplicación a la lista de excepción
https://www.gfi.com/support/products/How-to-make-Data-Execution-Prevention-DEP-exceptions
Saludos
quizás esto te pueda ayudar
https://docs.microsoft.com/en-us/windows/desktop/memory/data-execution-prevention
como añadir tu aplicación a la lista de excepción
https://www.gfi.com/support/products/How-to-make-Data-Execution-Prevention-DEP-exceptions
Saludos