Creating shortcut for a c application

In summary, the conversation discusses the possibility of creating a virus that runs immediately when a folder containing it is opened. The speaker mentions writing a simple c application and wanting to know how to make it run automatically. Suggestions are made to use shortcuts or manipulate the Windows registry, but it is also noted that this type of behavior may not be well-received by others.
  • #1
kthouz
193
0
I was trying to understand how those kind of virus run immediately when you open a folder whcih contains it.
I wrote a simple c application that writes my name in a certain location on my computer and now i want to know how i can do so that when i open the folder which contains that c application then this one runs immeditely. I am thinkin about creatin an shortcut icon but i don't know how.
so if anyone else got a clue let me know.
 
Technology news on Phys.org
  • #2
I'm not sure folks here want to teach you how to write malicious code.

If you're really into this kinda thing try phrack.com
 
  • #3
No. The executable can only execute if it's ran. Opening a folder will never run an executable. Now, hidden file extensions and deceptive file icons are a different story...
 
  • #4
The Windows registry undoubtedly has settings that could be used to do that.
 
  • #5
CRGreathouse said:
The Windows registry undoubtedly has settings that could be used to do that.

You can get it to run a particular program on startup, but not automatically run a program on opening a folder.

(Not talking about autorun feature upon disc insertion.)
 
  • #6
KTC said:
You can get it to run a particular program on startup, but not automatically run a program on opening a folder.

(Not talking about autorun feature upon disc insertion.)

The registry is queried thousands of times when a folder is opened. There are lots of opportunities there.

At the very least you could tag along when any program is started; there's a setting for that. It's an exploit on some worms I've cleaned.
 

1. Can I create a shortcut for my C application?

Yes, it is possible to create a shortcut for a C application. This can be done by creating a ".lnk" file, also known as a shortcut file, that points to the location of your C application on your computer.

2. How do I create a shortcut for my C application?

To create a shortcut for a C application, you can right-click on the application file and select "Create shortcut". This will create a shortcut in the same folder as your application. You can then move the shortcut to your desired location.

3. Can I customize the shortcut icon for my C application?

Yes, you can customize the shortcut icon for your C application. Right-click on the shortcut and select "Properties". In the "Shortcut" tab, click on the "Change Icon" button and select a new icon for your shortcut.

4. How can I change the properties of my C application shortcut?

You can change the properties of your C application shortcut by right-clicking on the shortcut and selecting "Properties". This will allow you to change the target location, start in, and other properties of your shortcut.

5. Can I create a shortcut for a specific function within my C application?

Yes, it is possible to create a shortcut for a specific function within your C application. This can be done by using the command line arguments when creating the shortcut. You can specify which function to run by using the appropriate command line argument in the "Target" field of the shortcut properties.

Similar threads

  • Programming and Computer Science
Replies
7
Views
436
  • Programming and Computer Science
Replies
6
Views
1K
  • Programming and Computer Science
Replies
2
Views
973
  • Programming and Computer Science
Replies
9
Views
851
  • Programming and Computer Science
Replies
3
Views
4K
  • Programming and Computer Science
Replies
8
Views
1K
  • Programming and Computer Science
Replies
8
Views
327
  • Programming and Computer Science
Replies
17
Views
1K
  • Programming and Computer Science
Replies
1
Views
3K
  • Programming and Computer Science
Replies
12
Views
9K
Back
Top