Unable to Run Exe from Another PC

I have created a Windows based App and is able to run on my own PC (PC A).
Afterwhich, I moved the exe to another PC (PC B) and shared the directory.
At PC A, I map a drive to the directory (V:\).
At another PC (PC C) I also map a V:\ to the directory in PC B.

One weird problem I encountered is on PC C, I am able to run V:\myexe.exe successfully.
However, on PC A, I encounter a runtime error as below

"Request for permission of type 'System.Security.Permissions.EnvironmentPermission, mscorlib, version=2.0.0.0, Culture=neutral, PublicKeyToken=bb77a5c561934e089' failed".
ee_guestAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

hongjunCommented:
Try this

Start -> Control Panel -> Administrative Tool -> Microsoft .NET Framework Configuration
Open Configure Code Access Security Policy -> Adjust Zone Security -> Make changes to this computer.
Give Full Trust for My Computer and Local Intranet.


hongjun
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
udhayakumardCommented:
1. Choose Start -> Control Panel -> Administrative Tools -> Microsoft .NET Framework 1.1 Wizards
2. Choose Trust an Assembly
3. Choose whether you want to make changes for the computer or current user and click Next
4. Enter the UNC location of the application you want to run and click Next
5. Click Next to trust just this assembly
6. Adjust the slider to Full Trust and click Next
7. Click Finish


R u trying access wny Environment variable from ur application??
0
ee_guestAuthor Commented:
I am trying to get computer name.
I will try when the week starts on monday.
0
udhayakumardCommented:
How u r getting the Computer Name??
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C#

From novice to tech pro — start learning today.