The NEW Build Your Own Arcade Controls
Front End Support => MaLa Frontend => Topic started by: retrometro on August 24, 2008, 12:07:07 pm
-
I have MALA v1.05 and have set the action for exiting MALA to shutdown the system. It worked fine on XP x86 and Vista x86.
So I then told MALA to run a script on exit that just calls shutdown.exe (also tried psshutdown.exe) but no luck. the batch file shuts the box down when ran from the command line but not when called from MALA. :dunno
Can anyone else duplicate this on XP x64 (recently patched to the brim from MS).
thanks!
-
I have the same issue.
I solved this by uninstalling the fatfingers plugin.
Ultimarc does not have a u360 x64 driver i guess (cannot find anything about it anyway)
-
What's the fatfingers plug-in?
Also, how come mala's not able to call a .cmd batch that runs shutdown.exe properly when it runs fine called from anywhere else?
-
What's the fatfingers plug-in?
Also, how come mala's not able to call a .cmd batch that runs shutdown.exe properly when it runs fine called from anywhere else?
What method are you using to call this shutdown.exe?
On the MaLa exit tab there are two choices I can see:
1) Use alternative shutdown method (shutdown.exe)
2) Run application on exit (the specify shutdown.exe)
-
What method are you using to call this shutdown.exe?
On the MaLa exit tab there are two choices I can see:
1) Use alternative shutdown method (shutdown.exe)
2) Run application on exit (the specify shutdown.exe)
I've tried both. When I have #1 mala try to shutdown, it prompts me if i want to shutdown, and when I confirm, it just spits me back to windows.
When I have it run an app, I have it run a shutdown.cmd file which calls shutdown.exe with a force and shutdown with 1 seconds and the result is the same.
I've tried the 32bit and 64bit versions of shutdown.exe. I've even tried power tool's psshutdown.exe but no go. Strange as before on my winxp 32bit install, all went fine. but now no go in xp 64bit. The variation of scripts and shutdown commands all work when called directly from the shell or explorer. but not from mala.
-
Well I can't suggest you didn't try everything ;)
Not sure what I can do as I don't have a 64 bit OS. :dunno
I am just acquiring Vista 32 bit at this point to test MaLa on it soon. :P
-
I wasn't too surprised that however mala was shutting down didn't work. I was however surprised that the same cmd that works outside of mala doesn't work within.
How does mala launch external apps?
I suppose one alternative is to have a script to launches mala and then after mala exits, do a pause and then exit from there.
-
I wasn't too surprised that however mala was shutting down didn't work. I was however surprised that the same cmd that works outside of mala doesn't work within.
How does mala launch external apps?
Scratch your head no longer (for one of the options anyway)
I just had a look at the function in MaLa, and it only seems to cater for 32 bit.
if Win32Platform = VER_PLATFORM_WIN32_NT then
begin
tpResult := OpenProcessToken(GetCurrentProcess(),
TOKEN_ADJUST_PRIVILEGES or TOKEN_QUERY,
TTokenHd) ;
if tpResult then
begin
tpResult := LookupPrivilegeValue(nil,
SE_SHUTDOWN_NAME,
TTokenPvg.Privileges[0].Luid) ;
TTokenPvg.PrivilegeCount := 1;
TTokenPvg.Privileges[0].Attributes := SE_PRIVILEGE_ENABLED;
cbtpPrevious := SizeOf(rTTokenPvg) ;
pcbtpPreviousRequired := 0;
if tpResult then
Windows.AdjustTokenPrivileges(TTokenHd,
False,
TTokenPvg,
cbtpPrevious,
rTTokenPvg,
pcbtpPreviousRequired) ;
end;
So I guess it needs some 64 code.
If anyone has any please pass it on otherwise I will search for it myself eventually ;)
-
wow awesome. thanks for looking. i guess that explains the problem exactly.
So since a lot of the APIs have the same name whether it's 32bit or 64bit, what would happen if you just got rid of the "check for 32bit version" part out of the code?
[edit]
Wait... that explains why mala doesn't shut down the machine properly. But why does it seem to break a script that calls shutdown?
-
Wait... that explains why mala doesn't shut down the machine properly. But why does it seem to break a script that calls shutdown?
Yes hence I said it solves 'for one of the options'
A Mystery :dunno