Español
Foro

Winexec /CMD Problema

 

maroro
¡Hola,

lo ha veces funktioniert. Vermutlich seit una Microsoftupdate no mehr.
Yo escribir Xprofan Programas el en una Active Directory zugreifen. Desde que el no incluso ansprechen kann gehe Yo, el Umweg encima Dsquery.exe y Dsget.exe deren Ausgaben Yo encima
el Zwischenablage en el Programa hole. Wenn Yo una CMD öffne y el el beiden Programas benutze va el después de como antes problemlos. Wenn I, con XProfan una CMD öffen voluntad el beiden Archivos No se ha encontrado y dir auch no aufgelistet. Auf el Rechner vom Kollegen el gleiche. Beide Win8.1 ...en Windows 7 sin Updates es.
Was es a el CMD el XProfan öffnet anders? Como bekomme Yo el otra vez para laufen?
 
17.10.2017  
 




ByteAttack
Also bajo Server 2016 funktioniert el?

Hier veces una Ejemplo con dsquery server sin Zwischenablage
 $H Windows.ph
 $H Structs.ph
Struct PROCESS_INFORMATION = ~PROCESS_INFORMATION
Struct SECURITY_ATTRIBUTES = ~SECURITY_ATTRIBUTES
Struct STARTUPINFO = ~STARTUPINFO
DEF &NORMAL_PRIORITY_CLASS  $20
DEF &STARTF_USESTDHANDLES  $100
DEF &STARTF_USESHOWWINDOW  $1
CLS ~GetSysColor(~COLOR_BTNFACE)
SetDialogFont ~GetStockObject(~ANSI_VAR_FONT)
Var Ende& = 0
Var Multi& = Crear("MultiEdit",%hwnd,"",1,10,500,400)
Var Button& = Crear("Button",%hwnd,"Start",540,10,80,24)
Var Button1& = Crear("Button",%hwnd,"Ende",540,40,80,24)

Sinestar encargado Ende&

    Waitinput

    If Clicked(Button1&)

        Ende& = 1

    ElseIf Clicked(Button&)

        ' DSQUERY
        DirektDosOutputToMultiedit("", "dsquery server",255,Multi&)

    Endif

EndWhile

End

Proc DirektDosOutputToMultiedit

    Parámetros Progname$,Command$,MemBuffer&,Multiedit&
    Declarar hRPipe&,hWPipe&,pRBytes&,Result&
    Declarar PI#,SI#,SA#
    Dim PI#,PROCESS_INFORMATION
    Dim SI#,STARTUPINFO
    Dim SA#,SECURITY_ATTRIBUTES
    Declarar StringBuffer$
    StringBuffer$ = Espacio$(MemBuffer&)
    SA#.nLength& =SizeOf(SA#)
    SA#.bInheritHandle& = 1
    SA#.lpSecurityDescriptor& = 0
    Result& = ~CreatePipe(Addr(hRPipe&), Addr(hWPipe&), SA#, 0)

    If Result& = 0

        MessageBox("Pipe podría no comenzó werden","",0)
        End

    Endif

    If Progname$ <> ""

        Command$ = " " + Command$

    Endif

    SI#.cb& = SizeOf(SI#)
    SI#.dwFlags& = &STARTF_USESHOWWINDOW | &STARTF_USESTDHANDLES
    SI#.hStdOutput& = hWPipe&
    SI#.hStdError& = hWPipe&

    If Progname$ = ""

        Result& = ~CreateProcess(0, Addr(Command$), SA#, SA#, 1, &NORMAL_PRIORITY_CLASS, 0, 0, SI#,PI#)

    Más

        Result& = ~CreateProcess(Addr(Progname$), Addr(Command$),SA#,SA#,1,&NORMAL_PRIORITY_CLASS, 0, 0,SI#,PI#)

    Endif

    If Result& <> 1

        MessageBox("Datei no gefunden","",0)
        End

    Más

    Endif

    Result& = ~CloseHandle(hWPipe&)
    Var out$ = ""

    Mientras que Result& <> 0

        Result& = ~ReadFile(hRPipe&,Addr(StringBuffer$),MemBuffer&,Addr(pRBytes&), 0)

        If pRBytes& > 0

            Out$ = Left$(StringBuffer$,pRBytes&)
            ~OemToChar(Addr(Out$),Addr(Out$))
            Settext Multiedit&,GetText $(Multiedit&)+Out$

        Endif

    Endwhile

    ~CloseHandle(PI#.hProcess&)
    ~CloseHandle(PI#.hThread&)
    ~CloseHandle(hRPipe&)
    Disponer PI#,SI#,SA#

ENDPROC


 
Website:  [...] 
Facebook:  [...] 
17.10.2017  
 




ByteAttack
Si el auch no trabajo, probiere doch simplemente veces una Batch Expediente:

Ejemplo: dsquery.cmd

Ejemplo XProfan-Source
Declarar Línea$
Ventana 100,100-640,480
ShellExec("C:\dsquery.cmd","open",0)
Imprimir "Warten..."
Sleep 10000
Imprimir "Weiter...."
Asignar #1,"C:\RESULT.TXT"
Reset #1

Sinestar encargado Eof(#1)

    Entrada #1,Línea$
    Imprimir Línea$

EndWhile

Cerrar #1
WaitInput

 
Website:  [...] 
Facebook:  [...] 
17.10.2017  
 




maroro
Vielen dank para el Entrada. Yo brauche auch todavía dsget ...voluntad sólo lesen nichts ändern. en Server 2012 funktioniert lo con aktuellsten Updatestand. Win7 aktuell Yo no getestet. Win 8.1 a ca. antes una halben Jahr. Win10 voluntad Yo morgen testen. Server 2016 es No disponible.
Batchdateien a se trabajo...pero no si yo ellos de X Profano de aufrufe.Das heißt el beiden Befehle trabajo no Rest ya.

XProfan Es el Versión 13

El Umgehung el Zwischenablage löst el problema por desgracia, no.
el dsquery.cmd funktioniert auch vom Hand comenzó encima shellexec es no.
 
17.10.2017  
 




Michael
W.
El schönsten Rätsel siempre el sin una Beispielcode.

Ist como evtl. sólo el falsche Directorio angesprochen worden?

Yo habe desafortunadamente no Server a Hand. Und sin una Quellcode-Schnippselchen es como nichts a hacer.

Wenn el beiden Archivos no en el Pfad posición, entonces hilft una direkte Pfadangabe.

Und Zwischendateien schreibt uno auch möglichst no en el Hauptverzeichnis.
 
Alle Sprachen
System: Windows 8/10, XProfan X4
Programmieren, das spannendste Detektivspiel der Welt.
18.10.2017  
 




ByteAttack
Michael W. (18.10.2017)
Und Zwischendateien schreibt uno auch möglichst no en el Hauptverzeichnis.


War en efecto sólo como Ejemplo

Also el beiden Archivos mentira beim Server Standardgemäß en C:\Windows\SysWOW64
 
Website:  [...] 
Facebook:  [...] 
18.10.2017  
 




maroro
also bajo Win10 funktioniert lo auch no.
lo va no en Fehler en el Code lo va a CMD.EXE
si yo ellos por "Hand" aufrufe funktioniert alles
si yo ellos de XProfan aufrufe funktioniert DSQUERY y DSGET no, alles otro como DIR zb. funktioniert.
Yo bin also no a blöd una CMD de XProfan de aufzurufen
ellos verhält se danach sólo anders. Usted zeigt el DSQUERY.EXE no a el DSQUERY.DLL ya. si yo CMD de "Hand" aufrufe zeigt DIR beide Archivos a. In beiden Fällen se el CMD en el Context meines Benutzers ausgeführt(zumindest se me así adecuado). auch una ausführen como Administrator ändert nichts.

DSQUERY y DSGET son Bestandteile de Remote Server Administrations Tool (RSAT) ...el muss installiert ser.

Quellcode:
winExec(getEnv$("COMSPEC")+" /k chcp 850 && dsget.....
oder ShellExec("dsquery.exe","open",0)

en me mentira el Archivos en el C:Windows\system32 y el liegt
en el Path. Auch direktes Ansprechen via C:\windows\system32\dsquery.exe funktioniert no de Xprofan.
 
19.10.2017  
 




ByteAttack
So! Auch veces geprüft! Mit WinExec läßt el Expediente no direkt aufrufen obwohl el eigentlich como es (getestet con Win10)

Posesiones Testweise una cmd-Expediente gemacht, y como funktioniert lo con ShellExec....
Also desafortunadamente wohl encima el Umweg con uno CMD hacer... Liegt evtl a el Benutzer/Computerrichtlinien...
 
Website:  [...] 
Facebook:  [...] 
19.10.2017  
 




Michael
W.
Como ha ByteAttack veces otra vez bastante.
de TechNet

Dsquery

Letzte Aktualisierung: Dezember 2007

Betrifft: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2008, Windows Server 2008 R2

Queries the directory by using search criteria that you specify. Each of the dsquery commands finds objects of a specific object type, with the exception of dsquery *, which can query for any type of object

Dsquery is a command-line tool that is built into Windows Server 2008. It is available if you have the Active Directory Domain Services (AD DS) server role installed. To use dsquery, you must run the dsquery command from a elevated command prompt. To open a elevated command prompt, click Start, right-click Command Prompt, and then click Run as administrator.
 
Alle Sprachen
System: Windows 8/10, XProfan X4
Programmieren, das spannendste Detektivspiel der Welt.
19.10.2017  
 



Respuesta


Título del Tema, max. 100 Signo.
 

Systemprofile:

Kein Systemprofil creado. [anlegen]

XProfan:

 Contribución  Font  Smilies  ▼ 

Bitte registro en una Contribución a verfassen.
 

Tema opciones

8.340 Views

Untitledvor 0 min.
Member 5044459 vor 8 Tagen
Sven Bader08.01.2025
Uwe Lang29.05.2024
Frank Reibold25.11.2022
Más...

Themeninformationen

Dieses Thema ha 3 subscriber:

ByteAttack (4x)
maroro (3x)
Michael W. (2x)


Admins  |  AGB  |  Applications  |  Autores  |  Chat  |  Política de Privacidad  |  Descargar  |  Entrance  |  Ayuda  |  Merchantportal  |  Pie de imprenta  |  Mart  |  Interfaces  |  SDK  |  Services  |  Juegos  |  Búsqueda  |  Support

Ein Projekt aller XProfan, el lo son!


Mi XProfan
Privado Noticias
Eigenes Ablageforum
Temas-Merkliste
Eigene Beiträge
Eigene Temas
Zwischenablage
Cancelar
 Deutsch English Français Español Italia
Traducciones

Política de Privacidad


Wir uso Cookies sólo como Session-Cookies wegen el technischen Notwendigkeit y en uns hay no Cookies de Drittanbietern.

Wenn du hier en unsere Webseite klickst oder navigierst, stimmst du unserer Erfassung de Informationen en unseren Cookies en XProfan.Net a.

Weitere Informationen a unseren Cookies y dazu, como du el Kontrolle darüber behältst, findest du en unserer nachfolgenden Datenschutzerklärung.


einverstandenDatenschutzerklärung
Yo möchte no Cookie