| |
|
|
maroro | Hi,
it has time functions. Presumably since one Microsoftupdate not any more. I write XProfan programs The on a Active Directory grab. Since I not self address can I'm going whom detour over Dsquery.exe and Dsget.exe its expenses I over the clipboard into Program fetch. If I a CMD open and the the two programs use does it as always free from problems. If I with XProfan a CMD öffen go the two Files not found and you neither aufgelistet. on the computer of Kollegen the same. both Win8.1 ...Windows 7 without Updates goes it. What is on the CMD The XProfan opens differently? How do I get the again to that walk? |
|
|
| |
|
|
|
ByteAttack | means under Server 2016 functions the?
here time an example with dsquery server without Clipboard
$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& = Create("MultiEdit",%hwnd,"",1,10,500,400)
Var Button& = Create("Button",%hwnd,"Start",540,10,80,24)
Var Button1& = Create("Button",%hwnd,"Ende",540,40,80,24)
Whilenot Ende&
Waitinput
If Clicked(Button1&)
Ende& = 1
ElseIf Clicked(Button&)
' DSQUERY
DirektDosOutputToMultiedit("", "dsquery server",255,Multi&)
Endif
EndWhile
End
Proc DirektDosOutputToMultiedit
Parameters Progname$,Command$,MemBuffer&,Multiedit&
Declare hRPipe&,hWPipe&,pRBytes&,Result&
Declare PI#,SI#,SA#
Dim PI#,PROCESS_INFORMATION
Dim SI#,STARTUPINFO
Dim SA#,SECURITY_ATTRIBUTES
Declare StringBuffer$
StringBuffer$ = Space$(MemBuffer&)
SA#.nLength& =SizeOf(SA#)
SA#.bInheritHandle& = 1
SA#.lpSecurityDescriptor& = 0
Result& = ~CreatePipe(Addr(hRPipe&), Addr(hWPipe&), SA#, 0)
If Result& = 0
MessageBox("Pipe couldn't launched 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#)
Else
Result& = ~CreateProcess(Addr(Progname$), Addr(Command$),SA#,SA#,1,&NORMAL_PRIORITY_CLASS, 0, 0,SI#,PI#)
Endif
If Result& <> 1
MessageBox("Datei not gefunden","",0)
End
Else
Endif
Result& = ~CloseHandle(hWPipe&)
Var out$ = ""
While 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&)
Dispose PI#,SI#,SA#
ENDPROC
|
|
|
| |
|
|
|
ByteAttack | ought to the neither functions, Try still simply time over a Batch File:
example: dsquery.cmd
example XProfan-Source
|
|
|
| |
|
|
|
maroro | thank you very much for Input. I need too yet dsget ...wants only reading nothing Change. on Server 2012 functions it with aktuellsten Updatestand. Win7 currently have I do not tested. Win 8.1 To ca. to one half-way year. Win10 I will tommorrow testing. Server 2016 standing I do not available. Batch files on itself functions...but not if I tappt im dunkeln of X Profan from aufrufe.that is the two command functions not the remainder already.
XProfan is the Version 13
The evasion the Clipboard resolve the trouble unfortunately not. The dsquery.cmd functions too of hand launched over shellexec goes not. |
|
|
| |
|
|
|
Michael W. | The most beautiful puzzel are always The without a Beispielcode.
is there evtl. only the incorrect directory addressed been?
I have unfortunately none Server to hand. and without one Source-Schnippselchen is there nothing To make.
If the both Files not way stand, then helps a direct Pfadangabe.
and Zwischendateien writes one too possible not in that Hauptverzeichnis. |
|
|
| |
|
|
|
ByteAttack | Michael W. (18.10.2017)
and Zwischendateien writes one too possible not in that Hauptverzeichnis.
was indeed only as example
means the two Files lying at Server Standardgemäß in C:\windows\SysWOW64 |
|
|
| |
|
|
|
maroro | means under Win10 functions it neither. It's all right not circa Errors in the code it's about The CMD.EXE if I tappt im dunkeln by "Hand" aufrufe functions everything if I tappt im dunkeln from XProfan aufrufe functions DSQUERY and DSGET not, everything else How DIR zb. functions. i'm means not To stupid a CMD of XProfan from aufzurufen tappt im dunkeln behave itself thereafter only differently. you shows The DSQUERY.EXE not on The DSQUERY.DLL already. if I CMD of "Hand" aufrufe shows DIR both Files on. In both Make becomes The CMD in the Context of my User carryed out(at least becomes me the so displayed). too one perform as Administrator changes nothing.
DSQUERY and DSGET are Bestandteile of Remote Server Administrations Tool (RSAT) ...the must installs his.
Source: winExec(getEnv$("COMSPEC")+" /k chcp 850 && dsget..... or ShellExec("dsquery.exe","open",0)
by me lying The Files in the C:windows\system32 and the lying in the Path. too direktes target via C:\windows\system32\dsquery.exe not working from XProfan. |
|
|
| |
|
|
|
ByteAttack | so! too time examined! with WinExec can the File not directly Call though The really there's (tested with Win10)
have Testweise a cmd-File made, and there functions it with ShellExec.... means unfortunately well over the detour with of/ one CMD make... lying evtl on whom user/Computerrichtlinien...
|
|
|
| |
|
|
|
Michael W. | there has ByteAttack time again right. from TechNet
Dsquery
latest updating: december 2007
concerns: 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 on elevated command speedy. To open on elevated command speedy, click Start, right-click Command speedy, and then click Run as administrator.
|
|
|
| |
|
|