Deleting file on desktop, waiting for a program to be closed
Posted: 05 Aug 2009 07:03
Hi, I've searched this forum for almost 4 hours and finally I decided to join this great forum. I'm surprised to see how qiuch the answers coming up, it's great.
I want to make a batch file which does :
- Finds the version of the dos being used... ( I know it's done by the ver command)
- Checks if the dos belongs to Vista or XP by the version number... ( XP's dos version is "5", But Vista's dos version is "6")
- Check the username of the current user, using windows ( for example Administrator ). this one will be needed in the next 2 steps.
- If it belongs to XP deletes for example a.txt placed in the desktop and in the startmenu folder
- If it belons to Vista deletes for example a.txt placed on the desktop and in the startmenu folder
- Copy itself to the program files directory and startmenu
- Checks if the above is done, then jumps to the next step. ( for the nest uses of this batch, because it already has done all the above.)
- Sets the time of the system to a specified time and date.
- Runs an external program.
- Waits for the application in the previous step to be closed
- Returns the time and date to the original one.
So much thanks. Please answer this question, it's very important for me. thanks again.
I want to make a batch file which does :
- Finds the version of the dos being used... ( I know it's done by the ver command)
- Checks if the dos belongs to Vista or XP by the version number... ( XP's dos version is "5", But Vista's dos version is "6")
- Check the username of the current user, using windows ( for example Administrator ). this one will be needed in the next 2 steps.
- If it belongs to XP deletes for example a.txt placed in the desktop and in the startmenu folder
- If it belons to Vista deletes for example a.txt placed on the desktop and in the startmenu folder
- Copy itself to the program files directory and startmenu
- Checks if the above is done, then jumps to the next step. ( for the nest uses of this batch, because it already has done all the above.)
- Sets the time of the system to a specified time and date.
- Runs an external program.
- Waits for the application in the previous step to be closed
- Returns the time and date to the original one.
So much thanks. Please answer this question, it's very important for me. thanks again.