View Single Post
Old 2010-12-06, 10:06   #7
NBtarheel_33
 
NBtarheel_33's Avatar
 
"Nathan"
Jul 2008
Maryland, USA

5×223 Posts
Post Prime95 Service on Vista or 7 - here's how!

This works on XP, as well. I believe you have to have administrator rights, however, in order to execute these commands.

First thing is to download Prime95.exe (32- or 64-bit, as appropriate) to whatever location you would like (a good choice would be into a folder such as C:\Prime95)

Go to Start -> All Programs -> Accessories and right click on "Command Prompt". When you right click, you'll get a menu of options - click on "Run as Administrator".

Agree to the User Account Control warning/dialog box.

The command prompt window will open up. At the prompt, type (note the space after the binPath=):

sc create Prime95 binPath= c:\prime95\prime95.exe

(substitute your own Windows file path name if you stored the exe file somewhere other than C:\Prime95)

and hit enter. If all goes well, you'll simply see a new command prompt...and you'll have a new service called Prime95 that runs prime95.exe.

Now, click the start button, and in the search box, type services.msc and hit enter. This will bring up a list of services (listed in alphabetical order) on your system. Scroll down to the Prime95 service, right-click it and choose Properties.

On the Properties page, the General tab should be highlighted. (If it isn't, then select it.) Be sure that the Startup type is Automatic (this will start the service on bootup, regardless of whether or not a user is logged on).

Now click the "Log On" tab (still on the Properties page). Check the button for "Local System Account". This ensures that Prime95 will run even if no one is logged on, and will also run for any user who *is* logged on.

Finally, the "Recovery" tab on the Properties page gives you some options for what Windows should do if anything should ever stop or interrupt the Prime95 service. You might wish to ensure that the recovery options are set up so that the service always tries to restart itself if there are any errors, failures, or interruptions.

Now close the Properties page, and right-click the Prime95 service, choosing "Start". Voila! Prime95 is up and running, and will always be up and running as long as your system is, or until you stop the service.

Unfortunately, due to the new security "features" in Vista and 7, you cannot interact with the Prime95 GUI when you have it running as a service. If you wish to interact with the GUI to change options, release work, etc., first stop the Prime95 service. Then navigate to your Prime95 folder, and open the program the old-fashioned way. Make whatever changes you wish to make, and then stop and exit the GUI. Now go to services.msc and restart your service, and you're done. If, on the other hand, you're well-enough versed in the language of the Prime95 configuration files (prime.txt, worktodo.txt, local.txt, etc.), you can make changes to the settings directly in those files, then stop and restart your Prime95 service. A similar procedure applies to upgrading Prime95. You need simply stop the service, overwrite the old Prime95.exe with the new version, and then restart the service.

Finally, should you ever want to remove the Prime95 service, simply open a Command Prompt as an Administrator, and type

sc delete Prime95

hit enter, and the service will disappear!

If you're interested in monitoring your progress (as I am), be sure that you have Prime95 set up to write to the results.txt file every 10,000 or 1,000,000 or some other desired number of iterations, as unless you stop the service and open the GUI, this is the only way you will be able to monitor your progress short of waiting for an entire result to be completed and turned in to PrimeNet.

Hope this helps everyone interested in a Prime95 service on Vista or 7. It can be done, it just takes a bit of work to get everything set up. But it certainly helps you be able to "set it and forget it".
NBtarheel_33 is offline   Reply With Quote