Jump to content

RunOnce registry entry is not working


LeveL

Recommended Posts

I am putting this in a registry (.reg) file...

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce]
"MyConfigFile"="%SystemRoot%\\system32\\myfile.exe"

I import this and when Windows starts up I get this:

bullww8.png

The file "myfile.exe" is here:

C:\WINDOWS\system32\myfile.exe

Whats wrong with the runonce path - %SystemRoot%\\system32\\myfile.exe :unsure:

Link to comment
Share on other sites


Don't use %SystemRoot% or other environment variables when you are using string value

Use C:\\Windows\\System32\\myfile.exe instead of %SystemRoot%\\system32\\myfile.exe

Cheers !

Link to comment
Share on other sites

Don't use %SystemRoot% or other environment variables when you are using string value

Use C:\\Windows\\System32\\myfile.exe instead of %SystemRoot%\\system32\\myfile.exe

Cheers !

What if I installed Windows on a D: drive, or E: drive?

You mean, don't use a string value?

I see %SystemRoot% all over the registry in string values and they all work, most

are put there by programs.

Thanks for the suggestion but I found a better way to run this file from a CMD file now

so I am not using the RunOnce entry at all. If at first you don't succeeed... give up and

do it an alternative way, lol.

Edited by LeveL
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...