-2
我的應用程序出現問題。 當我自己運行它時,所有的作品都是完美的。 但是當我的應用程序從啓動啓動時,我有System.IO.FileNotFoundException。 添加我的應用程序在啓動時按下面的代碼:啓動應用程序時出現C#FileNotFoundException
RegistryKey wowNode = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Run", true);
wowNode.SetValue("myApp", System.Reflection.Assembly.GetEntryAssembly().Location);
,當我的應用程序重新啓動後開始我System.IO.FileNotFoundException 所有文件都在同一個目錄中的.exe文件
可有人幫助我呢?我用讀文件
代碼:
names = File.ReadAllLines("name.txt");
[OpenSubKey不能用於我需要的註冊表值]的可能重複(http://stackoverflow.com/questions/10918877/opensubkey-not-working-for-registry-value-i-need) – MethodMan