maxrealqnx Posted December 11, 2010 Share Posted December 11, 2010 Hi my friends As you know, Delphi only supports 32-bit. So I love Autoit because it is supports 64-bit. How can we convert this codes to Autoit. I thank you in advance for your answers.Best regards program ReBootTrace; uses Windows, madCodeHook; begin InjectLibrary(ALL_SESSIONS or SYSTEM_PROCESSES,'ReBoot.dll'); end.expandcollapse popuplibrary ReBoot; uses Windows, madCodeHook, madRemote; var ExitWindowsExNext : function(uFlags: UINT; dwReserved: DWORD): BOOL; stdcall; const SHUTDOWN_FORCE = EWX_SHUTDOWN or EWX_FORCE; POWEROFF_FORCE = EWX_POWEROFF or EWX_FORCE; function ExitWindowsExCallback(uFlags: UINT; dwReserved: DWORD): BOOL; stdcall; begin case uFlags of EWX_POWEROFF,EWX_SHUTDOWN, SHUTDOWN_FORCE, POWEROFF_FORCE, EWX_POWEROFF or EWX_SHUTDOWN : WinExec('wpeutil.exe shutdown',SW_HIDE); else WinExec('wpeutil.exe reboot',SW_HIDE); end; result:=ExitWindowsExNext(uFlags,dwReserved); end; Procedure DLLMain(Code: integer); begin case Code of DLL_PROCESS_ATTACH: begin CollectHooks(); HookAPI('User32.dll', 'ExitWindowsEx', @ExitWindowsExCallback, @ExitWindowsExNext); FlushHooks(); end; end; end; begin DLLProc := @DLLMain; DLLMain(DLL_PROCESS_ATTACH); end. Visit My Website Link to comment Share on other sites More sharing options...
trancexx Posted December 11, 2010 Share Posted December 11, 2010 You posted something with value of nothing. Unfortunately you don't see that. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
maxrealqnx Posted December 11, 2010 Author Share Posted December 11, 2010 (edited) You posted something with value of nothing. Unfortunately you don't see that.Hi trancexx I'm script developer on the boot-land.net. This program is very important for us. Because Shut down button isn't working on the Win7PE. This program allows to fulfill this Windows 7 Shut down button function. But there isn't a 64-bit versions of this program. Because Delphi does not support the 64-bit.http://img59.imageshack.us/img59/9061/windowsvistape201012112.jpghttp://maxrealqnx.winbuilder.net/Temp/RebootTrace.7zBest regards Edited December 11, 2010 by maxrealqnx Visit My Website Link to comment Share on other sites More sharing options...
KaFu Posted December 11, 2010 Share Posted December 11, 2010 Maybe the Shutdown() function is good enough? OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
iamtheky Posted December 11, 2010 Share Posted December 11, 2010 maybe just run 'wpeutil shutdown' ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
maxrealqnx Posted December 11, 2010 Author Share Posted December 11, 2010 Maybe the Shutdown() function is good enough?Hi KaFu Yes, you told correct but how will we make Windows 7 accept this code ? Best regards Visit My Website Link to comment Share on other sites More sharing options...
maxrealqnx Posted December 11, 2010 Author Share Posted December 11, 2010 (edited) JFX please help me because I can not explain my problem http://www.911cd.net/forums//index.php?showtopic=23931&st=180&start=180 Edited December 11, 2010 by maxrealqnx Visit My Website Link to comment Share on other sites More sharing options...
iamtheky Posted December 11, 2010 Share Posted December 11, 2010 im just guessing but without the 64bit stuff that one command would shutdown from the PE environment. #AutoIt3Wrapper_UseX64=Y run ('wpeutil shutdown') Exit ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
maxrealqnx Posted December 11, 2010 Author Share Posted December 11, 2010 im just guessing but without the 64bit stuff that one command would shutdown from the PE environment. #AutoIt3Wrapper_UseX64=Y run ('wpeutil shutdown') Exit Hi iamtheky I know this already. I want to activate the Windows 7 Shutdown button. I want to activate the shutdown button with API hook. http://en.wikipedia.org/wiki/Hooking Best regards Visit My Website Link to comment Share on other sites More sharing options...
iamtheky Posted December 11, 2010 Share Posted December 11, 2010 Yeah just saw the link, didnt realize this was a hella customized version. At least the question is getting more specific. ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
maxrealqnx Posted December 11, 2010 Author Share Posted December 11, 2010 Yeah just saw the link, didnt realize this was a hella customized version. At least the question is getting more specific.Hi iamtheky Can we do a similar program with AutoIt ? Visit My Website Link to comment Share on other sites More sharing options...
JFX Posted December 12, 2010 Share Posted December 12, 2010 JFX please help me because I can not explain my problem Well, your using a custom WinPE 3.0 x64 with the default explorer shell from windows. Shutdown button doesn't work. Also watching for WM_ENDSESSION doesn't work. You can use wpeutil from cmd prompt or even make a shutdown shortcut on desktop, but you don't like this.(?) AEK from rutracker forum has make the nice tools reboot.dll and reboottrace.exe. The exe inject the dll in all open process, which wait's for ExitWindowsEx and does run the wpeutil command for you. Your sad as nobody makes x64 version? My suggestion: hide the shutdown button and claim that it never exist in the first place. ControlHide('[CLASS:DV2ControlHost]', '', 'Button2') Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now