Re: administrative rights in Batch file

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Markus (mb-2839_at_web.de)
Date: 04/13/04

  • Next message: Mike Brown - Process Manager: "Re: tar or zipping files to which you have no explicit access?"
    Date: 13 Apr 2004 08:22:35 -0700
    
    

    "Micah" <mcollins@deltatg.com> wrote in message news:<c01b01c40c38$e25b1b60$a601280a@phx.gbl>...
    > We currently only allow our end users Power user rights on
    > there workstation. I have a small update (for a CA
    > product) I want to deploy to everyone through their batch
    > file, unfortunatly they need administrative privilages.
    > Does any know the command to set that task to be installed
    > as administrator?

    Hi micah,
    there are several options for supplying a batch file (or any program)
    with administrative privileges:
    1. create a scheduled task on the computer + supply account name +
       password the task should use (manually or using XP command
       schtasks /create /u [Domain\]Account /p password - see
       online help)
    2. use RunAs.exe (MS) + entering the local admin's password
       manually
    3. combine the the third party freeware tool SANUR.exe with
       RunAs which allows to submit user account AND password (see
       http://www.commandline.co.uk/sanur/index2.html)
    4. if you can be sure the computer is online: on your admin
       client run "psexec \\targetcomputer exefile arguments" or
       "psexec \\targetcomputer cmd.exe /c batchfile arguments"
       (see www.sysinternals.com)
    5. use a software distribution tool like SMS, OnCommand,
       NetInstall, Novell ZenWorks etc.
    7. use the Resource Kit tool "su.exe" (which didn't work for me !?)
    6. Distribute a batch file etc. using Active Directory Group Policy
       feature "Software installation" + a .ZAP file (see
    OR (which I chose before + in addition to a professional
    software distribution solution tool):
    7. Run a start or shutdown script via Active Directory Group Policy
       (everyone group must have read access to \\server\share\subdir\
       setup.exe or whatever).
       To make sure only specific clients will start the installation
       and only ONCE:
       - Create a directory structure like \\server\share\autoinstall
         \clients\computer1, computer2 and so on
       - Create an installation batch file install.cmd + copy it to the
         corresponding client directories and
       - Create an AD start script like
             REM CheckAutoInstall.cmd
             set ADInstPath=\\server\share\autoinstall\clients\%computername%
             if not exist %ADInstPath%\install.cmd goto :EOF
             call %ADInstPath%\install.cmd
             del %ADInstPath%\install.cmd


  • Next message: Mike Brown - Process Manager: "Re: tar or zipping files to which you have no explicit access?"

    Relevant Pages

    • Re: Win 98 client WSH "Can not find script file"
      ... The command processor runs a batch file one line at a time. ... as cscript or wscript is launched, the command processor goes onto the next ... > extra 15 second pause before executing the VBS script. ... >>network client) before the Windows client ever gets going. ...
      (microsoft.public.windows.server.scripting)
    • Re: Script Execution Over Network
      ... we know that the client has the latest version of the ... more bandwidth is required to copy a program than to execute the program. ... trouble running logon scripts over the network, ... If reading the logon batch file on a line-by-line basis is a speed/bandwidth ...
      (microsoft.public.scripting.vbscript)
    • Re: Win 98 client WSH "Can not find script file"
      ... My theory is that the client unmaps z: before wscript ... more statements to the batch file after the VBScript program is called. ... >> REM ** Execute VBScript logon script program. ...
      (microsoft.public.windows.server.scripting)
    • Re: Local Administrator Account Password
      ... Since it is only a batch file, ... the DP and package source folders to allow only the Advanced client access ... If that doesn't break software distribution, ... Or even sent from the site server to the distribution point or ...
      (microsoft.public.sms.admin)
    • Re: Script Execution Over Network
      ... a remote batch file is executed that checks if the ... we know that the client has the latest version of the ... However, if they do not, the latest version of the script is ... Of course there is the bandwidth required to copy the logon script. ...
      (microsoft.public.scripting.vbscript)