Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

C# 

Run C# application at Windows startup?

Hello,
It's all the day that I'm trying to implement a startup feature into my project.

-I used Registry key:  //Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Run (Administrator Rights)
-I used Registry key:  //Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run (Administrator Rights)                                        
-I used Startup folder linked with a shortcut to my .exe location(inside %appdata%).
Unfortunately, nothing worked.


My operative system is: Windows 10 - PRO 1083.
My project has been developed with C#.

Do you know something else?

I need you to figure out that issue !  👍
Thanks in advance for your answers 🤝
Code
shell:Startup

Should definitely work or you weren't doing it right, or your application is crashing. If you want it dynamic then use the registry.
Getting Started: C/C++
[C/C++/.NET/x86 ASM - Automation Programmer]
(Oct 11, 2018 08:21 AM)0xDEAD10CC Wrote:  
Code
shell:Startup

Should definitely work or you weren't doing it right, or your application is crashing. If you want it dynamic then use the registry.

You were right.
The problem was I/O error that freezed the software.
This not good way to use regedit it could easily remove ,Inject it into some of system process that run all the time.


any why here how you do it
Microsoft.Win32.RegistryKey key;
key = Microsoft.Win32.Registry.LocalMachine.CreateSubKey("Software\\Wow6432Node\\Names");
key.SetValue("Name", "Isabella");
key.Close();


if you want to add the key to LocalMachine you must have admin right elsewhere not required
(Oct 13, 2018 09:52 AM)SaefkoTeam Wrote:  This not good way to use regedit it could easily remove ,Inject it into some of system process that run all the time.


any why here how you do it
Microsoft.Win32.RegistryKey key;
key = Microsoft.Win32.Registry.LocalMachine.CreateSubKey("Software\\Wow6432Node\\Names");
key.SetValue("Name", "Isabella");
key.Close();


if you want to add the key to LocalMachine you must have admin right elsewhere not required

And how exactly is this method any better than standard software practices for normal programs?
Getting Started: C/C++
[C/C++/.NET/x86 ASM - Automation Programmer]


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Shell] by Emre_Jan 12, 2021 11:16 PM 0 141 Jan 12, 2021 11:16 PM
Last Post: Emre_
[C#] by AstateDec 15, 2020 09:10 AM 3 570 Dec 15, 2020 09:10 AM
Last Post: CrystalFlare
[C#] by GurkaNov 16, 2020 11:32 AM 2 334 Nov 16, 2020 11:32 AM
Last Post: Gurka