Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Windows Forms
  4. How to run a dll on system reboot

How to run a dll on system reboot

Scheduled Pinned Locked Moved Windows Forms
csharptutorialquestion
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rockyl
    wrote on last edited by
    #1

    Hi, I would like to know one thing. On installation some applications restart the machine and automatically run some dlls on system reboot. But this dll will not run on every reboot. It runs only on this application installation process. Can this be done in C#? Any one please put some light on this... Thanks in advance: Rakesh

    Rakesh

    C 1 Reply Last reply
    0
    • R rockyl

      Hi, I would like to know one thing. On installation some applications restart the machine and automatically run some dlls on system reboot. But this dll will not run on every reboot. It runs only on this application installation process. Can this be done in C#? Any one please put some light on this... Thanks in advance: Rakesh

      Rakesh

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      dlls cannot be run, without a host program to run them. To run an app on reboot, put an entry in the 'runonce' key in the registry.

      Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

      R 1 Reply Last reply
      0
      • C Christian Graus

        dlls cannot be run, without a host program to run them. To run an app on reboot, put an entry in the 'runonce' key in the registry.

        Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

        R Offline
        R Offline
        rockyl
        wrote on last edited by
        #3

        Thanks a lot for the Idea. This runonce concept definetly solves my purpose. But I am facing some issue here. I have placed a string value "E:\test\runtoadd.bat". And this batch file consists of a command which runs a registry file which inturn resets a registry key. Then I reboot my machine and observed that the batch file and .reg are running on the reboot but the the thing is the registry key is not getting effected. Can you please let me know what is mistake here. Thanks: Rakesh

        Rakesh

        C 1 Reply Last reply
        0
        • R rockyl

          Thanks a lot for the Idea. This runonce concept definetly solves my purpose. But I am facing some issue here. I have placed a string value "E:\test\runtoadd.bat". And this batch file consists of a command which runs a registry file which inturn resets a registry key. Then I reboot my machine and observed that the batch file and .reg are running on the reboot but the the thing is the registry key is not getting effected. Can you please let me know what is mistake here. Thanks: Rakesh

          Rakesh

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          perhaps your batch file does not have permission to make the change ? What if yuo run it from the command line, does it change then ?

          Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

          R 1 Reply Last reply
          0
          • C Christian Graus

            perhaps your batch file does not have permission to make the change ? What if yuo run it from the command line, does it change then ?

            Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

            R Offline
            R Offline
            rockyl
            wrote on last edited by
            #5

            Yes. When I run from the command prompt it changes...

            Rakesh

            J 1 Reply Last reply
            0
            • R rockyl

              Yes. When I run from the command prompt it changes...

              Rakesh

              J Offline
              J Offline
              Jonathan Darka
              wrote on last edited by
              #6

              As Christian says it may be a permissions problem, which registry key are you trying to change ?


              Jonathan Wilkes Darka[Xanya.net]

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups