October 29, 2025, 03:58:59 PM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


How to make my Ebasic-created Exe's pass Vista 64-bit signature

Started by plurald, February 15, 2011, 05:11:08 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

plurald

When I compile an Ebasic program and execute it, my Windows Vista Home Premium 64-bit operating system complains with a pop-up that the "publisher could not be verified".  This is because there's no digital signature.  Is there a way to satisfy Vista so it won't complain when I do this?

Or am I out-of-luck because it's 64-bit??

Thanks.

LarryMc

LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

DennisL

 :-\ Ummm...I don't think that's what he was looking for....

I know that I had a similar problem with exe's created in FreeBASIC as well, and after a lot of searching, found that this could be addressed by adding a VS_VERSION_INFO resource as well as a manifest file as a resource to the exe in the build stage.
I have used notepad to look at other exe's made by others that look like they have done the same thing or something very similar anyway; something like the following:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
      <requestedPrivileges>
        <requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
      </requestedPrivileges>
    </security>
  </trustInfo>
</assembly>

I have also noticed that they all seem to have the following extra straight after:

PAPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPADDINGPADDINGXXPAD

but do not know what this is for, or how this is embedded (if it is required to be at all).  ???

anyway, have a read of this: http://msdn.microsoft.com/en-us/library/aa375632%28v=VS.85%29.aspx
as it should have all the information required - though not sure what the minimum amount actually is... :-\

LarryMc

All my offerings have only the manifest file as is the case of EBasic.exe and iwbasic.exe.  You're the first one that I can remember ever bringing up the lack of a digital signature (which to me, are expensive).

My offerings use the exact same manifest file as used by eb/iwb (except for the name of course).

LarryMc
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

plurald

Thanks Dennis and Larry,

Having not dealt with a VS_VERSION_INFO resource or a manifest file as mentioned by Dennis, are they included in my source code? Created as separate file(s)?  Referenced in the compile of my program?
I would appreciate a quick step-by-step of how to create and use these.

Thanks again.

p.s. My reference to a digital signature came from the "Open File - Security Warning" pop-up after compiling which mentioned at the bottom about lack of a valid digital signature.

DennisL

Hi plurald,
As I mentioned before, I haven't had any experience with doing this with EB or IWB, but taking what Larry has said into account, I believe the simplest means to overcome the security pop-up you mentioned would be to just include a custom manifest file along with your exe, so that if your app is called "myprogram.exe", then have a manifest file called "myprogram.exe.manifest" located in the same folder as your app.  Also taking into account of what Larry has said, and what I've been able to find myself, I have attached a template manifest file for you to use to see if this resolves your issue.
(this seems to be the most common contents that I've been able to find used by other apps from numerous sources).
If it still doesn't work, then try replacing the contents with the sample I posted previously; or better still, you may want to merge the contents of both into one manifest file...
Anyway, try it out, and let us know how you go.

note1: don't forget to edit the manifest file I've attached to reflect your app (i.e. version number and program name, etc.).
note2: this forum doesn't allow the upload of .manifest files, so I've had to rname it to .txt - you will have to rename this back.

ckoehn

You can also include your manifest as a resource.  This is from sapero.

QuoteOptionally you could embed the manifest file as a resource in your program. Set resource type to 24, resource id to 1.

Later,
Clint

DennisL

Hi Clint, I remember seeing this before but forgot all about it  ;D
Have you actually successfully done this yourself?  If so, could you possible expand on how this is achieved?
i.e. Can it be done from EB directly using the resource tool available from the IDE, or do you need to use a 3rd party resource editor?
Thanks for the reminder.  :)

plurald

DennisL,

I downloaded your Manifest file, changed the name of the program inside to TestB and renamed the file to TestB.exe.manifest
Then I copied it to the Ebasic Include directory.
Next I added the following line at the beginning of my program:  $INCLUDE "TestB.exe.manifest"

Tried to compile and got these complaints:

Compiling...
Testb.eba
File: TestB.exe.manifest (1) syntax error - <
File: TestB.exe.manifest (1) invalid character '0x3f'
- ?
File: TestB.exe.manifest (1) invalid character '0x3f'
- ?
File: TestB.exe.manifest (2) syntax error - <
File: TestB.exe.manifest (3) syntax error - <
File: TestB.exe.manifest (4) syntax error - =
File: TestB.exe.manifest (8) syntax error - /
  etc. etc. etc.

Do you know what I'm doing wrong?

Also, I looked in EBasic Help for using the RESOURCE method described by

Thanks.

LarryMc

QuoteI downloaded your Manifest file, changed the name of the program inside to TestB and renamed the file to TestB.exe.manifest
so far, so good

QuoteThen I copied it to the Ebasic Include directory.
wrong; it goes in the same directory as TestB.exe
If you had done this you would have been through with this step 2.

QuoteNext I added the following line at the beginning of my program:  $INCLUDE "TestB.exe.manifest"
Just out of curiosity. Did you see anything inside that file that looked even a little like Basic code?
You did all you need to do in the 1st 2 steps.  No $includes!!!

LarryMc
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

ckoehn

DennisL,

Yes, I did it from the resource tools available in the IDE.

Later,
Clint

plurald

Success!! 

Larry, here's the code from the manifest file:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
   <assemblyIdentity
      type="win32"
      processorArchitecture="*"
      version="1.0.0.0"
      name="TestB"
   />
   <description>XP styles</description>
   <dependency>
      <dependentAssembly>
         <assemblyIdentity
            type="win32"
            name="Microsoft.Windows.Common-Controls"
            version="6.0.0.0"
            language="*"
            processorArchitecture="*"
            publicKeyToken="6595b64144ccf1df"
         />
      </dependentAssembly>
   </dependency>
</assembly>

DennisL

@Clint
Thanks,  just wanted to confirm.

@plurald
Looks like you didn't read my post/instructions well enough the first time :)
From your last message, it sounds like this has worked and you are not getting the security pop-up anymore right?
Also, I'm sure Larry knew what was in the manifest file; he wasn't asking you to show him... :P
It was a little bit of sarcasm on his part I believe.  ::)

LarryMc

QuoteAlso, I'm sure Larry knew what was in the manifest file; he wasn't asking you to show him...
It was a little bit of sarcasm on his part I believe. 
I confess. It was and I apologize for it.

LarryMc
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library