Cool Solutions

How to Install Software/Scripts in Windows Without Requiring Administrator Credentials



By:

March 19, 2009 11:04 am

Reads: 11973

Comments:0

Score:0

How to install software in Windows during Windows boot up without requiring administrator credentials and without logging into the machines using the Windows Group Policy Editor.

For a developer there will be many user case scenarios to install an application during the system startup or shutdown.

There are many different ways to solve this problem.

  1. Keep the executable in the start menu -> programs -> startup folder.

    But the problem here is the script will execute only when the user logs into the system, after the user logs into the machine.
  2. Go to the runonce registry entry using the regedit cmd HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce and Run and RunOnceEx add the registry key.
  3. Windows provides a good way of setting up the startup and shutdown scripts.

    We can write a batch script which has to do our task during the Windows startup and make them execute using this method.

    1. Go to the GroupPolicy Editor.

      Open the run prompt and give the command gpedit.msc:
      start -> run -> gpedit.msc
    2. Scroll to the Computer Configuration -> Windows Settings -> Scripts
    3. Select startup, a dialog will appear where you can browse and select which script you want to execute during system startup.
    4. Browse to the location of the .bat or .exe files you want to run.
    5. We can pass the parameters also to the script or application using the parameters box.
    6. Click OK to confirm the action.

    Now we have placed the startup scripts successfully and the dialog box will show the list of all the startup scripts we have added.

    NOTE: You can also delete scripts. Use the delete button.
  4. How to use this methodology in a different way. (programmatic way)

    If we want to install the software when the os / vm is in offline mode.

    Mount the root partition of the OS and go the folder:

    [rootfolder mount point ]\windows\system32\GroupPolicy\Machine\Scripts

    Open the file scripts.ini

    If you open the file, the format is:

    [Startup] The command lines under this tab will execute when the machine comes up.
              0CmdLine takes the executable path of the binary.
              0Parameters takes the executable path of the binary.
    [Shutdown] The command lines under this tab will execute when the machine is shut down.
              0CmdLine takes the executable path of the binary.
              0Parameters takes the executable path of the binary.

    If you add more commands to execute increment the count and add the command line.

NOTE: Because these scripts are in the machine folder, the binaries or the scripts will execute when the machine starts up or shuts down.
VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)

Categories: Uncategorized

Disclaimer: This content is not supported by Novell. It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test it thoroughly before using it in a production environment.

Comment

RSS