New Posts  All Forums:Forum Nav:

C++ windows startup

post #1 of 15
Thread Starter 
how do you get a C++ windows app to write itself to the startup folder ?

sorry I miss phrased that, how do you get the program itself to write its own exe to the startup folder?
post #2 of 15
eh?
I'm no prg expert but would you not have to compile it and then move its exe to the startup folder?
or am i missing something here?
My System
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 Asus Lappy GeForce GT520M 4096 
Hard DriveOptical DriveOSMonitor
500GB LG W7=64 ult + Slackware13.1_64 + MineOS HP w2207h 
KeyboardCaseMouse
logitech G11 Fugly, lol logitech mx518 
  hide details  
Reply
My System
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 Asus Lappy GeForce GT520M 4096 
Hard DriveOptical DriveOSMonitor
500GB LG W7=64 ult + Slackware13.1_64 + MineOS HP w2207h 
KeyboardCaseMouse
logitech G11 Fugly, lol logitech mx518 
  hide details  
Reply
post #3 of 15
Thread Starter 
sorry I miss phrased that, how do you get the program itself to write its own exe to the
post #4 of 15
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.
post #5 of 15
Quote:
Originally Posted by guiltspark
how do you get a C++ windows app to write itself to the startup folder ?

sorry I miss phrased that, how do you get the program itself to write its own exe to the startup folder?
What language exactly? Old C++ or Visual Studio 2005?
TITAN-6
(16 items)
 
  
CPUMotherboardGraphicsRAM
i7 2600K @ 4GHZ ASRock Extreme 3 Gen 3 Gigabyte Nvidia GTX 570 8GB G.skill Sniper DDR3 1866 
Hard DriveOptical DriveCoolingOS
Crucial M4 CT128M4SSD2 2.5" 128GB SATA III MATSHITA BD-CMB UJ160 Blu Ray DVD writer Cooler Master Hyper 212+ Windows 7 x64 
MonitorMonitorKeyboardPower
Sceptre 24" LCD BENQ 3D 24" LCD Logitech G510 Corsair 750W HX professional single rail 
CaseMouseMouse PadAudio
CM Storm Sniper Razer Naga left-handed version None Onboard 
  hide details  
Reply
TITAN-6
(16 items)
 
  
CPUMotherboardGraphicsRAM
i7 2600K @ 4GHZ ASRock Extreme 3 Gen 3 Gigabyte Nvidia GTX 570 8GB G.skill Sniper DDR3 1866 
Hard DriveOptical DriveCoolingOS
Crucial M4 CT128M4SSD2 2.5" 128GB SATA III MATSHITA BD-CMB UJ160 Blu Ray DVD writer Cooler Master Hyper 212+ Windows 7 x64 
MonitorMonitorKeyboardPower
Sceptre 24" LCD BENQ 3D 24" LCD Logitech G510 Corsair 750W HX professional single rail 
CaseMouseMouse PadAudio
CM Storm Sniper Razer Naga left-handed version None Onboard 
  hide details  
Reply
post #6 of 15
Thread Starter 
The compiler I'm using is Bloodshed Dev C++ 4.9.2
post #7 of 15
Quote:
Originally Posted by guiltspark
The compiler I'm using is Bloodshed Dev C++ 4.9.2

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.
TITAN-6
(16 items)
 
  
CPUMotherboardGraphicsRAM
i7 2600K @ 4GHZ ASRock Extreme 3 Gen 3 Gigabyte Nvidia GTX 570 8GB G.skill Sniper DDR3 1866 
Hard DriveOptical DriveCoolingOS
Crucial M4 CT128M4SSD2 2.5" 128GB SATA III MATSHITA BD-CMB UJ160 Blu Ray DVD writer Cooler Master Hyper 212+ Windows 7 x64 
MonitorMonitorKeyboardPower
Sceptre 24" LCD BENQ 3D 24" LCD Logitech G510 Corsair 750W HX professional single rail 
CaseMouseMouse PadAudio
CM Storm Sniper Razer Naga left-handed version None Onboard 
  hide details  
Reply
TITAN-6
(16 items)
 
  
CPUMotherboardGraphicsRAM
i7 2600K @ 4GHZ ASRock Extreme 3 Gen 3 Gigabyte Nvidia GTX 570 8GB G.skill Sniper DDR3 1866 
Hard DriveOptical DriveCoolingOS
Crucial M4 CT128M4SSD2 2.5" 128GB SATA III MATSHITA BD-CMB UJ160 Blu Ray DVD writer Cooler Master Hyper 212+ Windows 7 x64 
MonitorMonitorKeyboardPower
Sceptre 24" LCD BENQ 3D 24" LCD Logitech G510 Corsair 750W HX professional single rail 
CaseMouseMouse PadAudio
CM Storm Sniper Razer Naga left-handed version None Onboard 
  hide details  
Reply
post #8 of 15
Perhaps a cleaner way to do it would be the registry.

All users: HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\ CurrentVersion\\Run

Current user only: HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\C urrentVersion\\Run
Main Rig
(14 items)
 
  
CPUMotherboardGraphicsRAM
i5 2500K Asus P8P67 EVO GTX 980 16GB DDR3 1866mhz 
Hard DriveCoolingOSMonitor
Revodrive 3 x2 240GB, M500 960GB, 2x WD 1TB Rai... Noctua NH-D14 Windows 10 Apple Cinema 30" 1600p 
KeyboardPowerCaseMouse
Logitech Orion Spark Capstone 750w CM Storm Scout Logitech G700s 
  hide details  
Reply
Main Rig
(14 items)
 
  
CPUMotherboardGraphicsRAM
i5 2500K Asus P8P67 EVO GTX 980 16GB DDR3 1866mhz 
Hard DriveCoolingOSMonitor
Revodrive 3 x2 240GB, M500 960GB, 2x WD 1TB Rai... Noctua NH-D14 Windows 10 Apple Cinema 30" 1600p 
KeyboardPowerCaseMouse
Logitech Orion Spark Capstone 750w CM Storm Scout Logitech G700s 
  hide details  
Reply
post #9 of 15
Quote:
Originally Posted by Fishie36
Perhaps a cleaner way to do it would be the registry.

All users: HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\ CurrentVersion\\Run

Current user only: HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\C urrentVersion\\Run

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.
TITAN-6
(16 items)
 
  
CPUMotherboardGraphicsRAM
i7 2600K @ 4GHZ ASRock Extreme 3 Gen 3 Gigabyte Nvidia GTX 570 8GB G.skill Sniper DDR3 1866 
Hard DriveOptical DriveCoolingOS
Crucial M4 CT128M4SSD2 2.5" 128GB SATA III MATSHITA BD-CMB UJ160 Blu Ray DVD writer Cooler Master Hyper 212+ Windows 7 x64 
MonitorMonitorKeyboardPower
Sceptre 24" LCD BENQ 3D 24" LCD Logitech G510 Corsair 750W HX professional single rail 
CaseMouseMouse PadAudio
CM Storm Sniper Razer Naga left-handed version None Onboard 
  hide details  
Reply
TITAN-6
(16 items)
 
  
CPUMotherboardGraphicsRAM
i7 2600K @ 4GHZ ASRock Extreme 3 Gen 3 Gigabyte Nvidia GTX 570 8GB G.skill Sniper DDR3 1866 
Hard DriveOptical DriveCoolingOS
Crucial M4 CT128M4SSD2 2.5" 128GB SATA III MATSHITA BD-CMB UJ160 Blu Ray DVD writer Cooler Master Hyper 212+ Windows 7 x64 
MonitorMonitorKeyboardPower
Sceptre 24" LCD BENQ 3D 24" LCD Logitech G510 Corsair 750W HX professional single rail 
CaseMouseMouse PadAudio
CM Storm Sniper Razer Naga left-handed version None Onboard 
  hide details  
Reply
post #10 of 15
Thread Starter 
But how do you get the program to go to that directory and copy its .exe into it ?
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Application Programming