darknezz21 Posted December 23, 2013 Share Posted December 23, 2013 (edited) Got a box running windows 7 64 and using shellexecute() to launch a batch file, but this computer gives me an error. A screen comes up telling "this is not a valid win32 application." User account control settings are already turned off, what else could it be. As per the topic it runs fine on other systems running windows 8 and 7. Anyone got any ideas? edit: tried to compile into an x86 and x64 exe and neither worked. This worked on a 7 x32 install and another 8 x64 one, is it an issue with 7 x64? Edited December 23, 2013 by darknezz21 Link to comment Share on other sites More sharing options...
Hawkysoft Posted December 23, 2013 Share Posted December 23, 2013 Got a box running windows 7 64 and using shellexecute() to launch a batch file, but this computer gives me an error. A screen comes up telling "this is not a valid win32 application." User account control settings are already turned off, what else could it be. As per the topic it runs fine on other systems running windows 8 and 7. Anyone got any ideas? edit: tried to compile into an x86 and x64 exe and neither worked. This worked on a 7 x32 install and another 8 x64 one, is it an issue with 7 x64? First of all your talking about a batch file.. so this would be the wrong section for you I assume? Second we dont know if theres something wrong when we dont see something to test.. Link to comment Share on other sites More sharing options...
darknezz21 Posted December 23, 2013 Author Share Posted December 23, 2013 I'm trying to open the batch via an autoit scrypt, so this should be the place. Here's my code if you were curious.. #include <Inet.au3> Opt("WinTitleMatchMode", 1) Opt("WinTextMatchMode", 2) $restart = 0 While 1 $restart =+ 1 $Running = WinExists("Administrator: cg") If $Running = 1 Then Sleep(10) ElseIf $Running = 0 Then Sleep(2000) ShellExecute("test123.bat", "", "C:\Users\jimmy\Desktop\cgminer-3.7.2-windows\", "OPEN") ElseIf $Restart = 120 Then ControlSend("Administrator: cg", "", "", "q") Sleep(8000) ShellExecute("test123.bat", "", "C:\Users\jimmy\Desktop\cgminer-3.7.2-windows\", "OPEN") $Restart = 0 EndIf Sleep(60000) WEnd Link to comment Share on other sites More sharing options...
Hawkysoft Posted December 23, 2013 Share Posted December 23, 2013 (edited) @darknezz21, will test later for you if no input from others, @work atm p.s. it couldnt be it that the controlsend is messing up? p.s. try to compile it as a x64 version as well... might be the problem Edited December 23, 2013 by Hawkysoft Link to comment Share on other sites More sharing options...
darknezz21 Posted December 23, 2013 Author Share Posted December 23, 2013 I appreciate that Hawksoft. Already tried a x86 and x64 compile, same thing happens. The controlsend part is working ok. Link to comment Share on other sites More sharing options...
spudw2k Posted December 23, 2013 Share Posted December 23, 2013 That is a strange one, but still not a lot of info to go on. Perhaps try a diffent batch file to test with @echo off echo "Tada" pause Also, the operator you are using to increment $restart is malformed. It should be += not =+ shouldn't be related to the win32 error, just an observation I made. Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX BuilderMisc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retreive SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose ArrayProjects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalcCool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
darknezz21 Posted December 23, 2013 Author Share Posted December 23, 2013 (edited) Hi Spud, thanks for the suggestion. Same thing happens with the batch you provided saved as a new file. Also, can you elaborate on your logic with the operator suggestion? I'm new to writing and maybe an example could help me better understand what you see. Edit: It was a file permissions thing. Unzipped a new folder and created a new au3 and bat and copied my code from the old ones and all is well. I still would like to know about that operator thing Spud if you would? Edit2: Looked at the help file and my operator isn't even listed. No explanation necessary, cheers:) Edited December 23, 2013 by darknezz21 Link to comment Share on other sites More sharing options...
spudw2k Posted December 24, 2013 Share Posted December 24, 2013 Glad you got it all sorted out. Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX BuilderMisc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retreive SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose ArrayProjects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalcCool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF 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