Re: My custom actions in the state restore phase are not working?

Tech-Archive recommends: Fix windows errors by optimizing your registry



I must be missing something becasue I cannot get a dos command to run locally
on through sms assinged packages, batch files or custom actions.

Thanks
chad B

"JayBee" wrote:

> That script works fine in my environment to add a DOMAIN\Group to the
> MACHINE\Administrators group. The script could be changed to add individual
> users to the group. This script runs during the State Restore phase of OSD.
>
> However you could always use group policy to control user/group membership
> of the local Administrators group.
>
> Deleting a folder from a workstation would be something like writing a
> batch/command file to delete the folder you want. Then either assigning the
> batch file as a custom action in one of the OSD phases or making the batch
> file into a package that you could assign to your users.
>
> It really depends on what you want to achieve as to how you go about doing
> it. Is it always going to be actions performed on machines during OSD or do
> you want to manage all machines?
>
> "Chad Borsheim" <ChadBorsheim@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:7C94C15B-1128-4BD0-8DBF-E78A050C7827@xxxxxxxxxxxxxxxx
> > Script did not work.
> >
> > What I really need to know is how do I execute a dos command through SMS
> > on
> > a local pc. Do I have to use a scripting to do this.
> >
> > an example would be I want to del a folder on everyone workstation or
> > add/remove a user from the local admin group.
> >
> > Thanks
> > Chad
> >
> > "JayBee" wrote:
> >
> >> Try this VBS script for adding groups.
> >>
> >> --------------------------------------------------------------------------------------------
> >> strDomain = "Your Domain Name Here"
> >>
> >> strDomainGroup = "WinNT://" & strDomain & "/Domain Group Here,group"
> >>
> >> 'Wscript.Echo "strDomainGroup: " & strDomainGroup
> >>
> >> Set objDomainGroup = GetObject(strDomainGroup)
> >>
> >> Set objNetwork = CreateObject("Wscript.Network")
> >> strComputer = objNetwork.ComputerName
> >>
> >> Set objLocalGroup = GetObject("WinNT://" & strComputer &
> >> "/Administrators,group")
> >>
> >> If Not objLocalGroup.IsMember(objDomainGroup.AdsPath) Then
> >> objLocalGroup.Add(objDomainGroup.AdsPath)
> >> End If
> >> -------------------------------------------------------------------------------------------
> >>
> >> "Chad Borsheim" <ChadBorsheim@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> >> news:535267E2-B617-45E9-9516-368AEC30D61F@xxxxxxxxxxxxxxxx
> >> >I have created a custom action in the state restore area for a OSD Cd
> >> > deployment.
> >> > OS I am using is Win XP SP2
> >> >
> >> > The action I want to run is to add a Domain group to the local admin
> >> > group.
> >> > The command I am using in the custom action is the following.
> >> > c:\windows\systems32\net use localgroup administrators infosys /add
> >> >
> >> > I am also having trouble tracking down a error code in any of the log
> >> > files
> >> > located in the MININT folder. Where does the custom action commands get
> >> > logged to.
> >> >
> >> > Also what is the correct way or preferred way to execute a dos command
> >> > on
> >> > the local pc through a sms package or etc...
> >> >
> >> > Thanks
> >> > Chad Borshiem
> >> >
> >>
> >>
> >>
>
>
>
.



Relevant Pages

  • Re: Premature end of script headers: cgi-bin .bat file problem with apache 2.0 on Win XP
    ... I'm not familiar with running batch files as cgi scripts. ... Forgot to tell the script how to execute the code ... ... If java or batch files are cgi executables ... ...
    (comp.infosystems.www.authoring.cgi)
  • Re: Execute a batch file on remote host
    ... I'm trying to incorporate code ... We have batch files to do this but not all ... 'Richard Mueller [MVP Wrote: ... Is there a way to this via Cscript?do I need to write a vbs script? ...
    (microsoft.public.windows.server.scripting)
  • Batchrun 4.2
    ... Batchrun is a graphical script creation tool that eliminates the need ... Batchrun batch files can be ... Internal commands: Run, Copy, Rename, Makedir, Delete, DelTree, End ...
    (comp.software.shareware.announce)
  • dot deploy vbs wscript custom action problem
    ... that calls a vbs script. ... I'm attempting to provide some Custom Actions ... ' Parse Command Line (Expect INSTALL or UNINSTALL) ...
    (microsoft.public.vsnet.general)
  • Re: The system cannot find the batch label specified
    ... After this a proper script language would be far superior. ... You can use debuggers to step through your program, ... It is much easier to write well-structured scripts than batch files. ...
    (microsoft.public.win2000.cmdprompt.admin)