By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,054 Members | 1,327 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,054 IT Pros & Developers. It's quick & easy.

Running an external EXE in C# with respect to permissions and environment

P: 2

I am trying to run an external EXE, or to be more specific, a Skyrim game from the small profile manager program I've written.

Running literally any other EXE from the program is completely fine. All games that are stored and ran from the program run perfectly.

However, when running Skyrim game from the program, it appears that the game is ran with some restrictions or otherwise is limited, because when the user attempts to load any saved games, the game will notify the user that the save games are corrupted, or based on content that is no longer there. No save games can be loaded.

Running the game's EXE manually even when the program is running does not result in an error.

I have tried running a simple System.Diagnostics.Process.Start but seeing it produces the error, I tried using:

Expand|Select|Wrap|Line Numbers
  1. System.Diagnostics.ProcessStartInfo game = new System.Diagnostics.ProcessStartInfo(split[1]);
  2. game.UseShellExecute = true;
  3. game.LoadUserProfile = true;
  4.                                 System.Diagnostics.Process.Start(game);
It still produces the error.

I assume that this is somehow tied to running the game from seperate process instead as a user from Windows.

Nov 26 '12 #1
Share this Question
Share on Google+
2 Replies

Expert Mod 5K+
P: 5,397
You're going to have to provide more detail about how you are launching the game and in what operating environment(s).
Nov 26 '12 #2

P: 2

Windows 7 OS, using Visual C# 2010 Express edition, .NET framework 4.0 environment.

Code snipped for launching an exe is copied, thanks for properly formatting it!

Basically, if TESV.exe is ran via the program (with code), it cannot access and load any save files which are located in Documents.

If it's launched via double-click like a user normally would, everything works fine.
Nov 26 '12 #3

Post your reply

Sign in to post your reply or Sign up for a free account.