Background:
A few weeks ago, I reset my Windows 10 because I was running into some funky issues with my HP Envy 17's wireless projection and fingerprint login option. My friend and uncle recommended resetting the OS both to get rid of these issues and because my laptop is now 3-4 years old and can help rebuild any corrupted or lost integrity OS files. So, I also had to reinstall everything on my computer. I only got around to playing Skyrim yesterday, and noticed that my mods weren't loading up.
NMM recognized my mods as being installed, though I did not see them active in the game. LOOT did not even recognize that I had Skyrim installed. At first I tried disabling and then re-enabling mods in NMM, which didn't work. I also realized that I needed to reinstall SKSE and tried that. I cannot remember if I had tried to load up Skyrim at that point, but I also actually uninstalled the mods through NMM.
I also realized that since I had to reinstall Skyrim/SKSE, that I had to launch it through steam because since it was newly installed, I hadn't opened it before for Steam/Skyrim to create registries and all that typical first-time launching of a game. Once I did that, LOOT recognized that I had Skyrim installed on the PC.
At this point, when I was trying to do a "clean install" as my friend suggested by reinstalling Skyrim and the mods, I ran into issues with installing certain mods.
The issue:
Specifically, I am running into what I assess to be security policy permissions issues with installing the following mods:
- SkyUI
- Character Creation Overhaul
- Campfire
- Frostfall
When trying to install these, I get similar error messages that say something like "an error occurred in the script." A common detail in the error messages says something like ‘System.Security.Permissions.EnvironmentPermission, mscorlib, Version-4.0.0.0, Culture=neutral, Public KeyToken=b77a5c561934e089’ failed.
The only possible solutions I have found online so far is to:
- do something about running Skyrim or some other program or whatever as an administrator,
- grant Skyrim or NMM or something like that greater permissions,
- relocate the Steam library to somewhere outside the C:\Program Files (x86) folder
But I don't understand why I am running into this issue now, when I've never had it in the past. A lot of these details and fixes really stretch or go beyond my computer knowledge. I really really appreciate any help to understand what issue I'm having, and how I can fix it. I can also include a list of my original Skyrim mod build/list, plus a complete debug/error code for SkyUI and what little I felt like jotting down for CCO.
My Mod List/Build (The ones I had no issues with (re)installing through NMM):
- Realistic Needs and Diseases
- Midas Magic Evolved
- Run for your Lives
- Follower Trap Safety
- Invested Magic
- Balanced New Spells
- Linguists of Skyrim
- Better Wards
- Alternate Start - Live Another Life
- Apocalypse - Magic of Skyrim
- Winterhold Rebuild
- Helgen Reborn
- Immersive College of Winterhold
- Trade Routes
- Trade and Barter
- Alternative Crafting System
- Tailoring (Steam Workshop import to NMM and checked/cleaned through LOOT and TESVedit)
- Weapons and Armor Fixes Remade
- Clothing and Clutter Fixes
- Complete Crafting Overhaul
- Wrath of Nature - Path of the Druid
- A Quality World Map and Solstheim Map
- Skyrim Knights
- Cloaks of Skyrim
SkyUI Debug:
System.Reflection.TargetInvocationException:
Exception has been thrown by the target of an invocation. → System.Security.SecurityException:
Request for the permission of type
‘System.Security.Permissions.EnvironmentPermission, mscorlib, Version-4.0.0.0, Culture=neutral, Public KeyToken=b77a5c561934e089’ failed.
Server stack trace:
at System.Security.CodeAccessSecurityEngine.Check (Object demand, StackCrawlMark&stackMark, Boolean is PermSet)
at System.Security.CodeAccessPermission.Demand ()
at System.IO.Patch.GetTempPath ()
at Nexus.Client.EnvironmentInfo.get_TemporaryPath ()
at Nexus.Client.Mods.Formats.FOMod.FOMod.GetFileStream (String p_strFile)
at Nexus.Client.ModManagement.ModFileInstaller.InstallFileFromMod (String p_strModFilePath, String p_strInstallPath)
at Nexus.Client.ModManagement.BasicInstallTask.DoWork (Object[]p_objArgs)
at Nexus.Client.ThreadedBackgroundTask.RunThreadedWork (Object p_objArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage (IntPtr md, Object[] args, Object server, Object[]&outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage (Imessage msg, ImessageSink replySink)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper (Message reqMsg, Boolean bProxyCase)
at System.Runtime.Remotive.Proxies.RemotingProxy.Invoke (Object NotUsed, MessageData& msgData)
at System.Func`2.EndInvoke (IasyncResult result)
at Nexus.Client.ThreadedBackgroundTask.StartWait (Boolean p_booRunInBackground, Object[] p_objArgs)
at Nexus.Client.ModManagerment.BasicInstallTask.Execute ()
at Nexus.Client.ModManagement.Scripting.ScriptFunctionProxy.PerformBasicInstall ()
at System.Runtime.Remotion.Messaging.StackBuilderSink._PrivateProcessMessage (IntPtr md, Object[] args, Object server, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage (IMessage msg)
Exception rethrown at [1]:
at System.Runtime.Proxies.RealProxy.HandleReturnMessage (Imessage reqMsg, Imessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke (MessageData&msgData, Int32 type)
at Nexus.Client.ModManagement.Scripting.ScriptFunctionProxy.PerformBasicInstall ()
at Nexus.Client.ModManagement.Scripting.CsharpScript.CsharpBaseScript.ExecuteMethod [T](Func`1 p_fncMethod)
at Script.OnActivate ()
--- End of inner exception stack trace---
at System.Runtime.MethodHandle.InvokeMethod (Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal (Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke (Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Nexus.Client.ModManagement.Scripting.CsharpScriptRunner.Execute (Byte[] p_bteScript)
System.Security.SecurityException: Request for the permission of type ‘System.Security.Permissions.EnvironmentPermission, mscorlib, Version=4.0.0.0 Culture=neutral, PublicKeyToken=b77a5c561934e089’ failed.
Server stack trace:
at System.Security.CodeAccessSecurityEngine.Check (Object demand, StackCrawlMark&stackMark, Boolean is PermSet)
at System.Security.CodeAccessPermission.Demand ()
at System.IO.Patch.GetTempPath ()
at Nexus.Client.EnvironmentInfo.get_TemporaryPath ()
at Nexus.Client.Mods.Formats.FOMod.FOMod.GetFileStream (String p_strFile)
at Nexus.Client.ModManagement.ModFileInstaller.InstallFileFromMod (String p_strModFilePath, String p_strInstallPath)
at Nexus.Client.ModManagement.BasicInstallTask.DoWork (Object[]p_objArgs)
at Nexus.Client.ThreadedBackgroundTask.RunThreadedWork (Object p_objArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage (IntPtr md, Object[] args, Object server, Object[]&outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage (Imessage msg, ImessageSink replySink)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper (Message reqMsg, Boolean bProxyCase)
at System.Runtime.Remotive.Proxies.RemotingProxy.Invoke (Object NotUsed, MessageData& msgData)
at System.Func`2.EndInvoke (IasyncResult result)
at Nexus.Client.ThreadedBackgroundTask.StartWait (Boolean p_booRunInBackground, Object[] p_objArgs)
at Nexus.Client.ModManagerment.BasicInstallTask.Execute ()
at Nexus.Client.ModManagement.Scripting.ScriptFunctionProxy.PerformBasicInstall ()
at System.Runtime.Remotion.Messaging.StackBuilderSink._PrivateProcessMessage (IntPtr md, Object[] args, Object server, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage (IMessage msg)
Exception rethrown at [1]:
at System.Runtime.Proxies.RealProxy.HandleReturnMessage (Imessage reqMsg, Imessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke (MessageData&msgData, Int32 type)
at Nexus.Client.ModManagement.Scripting.ScriptFunctionProxy.PerformBasicInstall ()
at Nexus.Client.ModManagement.Scripting.CsharpScript.CsharpBaseScript.ExecuteMethod [T](Func`1 p_fncMethod)
at Script.OnActivate ()
The action that failed was: Demand
The type of the first permission that failed was: System.Security.Permissions.EnvironmentPermission
Character Creation Overhaul Debug (Partial, because I didn't feel like typing everything):
System.Reflection.TargetInvocationException:
Exception has been thrown by the target of an invocation. → System.Security.SecurityException:
Request for the permission of type
‘System.Security.Permissions.EnvironmentPermission, mscorlib, Version-4.0.0.0, Culture=neutral, Public KeyToken=b77a5c561934e089’ failed.
Server stack trace:
at System.Security.CodeAccessSecurityEngine.ThrowSecurityException (RuntimeAssembly asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandleInternal rmh, SecurityAction action, Object demand, Ipermission perm ThatFailed)
at System.Security.CodeAccessSecurityEngine.CheckHelper (PermissionSet grantedSet, PermissionSet refusedSet, CodeAccessPermission demand, Permission Token perm Token, RuntimeMethodHandleInternal rmh, Object assemblyOrString, SecurityAction action, Boolean throwException)
at System.Security.CodeAccessSecurityEngine.Check (Object demand, StackCrawlMark& stackMark, Boolean is PermSet)
at System.Security.CodeAccessPermission.Demand()
at System.IO.Path.GetTempPath()
at Nexus.Client.EnvironmentInfo.get_TemporaryPath()
at Nexus.Client.Mods.Formats.FOMod.FOMod.GetFileStream (String p_strFile)