1.

Solve : Run-once only file?

Answer»

I'm building PCs for a few people locally and I want to be able to have a kind of "guide" open up when they turn on the PC for the first time. I will already have configured the PC for them, I just want it to RUN once the next time it's turned on.

The "guide" is essentially information on internet habits, anti-virus PROGRAMS, backups etc... what would be the best way to create this file, e.g. WordPad (rtf) or the like?

Thanks.


EDIT:: re:way of creating file - I think preinstalling Foxit and using that to open a PDF would be the best idea.What about the idea of creating it on a removable media and then they could continue to access the information indefinitely. If the new
OWNERS of your computers have limited knowledge of computers they will find it a GREAT advantage to be able to refer to your "guide" more than just once. You could include certain info on the media that would point out some things they could try in the event of certain malfunctions. They could then access that info from another computer. truenorthWhy not use a batch file?

Code: [Select]echo off
start /wait YOURGUIDEHERE
del YOURGUIDEHERE
del %0

But then again, the guide will only be deleted if they don't close the command prompt... Quote from: truenorth on December 31, 2010, 04:21:12 PM

What about the idea of creating it on a removable media and then they could continue to access the information indefinitely. If the new
owners of your computers have limited knowledge of computers they will find it a great advantage to be able to refer to your "guide" more than just once. You could include certain info on the media that would point out some things they could try in the event of certain malfunctions. They could then access that info from another computer. truenorth

Yeah, that's a good idea. I think I would like to do that as well as running the file automatically when they boot the PC. Thanks.

Quote from: Helpmeh on December 31, 2010, 04:47:13 PM
Why not use a batch file?

Code: [Select]echo off
start /wait YOURGUIDEHERE
del YOURGUIDEHERE
del %0

But then again, the guide will only be deleted if they don't close the command prompt...
Yes, but then how do I get that to run on startup? Quote from: kpac on December 31, 2010, 06:30:08 PM
Yes, but then how do I get that to run on startup?

put it in HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce

I'd go with something else, though, like the PDF; then have the foxit command line in RunOnce. Then if you wanted to keep the information available even after that you could make a shortcut to the PDF somewhere as well. Quote from: BC_Programmer on December 31, 2010, 06:34:00 PM
put it in HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce

I'd go with something else, though, like the PDF; then have the foxit command line in RunOnce. Then if you wanted to keep the information available even after that you could make a shortcut to the PDF somewhere as well.
Ah yes. I think that's the way to do it. What's the hook to open a file in Foxit?I'm pretty sure you can just PASS the foxit executable the path to the PDF file, and it will open it.

RunOnce entries have a "description" for the name, which doesn't really matter, and the value is the command line; in this case something like

"C:\Program Files \Foxit Software\Foxit Reader\Foxit Reader.exe" "path\to\pdf\file.pdf"

There are other switches you could use to more fully customize the entire thing, like opening to specific pages:

http://www.robvanderwoude.com/commandlineswitches.php#FoxitThanks, that's exactly what I want. I never actually thought of just doing a simple HTML file and getting Firefox to open it. Silly me.

Happy new year.


Discussion

No Comment Found