Jump to content

Recommended Posts

Posted (edited)

I have a batch file I converted to an EXE, which does exactly what I want it to.

 

HOWEVER... It's ALWAYS flagged as a virus. [Win32:Trojan-Gen]

 

It's a self-extracting exe, which "installs" a batch file. The idea behind it is that I can add the exe to steam as a non-steam game and it'll load an emulator with the right game and the right custom settings.

 

All I have in the batch file is:

 

cd "[emulator folder path]"

start "" "[emulator EXE]" "[game path]" --cfg=[game config] --nogui

::EOF

 

I've reported it as a false positive, but I have a few I'm going to make. At the moment I just have the entire folder where I'm keeping them whitelisted, is there anything I could do to stop them being flagged other than this?

Edited by X-13
forgot to add in the config switch...
Posted
Make the code run from the exe directly, without extracting a bat file?

 

Or is there a reason you want it extracting?

 

Steve

 

I wouldn't really know where to start just making an exe...

 

Plus, I can still edit the .bat if I need to.

Posted (edited)
I wouldn't really know where to start just making an exe...

It's very easy with PowerShell...

 

Add-Type -OutputType WindowsApplication -OutputAssembly "$Env:UserProfile\Desktop\[color="#4B0082"]Play.exe[/color]" @"

using System.Diagnostics;

class Program
{
   static void Main()
   {
    Process.Start("[color="#FF0000"]calc.exe[/color]", "--cfg=game.cfg --nogui");
   }
}
"@

 

Copy-and-paste the code above into the script pane in the PowerShell ISE, change calc.exe to the name of the application you want to run, press F5 and then copy the EXE PowerShell generates on your desktop to the same folder as the game emulator executable. Job done!

 

Edit. I've just tried it and my anti-virus doesn't complain. :)

Edited by Arthur
  • Thanks 1
Posted
Edit. I've just tried it and my anti-virus doesn't complain. :)

 

What AV are you using?

 

I may have to give this a test tonight.

 

It has to run from the emulator folder [hence the cd [emulator folder path] in my version] otherwise my 1337 hax don't get recognised... [The hacks are for widescreen, it looks so good.]

Posted
What AV are you using?

Both ESET NOD32 v6.0 and Windows Defender (in Windows 8) didn't detect the EXE as a virus or trojan.

 

If you want to add the full path to the emulator, you could try this...

 

Add-Type -OutputType WindowsApplication -OutputAssembly "$Env:UserProfile\Desktop\Play.exe" @"

using System.Diagnostics;

class Program
{
   static void Main()
   {
    Process.Start(@"C:\Games\Emulator.exe", "--cfg=game.cfg --nogui");
   }
}
"@

  • Thanks 1

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