how to use runonce registry service?
-
Hi all i have no idea about run services.i googled a lot but i could not find much of help. plz help me about:- 1)how to use runonce registry service? 2)can i use it from my c# application? 3)i got to know that i need to create a batch file, can that batch file be destroied after it is being executed? http://www.catch22.net/tuts/selfdel[^] i have checked this link from this only i got few ideas 4)can the batch file contain task to be performed on shutdown of the system if so can yo help me with a sample? 5)where to place the batch file and when to execute it from my application?
-
Hi all i have no idea about run services.i googled a lot but i could not find much of help. plz help me about:- 1)how to use runonce registry service? 2)can i use it from my c# application? 3)i got to know that i need to create a batch file, can that batch file be destroied after it is being executed? http://www.catch22.net/tuts/selfdel[^] i have checked this link from this only i got few ideas 4)can the batch file contain task to be performed on shutdown of the system if so can yo help me with a sample? 5)where to place the batch file and when to execute it from my application?
- Maybe this registry key will give you a hint:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce
2) I don't know how you want to use it from your c# application, but "yes" you can launch a c# application via RunOnce. 3) Why do you need to have a self destructing batch file? Maybe you could let some other part of your app delete the file. 4) Don't know. 5) Please provide more info. I have no clue where you could/should/would place your bat file and I'm even more clueless of when to execute it from your app..
- Maybe this registry key will give you a hint:
-
- Maybe this registry key will give you a hint:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce
2) I don't know how you want to use it from your c# application, but "yes" you can launch a c# application via RunOnce. 3) Why do you need to have a self destructing batch file? Maybe you could let some other part of your app delete the file. 4) Don't know. 5) Please provide more info. I have no clue where you could/should/would place your bat file and I'm even more clueless of when to execute it from your app..
- Maybe this registry key will give you a hint:
-
1)HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce how to invoke this? or call this? or execute this key? 2)can we uninstall a setup created for a c# windows application on shutdown of system using RunOnce.
-
1)HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce how to invoke this? or call this? or execute this key? 2)can we uninstall a setup created for a c# windows application on shutdown of system using RunOnce.
Ajithevn wrote:
1)HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce how to invoke this? or call this? or execute this key?
You don't have a clue what the registry is or how it works, do you? You cannot "invoke" that key, or "execute" anything in the registry any time you want. All the registry is is a hierarchical database of information. There is nothing "executable" in it at all. The RunOnce key is just a list of command lines that Windows executes on startup.
Ajithevn wrote:
2)can we uninstall a setup created for a c# windows application on shutdown of system using RunOnce.
Since RunOnce command lines only get execute when Windows starts, no.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008
But no longer in 2009... -
Ajithevn wrote:
1)HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce how to invoke this? or call this? or execute this key?
You don't have a clue what the registry is or how it works, do you? You cannot "invoke" that key, or "execute" anything in the registry any time you want. All the registry is is a hierarchical database of information. There is nothing "executable" in it at all. The RunOnce key is just a list of command lines that Windows executes on startup.
Ajithevn wrote:
2)can we uninstall a setup created for a c# windows application on shutdown of system using RunOnce.
Since RunOnce command lines only get execute when Windows starts, no.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008
But no longer in 2009...Heh, that's why I steered clear of this one. :thumbsup:
Check out the CodeProject forum Guidelines[^] The original soapbox 1.0 is back![^]
-
Heh, that's why I steered clear of this one. :thumbsup:
Check out the CodeProject forum Guidelines[^] The original soapbox 1.0 is back![^]
Yeah, but someone has to step in it. Don't worry, I brought a stick to scrape the stuff off my shoes.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008
But no longer in 2009... -
1)HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce how to invoke this? or call this? or execute this key? 2)can we uninstall a setup created for a c# windows application on shutdown of system using RunOnce.
Ajithevn wrote:
or execute this key?
How do you know about it ? Because you can't execute a registry key. You obviously have just enough knowledge to be dangerous.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.