Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

EXE has to run once with admin rights

Status
Not open for further replies.

ianwin

Programmer
Jul 5, 2005
44
US
I have developed an application in VB6 which has been running ok for several years with the odd enhancement every so often.

I have recently got a new laptop with XP Pro SP2 installed, when I make a change to the program and regenerate the exe it works ok on my PC (I have full admin access for development purposes) however when moved onto someone elses PC for testing the exe comes up with "UNEXPECTED ERROR CLOSING" and doesn't launch. This did not happen before I got the new laptop.

The user has Read, write and execute access to the exe and all files in the same folder. The error message appears before any line of the code is executed so I am struggling to find the issue, any help would be greatly appreciated.

-Ian
 
How are you moving " ... onto someone elses PC ..."?

Are you doing a full install of the app or just copying the EXE?
 
I am just copying the exe onto another PC> The application is made up of a suite of 9 exe's which have been installed and are running ok I am only changing one of them.

Once the new exe has been run once with admin rights it then runs ok under a restricted access account. I think the is because the exe is an activex exe.
 
ActiveX EXEs require registration and on being run they will check for this. If not, they self-register. Doing so properly means they need full admin rights.

Use a proper installer.
 
Is there a change in how this is done under SP2 as the procedure described above working for a the same user with the same access rights before SP2 was installed.
 
I'm unaware of any XP SP2 change in this area. Did the user once have admin rights? Is this a corporate setting where Group Policy might prevent user access to HKLM now?
 
The user has never been an admin user, it is a corperate environment however this worked before SP2 was installed and as far as I am aware the group policy has not been changed.
 
It may have nothing to do with it but after a Windows 2000 service pack we had to do this:

1. From the Administrative Tools folder on your Start menu.
2. Expand Local Policies .
3. Press User Rights Assignment
4. Double-click Impersonate a client after authentication in the right-hand pane.
5. Press Add on the Local Security Policy Setting dialog.
6. In the Select Users or Group dialog , select the user account that you want to add and press Add . (we used "EveryBody")
7. Press OK and OK .
 
>we used "EveryBody"

I'd suggest that 'Authorized Users' is a better choice than 'Everybody' ...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top