Results 1 to 3 of 3

Thread: installing software using startup scripts in group policy 2003

  1. #1
    JR Guest

    installing software using startup scripts in group policy 2003

    Hi,
    I am trying to figure out the best way to install software through
    group policy when I dont have a .msi file. I have been able to
    install .exe's using computer startup scripts in group policy. That is
    pretty simple. But what I dont like is that the .exe will get
    installed every time the startup script runs, even if it already has
    the software, it will just re-install it over itself.

    What I would like to do is create a vbs startup script that first
    checks if the software is already installed, and if it is, then it
    doesnt do anything, but if its not, then it will run the .exe file.
    How do I go about doing this though?

    If I apply the .bat file to the GPO, how do I call the .exe file from
    it? I would assume I need to create a network share and map a drive to
    it, but since startup scripts run as local system account, this wont
    work. If I use a logon script though, I will be able to access a
    share, but will still have problems since the users dont have local
    admin access to install the .exe.

    Am I just missing something? Can anybody give me a simple solution to
    this dilemma?

    Thanks,
    JR

  2. #2
    Richard Mueller [MVP] Guest

    Re: installing software using startup scripts in group policy 2003


    "JR" <joshransom@hotmail.com> wrote in message
    news:95826b89-a3b1-4ef9-b518-b1867773d229@z24g2000prf.googlegroups.com...
    > Hi,
    > I am trying to figure out the best way to install software through
    > group policy when I dont have a .msi file. I have been able to
    > install .exe's using computer startup scripts in group policy. That is
    > pretty simple. But what I dont like is that the .exe will get
    > installed every time the startup script runs, even if it already has
    > the software, it will just re-install it over itself.
    >
    > What I would like to do is create a vbs startup script that first
    > checks if the software is already installed, and if it is, then it
    > doesnt do anything, but if its not, then it will run the .exe file.
    > How do I go about doing this though?
    >
    > If I apply the .bat file to the GPO, how do I call the .exe file from
    > it? I would assume I need to create a network share and map a drive to
    > it, but since startup scripts run as local system account, this wont
    > work. If I use a logon script though, I will be able to access a
    > share, but will still have problems since the users dont have local
    > admin access to install the .exe.
    >
    > Am I just missing something? Can anybody give me a simple solution to
    > this dilemma?
    >
    > Thanks,
    > JR


    Startup scripts run with System privileges on the local computer (the local
    system account you refer to), but with the privileges of the computer object
    elsewhere in the domain. If the startup scripts needs permissions, for
    example rights in a share, either grant the permissions to the computer
    object, or better yet to a domain group, like "Domain Computers", the
    computer is a member of. The startup script can be a batch file, VBScript,
    or exe.

    Logon scripts are more of a problem because they run with the user
    privileges. Most users probably cannot install programs.

    A batch file or VBScript can map a network share, copy a program, and run
    the program. There are two ways to ensure the setup is run once. One is to
    save the information in the local registry. I prefer to use what I call a
    flag file, but others in the newsgroups call a semaphore file. Batch files
    and VBScript programs can create files and check for their existence. The
    steps would be:

    1. Check for semaphore file. If it exists, quit.
    2. Map the network share.
    3. Copy the setup program to a local location (optional, for performance).
    4. Run the setup silently, perhaps with setting so it installs for all
    users.
    5. Create semaphore file as a flag so the process is not repeated.

    In a batch file I used to use something similar to this to create a flag
    file.

    echo.>c:\setup21.txt

    You can save the semaphore file locally, but I like to save them on the
    network so I can remotely monitor progress (so I know when deployment is
    complete and I can remove the code to run the setup). You just need to have
    a different semaphore file for each computer (if the deployment is to each
    computer instead of each user). You can use the NetBIOS name of the computer
    in the file name. For example, in a batch file:

    echo.>\\MyServer\MyShare\%computername%21.txt

    --
    Richard Mueller
    MVP Directory Services
    Hilltop Lab - http://www.rlmueller.net
    --



  3. #3
    Richard Mueller [MVP] Guest

    Re: installing software using startup scripts in group policy 2003


    "Richard Mueller [MVP]" <rlmueller-nospam@ameritech.nospam.net> wrote in
    message news:OojR$3QwIHA.704@TK2MSFTNGP05.phx.gbl...
    >
    > "JR" <joshransom@hotmail.com> wrote in message
    > news:95826b89-a3b1-4ef9-b518-b1867773d229@z24g2000prf.googlegroups.com...
    >> Hi,
    >> I am trying to figure out the best way to install software through
    >> group policy when I dont have a .msi file. I have been able to
    >> install .exe's using computer startup scripts in group policy. That is
    >> pretty simple. But what I dont like is that the .exe will get
    >> installed every time the startup script runs, even if it already has
    >> the software, it will just re-install it over itself.
    >>
    >> What I would like to do is create a vbs startup script that first
    >> checks if the software is already installed, and if it is, then it
    >> doesnt do anything, but if its not, then it will run the .exe file.
    >> How do I go about doing this though?
    >>
    >> If I apply the .bat file to the GPO, how do I call the .exe file from
    >> it? I would assume I need to create a network share and map a drive to
    >> it, but since startup scripts run as local system account, this wont
    >> work. If I use a logon script though, I will be able to access a
    >> share, but will still have problems since the users dont have local
    >> admin access to install the .exe.
    >>
    >> Am I just missing something? Can anybody give me a simple solution to
    >> this dilemma?
    >>
    >> Thanks,
    >> JR

    >
    > Startup scripts run with System privileges on the local computer (the
    > local system account you refer to), but with the privileges of the
    > computer object elsewhere in the domain. If the startup scripts needs
    > permissions, for example rights in a share, either grant the permissions
    > to the computer object, or better yet to a domain group, like "Domain
    > Computers", the computer is a member of. The startup script can be a batch
    > file, VBScript, or exe.
    >
    > Logon scripts are more of a problem because they run with the user
    > privileges. Most users probably cannot install programs.
    >
    > A batch file or VBScript can map a network share, copy a program, and run
    > the program. There are two ways to ensure the setup is run once. One is to
    > save the information in the local registry. I prefer to use what I call a
    > flag file, but others in the newsgroups call a semaphore file. Batch files
    > and VBScript programs can create files and check for their existence. The
    > steps would be:
    >
    > 1. Check for semaphore file. If it exists, quit.
    > 2. Map the network share.
    > 3. Copy the setup program to a local location (optional, for performance).
    > 4. Run the setup silently, perhaps with setting so it installs for all
    > users.
    > 5. Create semaphore file as a flag so the process is not repeated.
    >
    > In a batch file I used to use something similar to this to create a flag
    > file.
    >
    > echo.>c:\setup21.txt
    >
    > You can save the semaphore file locally, but I like to save them on the
    > network so I can remotely monitor progress (so I know when deployment is
    > complete and I can remove the code to run the setup). You just need to
    > have a different semaphore file for each computer (if the deployment is to
    > each computer instead of each user). You can use the NetBIOS name of the
    > computer in the file name. For example, in a batch file:
    >
    > echo.>\\MyServer\MyShare\%computername%21.txt
    >
    > --
    > Richard Mueller
    > MVP Directory Services
    > Hilltop Lab - http://www.rlmueller.net
    > --
    >


    From experience I would recommend that logon or startup scripts be
    thoroughly tested before they are deployed. I create test OU's with test
    computers and users, then apply a GPO to the test OU so I can test such
    scripts. Any script needs to run fine when you run it, when a normal user
    runs it, and also as logon or startup script. It's easy to make a mistake
    and hard to troubleshoot these scripts.

    --
    Richard Mueller
    MVP Directory Services
    Hilltop Lab - http://www.rlmueller.net
    --



Similar Threads

  1. Group Policy Startup Script Issue (Trend OfficeScan) - Autopcc
    By Flaco in forum Small Business Server
    Replies: 3
    Last Post: 23-09-2010, 10:17 PM
  2. Replies: 3
    Last Post: 03-09-2009, 07:30 AM
  3. Server 2003 Group Policy
    By deetech79 in forum Operating Systems
    Replies: 2
    Last Post: 03-07-2009, 08:48 AM
  4. Resetting Group Policy in Windows Server 2003
    By Icarusul in forum Networking & Security
    Replies: 3
    Last Post: 25-04-2009, 08:30 PM
  5. Installing software by Group Policy
    By pmela in forum Active Directory
    Replies: 2
    Last Post: 27-02-2008, 03:10 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,563,673.64362 seconds with 17 queries