Overclock.net banner

1 - 15 of 15 Posts

·
Registered
Joined
·
4 Posts
Discussion Starter #1
how do you get a C++ windows app to write itself to the startup folder ?<br><br>
sorry I miss phrased that, how do you get the program itself to write its own exe to the startup folder?
 

·
Registered
Joined
·
2,820 Posts
eh?<br>
I'm no prg expert but would you not have to compile it and then move its exe to the startup folder?<br>
or am i missing something here?<img alt="" class="inlineimg" src="/images/smilies/drunken.gif" style="border:0px solid;" title="Drunken">
 

·
Old Timer
Joined
·
4,895 Posts
Simply copy the .exe file to the startup folder. The startup folder is in the Program Files menu, in case you dont know where it is.
 

·
Premium Member
Joined
·
5,573 Posts
<div style="margin:20px;margin-top:5px;">
<div class="smallfont" style="margin-bottom:2px;">Quote:</div>
<table border="0" cellpadding="6" cellspacing="0" width="99%"><tr><td class="alt2" style="border:1px inset;">
<div>Originally Posted by <strong>guiltspark</strong></div>
<div style="font-style:italic;">how do you get a C++ windows app to write itself to the startup folder ?<br><br>
sorry I miss phrased that, how do you get the program itself to write its own exe to the startup folder?</div>
</td>
</tr></table></div>
What language exactly? Old C++ or Visual Studio 2005?
 

·
Premium Member
Joined
·
5,573 Posts
<div style="margin:20px;margin-top:5px;">
<div class="smallfont" style="margin-bottom:2px;">Quote:</div>
<table border="0" cellpadding="6" cellspacing="0" width="99%"><tr><td class="alt2" style="border:1px inset;">
<div>Originally Posted by <strong>guiltspark</strong></div>
<div style="font-style:italic;">The compiler I'm using is Bloodshed Dev C++ 4.9.2</div>
</td>
</tr></table></div>
<br>
Sorry, don't know how to do it in that compiler. I only know .NET and FSO object methods. Anyway, the exe has to go into: C:\\Documents and settings\\{your user name}\\Start menu\\Programs\\Startup.
 

·
Premium Member
Joined
·
8,427 Posts
Perhaps a cleaner way to do it would be the registry.<br><br>
All users: HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\ CurrentVersion\\Run<br><br>
Current user only: HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\C urrentVersion\\Run
 

·
Premium Member
Joined
·
5,573 Posts
<div style="margin:20px;margin-top:5px;">
<div class="smallfont" style="margin-bottom:2px;">Quote:</div>
<table border="0" cellpadding="6" cellspacing="0" width="99%"><tr><td class="alt2" style="border:1px inset;">
<div>Originally Posted by <strong>Fishie36</strong></div>
<div style="font-style:italic;">Perhaps a cleaner way to do it would be the registry.<br><br>
All users: HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\ CurrentVersion\\Run<br><br>
Current user only: HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\C urrentVersion\\Run</div>
</td>
</tr></table></div>
<br>
Yeah, that would be much cleaner. Just remember that RUN will execute when the machine boots if it's in HKLM or when the user logs on if its in HKCU.
 

·
Premium Member
Joined
·
6,685 Posts
so why are you trying to get it to do this, the only possible reason I could see for this would be for malicious reasons. Putting a program on somebody's computer that bunks is up pretty bad when they start it up. Not that I am doubting you or what you are doing at this time, just wondering what you are doing that is all.
 

·
Premium Member
Joined
·
8,095 Posts
DRAG IT INTO THE FOLDER!?!?<br />
<br />
Man, what are you asking!?!?!<br />
<br />
You want it to start up? Or you want it when they run it to put itself in the startup folder? if it's that, then I don't really think we should even be telling you....that can be for no good reason at all.<br />
<br />
Give us more details maybe.
 

·
Premium Member
Joined
·
6,685 Posts
Amazing how he just left when we asked him what he was going to use it for. hmm, makes it seem suspicious.
 

·
Premium Member
Joined
·
5,573 Posts
<div style="margin:20px; margin-top:5px; ">
<div class="smallfont" style="margin-bottom:2px">Quote:</div>
<table cellpadding="6" cellspacing="0" border="0" width="99%">
<tr>
<td class="alt2" style="border:1px inset">

<div>
Originally Posted by <strong>Kamakazi</strong>

</div>
<div style="font-style:italic">Amazing how he just left when we asked him what he was going to use it for. hmm, makes it seem suspicious.</div>

</td>
</tr>
</table>
</div><br />
You are a Dark Sith Lord....you are suspicious by definition <img src="/images/smilies/wink.gif" border="0" alt="" title="Wink" class="inlineimg" />
 

·
Old Timer
Joined
·
4,895 Posts
<div style="margin:20px; margin-top:5px; ">
<div class="smallfont" style="margin-bottom:2px">Quote:</div>
<table cellpadding="6" cellspacing="0" border="0" width="99%">
<tr>
<td class="alt2" style="border:1px inset">

<div>
Originally Posted by <strong>Kamakazi</strong>

</div>
<div style="font-style:italic">Amazing how he just left when we asked him what he was going to use it for. hmm, makes it seem suspicious.</div>

</td>
</tr>
</table>
</div>Also note that his only posts were in this thread... Can you say "wanabe hacker"? <img src="/images/smilies/rolleyes.gif" border="0" alt="" title="Roll Eyes (Sarcastic)" class="inlineimg" />
 
1 - 15 of 15 Posts
Top