Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to initiate a process on startup and shutdown

Status
Not open for further replies.

scallosa

ISP
Mar 7, 2002
76
US
I would like to set the hidden attribute of a file
(attrib temp.txt +h)when the system starts up, then clear the hidden bit at closedown. (Although it may seem pointless to make a file viewable at shutdown, I am mainly interested in how the process works.)
Thanks.
 
Open notepad and type :
attrib +h c:\foldername\text.txt

Where you supply the correct drive and path to the file in question.
Then save as a batch file. (*.bat)
now open explorer and go to "C:\WINDOWS\Start Menu\Programs\StartUp" and create a shortcut to the batch file you just made. this should set the files attributes to hidden upon startup.

To remove the hidden flag on shutdown, make another batch file like this:
attrib -h c:\foldername\text.txt
c:\windows\rundll.exe user.exe,exit windows

then create a shortcut to this file on the desktop and double click to first remove the hidden flag and then shut down the computer.

If you're going through Hell...keep going... (Winston Churchill)
RocKeRFelLerZ
 
Although I have been involved in mainframe programming for years, I didnt know about this procedure, so I thank you for passing along your knowledge.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top