Click here to Skip to main content
15,892,298 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more: (untagged)
This is my bat file code:

@ECHO OFF
set FolderPath="C:\ForSSSSetupNeed"

IF EXIST "C:\ForAFCSSetupNeed" setup.exe

IF NOT EXIST "C:\ForSSSSetupNeed" (
mkdir c:\ForSSSSetupNeed
abc.bat
ECHO GELLO
shutdown -r /t 00
setup.exe
)
PAUSE

Dear
when i click my bat file it check ,Is C:\ForSSSSetupNeed file exits.
if not exits it call abc.bat then restart my PC.
I want when again my PC Start it automatically Call setup.exe(my one develop software)
All file(Bat file ,exe file both) in my CD.What can i do that ?
Please help me
Posted
Updated 2-Jan-14 4:11am
v2
Comments
Sergey Alexandrovich Kryukov 2-Jan-14 10:19am    
You need to clarify when exactly it should start, on what event. Note that most applications cannot work before someone logs on.
And you can easily find all the handlers for auto-start if you do your search; then you will be able to see on what event do you want to do it.
—SA

1 solution

You may try the RunOnce[^] registry key to start your setup program.

Regards,
— Manfred
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 2-Jan-14 10:17am    
I'm not sure if this is what OP needs. The applications prescribed under this key start not exactly on restart, but on log on after first restart. I would ask OP for clarification.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900