Jump to content

Recommended Posts

Posted (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 by darknezz21
Posted

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..

Posted

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
Posted (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 by Hawkysoft
Posted

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.

Posted (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 by darknezz21

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...