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. C#
  4. How can I implement the executing when turning on the computer during the deployment

How can I implement the executing when turning on the computer during the deployment

Scheduled Pinned Locked Moved C#
sysadminwindows-adminquestion
6 Posts 2 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.
  • J Offline
    J Offline
    joypain
    wrote on last edited by
    #1

    there seems to be some code to operate the registrykey(add a key in "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run"),but how can I use these codes or where can I use them in the deployment project. and in the deployment project,there is also registry management in the deployment,can I set the attributes to implement the executing of the application when turning on the computer. joypain

    B 1 Reply Last reply
    0
    • J joypain

      there seems to be some code to operate the registrykey(add a key in "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run"),but how can I use these codes or where can I use them in the deployment project. and in the deployment project,there is also registry management in the deployment,can I set the attributes to implement the executing of the application when turning on the computer. joypain

      B Offline
      B Offline
      BoneSoft
      wrote on last edited by
      #2

      I think you answered your own question there... The Deployment project's registry editor.


      Try code model generation tools at BoneSoft.com.

      J 1 Reply Last reply
      0
      • B BoneSoft

        I think you answered your own question there... The Deployment project's registry editor.


        Try code model generation tools at BoneSoft.com.

        J Offline
        J Offline
        joypain
        wrote on last edited by
        #3

        I add a new item in HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\ CurrentVersion\Run,and then I add a key, and set the key value to the path of the application,can it work? by the way how can I get the path of the application in the registry editor and write it to the keyvale? joypain

        B 1 Reply Last reply
        0
        • J joypain

          I add a new item in HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\ CurrentVersion\Run,and then I add a key, and set the key value to the path of the application,can it work? by the way how can I get the path of the application in the registry editor and write it to the keyvale? joypain

          B Offline
          B Offline
          BoneSoft
          wrote on last edited by
          #4

          Looking at the properties of the Application Folder in File System, the default location is probably something like this...

          [ProgramFilesFolder][Manufacturer]\[ProductName]

          which is equal to this...

          [TARGETDIR]

          I don't know of a way to get the EXE's name, but you should know what that is anyway. So add your reg string with a value like this...

          [TARGETDIR]myExe.exe


          Try code model generation tools at BoneSoft.com.

          J 1 Reply Last reply
          0
          • B BoneSoft

            Looking at the properties of the Application Folder in File System, the default location is probably something like this...

            [ProgramFilesFolder][Manufacturer]\[ProductName]

            which is equal to this...

            [TARGETDIR]

            I don't know of a way to get the EXE's name, but you should know what that is anyway. So add your reg string with a value like this...

            [TARGETDIR]myExe.exe


            Try code model generation tools at BoneSoft.com.

            J Offline
            J Offline
            joypain
            wrote on last edited by
            #5

            "[TARGETDIR]" works!:) I've been searching on the internet and msdn for a few days to solve the problem.Thank you for your guide! joypain

            B 1 Reply Last reply
            0
            • J joypain

              "[TARGETDIR]" works!:) I've been searching on the internet and msdn for a few days to solve the problem.Thank you for your guide! joypain

              B Offline
              B Offline
              BoneSoft
              wrote on last edited by
              #6

              Sure. I wish I could find a list of all the variables that are available, but those are the only 4 I'm aware of. That may be all of them.


              Try code model generation tools at BoneSoft.com.

              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