L
lukecooley
I am new to coding in vb.net and I am trying to add a registry value in
the runonce key. The key is added correctly, as I can see it when
going directly into the registry after executing my code, but when I
reboot, the value (aka the .cmd file) is not executed and the string
value is not deleted from the registry (at
HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce).
Here is the code I am using to create the key:
Dim key As Microsoft.Win32.RegistryKey =
Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce",
True)
key.SetValue("MWAClean", "c:\sma\mwaclean\mwaclean.cmd")
Is there something wrong with the code I'm using to create the key that
is not allowing XP to see it on startup...or is there something else
going on here with windows????
Any help will be greatly appreciated,
Luke
the runonce key. The key is added correctly, as I can see it when
going directly into the registry after executing my code, but when I
reboot, the value (aka the .cmd file) is not executed and the string
value is not deleted from the registry (at
HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce).
Here is the code I am using to create the key:
Dim key As Microsoft.Win32.RegistryKey =
Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce",
True)
key.SetValue("MWAClean", "c:\sma\mwaclean\mwaclean.cmd")
Is there something wrong with the code I'm using to create the key that
is not allowing XP to see it on startup...or is there something else
going on here with windows????
Any help will be greatly appreciated,
Luke