Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 626
  • Last Modified:

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

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
John500
Asked:
John500
  • 2
  • 2
1 Solution
 
barnesd1Commented:
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
 
John500Author Commented:
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
 
barnesd1Commented:
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
 
John500Author Commented:
Thanks!
0

Featured Post

 The Evil-ution of Network Security Threats

What are the hacks that forever changed the security industry? To answer that question, we created an exciting new eBook that takes you on a trip through hacking history. It explores the top hacks from the 80s to 2010s, why they mattered, and how the security industry responded.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now