Randem Systems Support Board

Visual Basic - Problems and Solutions => Visual Basic 6 => Topic started by: cymeonx on May 20, 2011, 02:24:14 PM

Title: Marking Your Exe For Request To Run As Administrator In Vista
Post by: cymeonx on May 20, 2011, 02:24:14 PM
Thanks for your excellent and precise instructions to run a vb6 exe as administrator. When I follow the instructions I get the following error:
 
Could not initialize installation. CRC does not match.
 
I am not an expert at this and just wonder if there is any help out there.  
 
Many thanks
 
Chris
Title: Marking Your Exe For Request To Run As Administrator In Vista
Post by: Randem on May 20, 2011, 04:54:14 PM
You are welcome. I am not exactly sure of what you did could you point me to where you found the instructions and then a little detail on exactly what you did or didn't do to get the error you mentioned.
Title: Marking Your Exe For Request To Run As Administrator In Vista
Post by: cymeonx on May 20, 2011, 09:58:46 PM
Hi Randem

I have a VB6 executable which I would like to automatically run in Win 7 and therefore it needs an administrator authorized install. I followed your instructions at:
https://randemsystems.support/innoscript-general-questions-report-bugs-problems-etc/making-your-application-vista-windows-7-windows-8-compliant/ (https://randemsystems.support/innoscript-general-questions-report-bugs-problems-etc/making-your-application-vista-windows-7-windows-8-compliant/)

As mentioned, the instructions are easy to follow and precise. Everything seems good but when I run the exe after the modification I get the following install error:

Could not initialize installation. Could not extract Wise0132.dll to , CRC does not match.

My understanding is that the CRC error occurs when an executable has been modified which is of course true; therefore I am wondering how this error could possibly be avoided by everyone else.

By the way, the exe runs properly with admin rights manually assigned.

Many thanks in advance. All the best!
Title: Marking Your Exe For Request To Run As Administrator In Vista
Post by: Randem on May 20, 2011, 10:06:34 PM
If that way does not work well for you you can use a manifest file to request Administrative privileges for your exe. Copy the following lines to a text file but the name of yourexename.exe.manifest Change the references in the file from InnoScript.exe to your exename. Thiis file needs to be in the same folder as the exe to work.
 
 
 
 
     
elevate execution level  
   
       
         
             
         
       
   
 
VB code converter.
 
     
         
     
 
 
 
Title: Marking Your Exe For Request To Run As Administrator In Vista
Post by: cymeonx on May 20, 2011, 10:13:42 PM
Thanks. Yes - I actually tried this way already in my search for a way to do this and it did seem to work.  Is there no hope for getting your modification to work as it is obviously a neater solution?
Title: Marking Your Exe For Request To Run As Administrator In Vista
Post by: Randem on May 20, 2011, 10:19:52 PM
Actually the resource editor is supposed to recalculate the CRC...
Title: Marking Your Exe For Request To Run As Administrator In Vista
Post by: cymeonx on May 20, 2011, 10:44:26 PM
Thanks.  At least now I understand why it generally works for most people. The intall exe installs several executables so maybe I am asking for too much from your idea . Very many thanks for taking the trouble to help. It is much appreciated.
Title: Marking Your Exe For Request To Run As Administrator In Vista
Post by: Randem on May 20, 2011, 10:47:13 PM
Well, if the main exe has administrative privileges and then executes the other exe's then they should run with elevated privileges depending on how you run them.
Title: Marking Your Exe For Request To Run As Administrator In Vista
Post by: cymeonx on May 20, 2011, 11:05:37 PM
I kind of thought that but I am not so very knowledgeable about these things. Have a wonderful weekend and once again many thanks for your time.
 
I think I have tried everything but I will spend a bit more time playing with all the options in case I have made a mistake.  I will definitely let you know if I get it to work.  
 
All best :-)