Solved

C# application doesn't launch on Server 2008 but runs on XP & Vista

Posted on 2008-11-03
4
618 Views
Last Modified: 2013-12-04
Greetings,

I have a program the company has been using quite a while on Server 2003 and XP.  We recently started a migration to Server 2008 and Vista.  The program has no problems yet on Vista and works on some Server 2008 machines.  For the Servers it doesn't work on it gives a Problem Signature error:

System.UnauthorizedAccess

This program is located in the following directory:

C$\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup

Is there some configuration item that is lacking which causes this problem?

This is additional information generated by the C# application:


Attempted to perform an unauthorized operation.
mscorlib -- System.UnauthorizedAccessException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=


Thanks!

Status-program-stops-working.JPG
0
Comment
Question by:John500
  • 2
  • 2
4 Comments
 
LVL 4

Expert Comment

by:barnesd1
ID: 22928835
Try either adding the exe name to Control Panel..Advanced..Data Execution Protection.  See http://support.microsoft.com/kb/875352
Also you might want to add it to the Windows Firewall as an exception.
0
 

Author Comment

by:John500
ID: 22939981
Ok, I'll keep these in mind as alternate solutions.  However, it appears UAC is the problem because this executable is located in the Startup directory:

C$\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup

Apparently this directory defaults to the 'User' account especially for primary domain controlers which have no local user/group policies (for security reasons).

The end result is that unless the 'User' account is given write permission on the directory it needs, the application won't be able to write even if the user running the application is considered an administrator of the domain.

I'd try your suggestion right now but it would require a reboot on the PDC... but that's not happening during normal working hours.

Any additional thoughts?
0
 
LVL 4

Accepted Solution

by:
barnesd1 earned 500 total points
ID: 22947912
If you want the program to start forget the Startup group.  Go into the registry with regedit and migrate to \HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run and add new String Value MyProg and set the Value to your exe eg c:\program files\myprog\MyProg.exe.
0
 

Author Closing Comment

by:John500
ID: 31512738
Thanks!
0

Featured Post

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

New Windows 7 Installations take days for Windows-Updates to show up and install. This can easily be fixed. I have finally decided to write an article because this seems to get asked several times a day lately. This Article and the Links apply to…
OfficeMate Freezes on login or does not load after login credentials are input.
This tutorial will walk an individual through configuring a drive on a Windows Server 2008 to perform shadow copies in order to quickly recover deleted files and folders. Click on Start and then select Computer to view the available drives on the se…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question