Re: Generic Script Resource

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Here's another (very obvious once you see it) solution:

In the command line parameter of the Generic application use:

cmd.exe /k abecmd /enable /all <or sharename as required>

The "/k" switch prevents CMD from exiting thus the resource's process
does not "terminate" causing the failed state.
Also clear "enable application to interact with the desktop" or you'll
see an annoying cmd window that you can't get rid of.

--
Tim

"Jasen" <Jasen@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:3A385BB7-B826-47E2-996C-68CBB567D608@xxxxxxxxxxxxxxxx
>
>
> "Tim Munro" wrote:
>
>> I'm having a similar problem. Here's how I have mine set up.
>>
>> I have created a "Generic Application" resource, to run a batch file.
>> The batch file simply invokes ABEcmd like so:
>>
>> ABECmd /Enable /All
>>
>> Now the batch file DOES run and enables ABE. However when the batch
>> file
>> terminates, the resource goes into a failed state and the resource group
>> shows up as failed. Is there some way to run a series of commands or
>> scripts
>> (that will terminate) at failover, such that the result is not a failed
>> state?
>>
>> The event log shows an Event ID of 1069
>>
>> --
>> Tim
>>
>> "Jasen" <Jasen@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
>> news:E24DD3BD-EA53-4A99-9FAE-3D25A2CB25A9@xxxxxxxxxxxxxxxx
>> >
>> >
>> > "Grumpy in Minneapolis" wrote:
>> >
>> >> I have been trying to create a script to enable access based
>> >> enumeration
>> >> on a
>> >> file share resource. I want the script to run each time the file
>> >> share
>> >> resource is recreated so that access based enumeration is used for the
>> >> file
>> >> share. I have a script that works when I run it manually, but would
>> >> like
>> >> to
>> >> run it as a generic script resource that has a dependency on the file
>> >> share
>> >> resource. I get an error message when I try create the script. Error
>> >> ID:
>> >> -2147352567 (80020009). Any help would be greatly appreciated.
>> >>
>> >> Grumpy,
>> >
>> > What extension is your script? From my experience, .bat files are
>> > clustered
>> > as generic applications and .vbs scripts are clustered as generic
>> > scripts.
>> > Try to create the generic app resource for your script, are you
>> > successful?
>> > If not, does the error change?
>> >
>> >
>>
>>
>> your batch file *MUST* end with a PAUSE this will prevent the resource
>> from entering a FAILED state.


.



Relevant Pages

  • Re: Renaming computers using Logon scripts from GPO
    ... I already used psexec for many different things, but never to rename computers, sometimes things can get a little bit complicated, but other times they're very sinple and in most times running psexec against large number of machines can save you a lot of work, at least to me:). ... Inside that batch file insert the following code "cmd", save the file and close it. ... As I told you from the beginning I never used this tool to rename computers, or perhaps you may find other tools that do the same thing with less work, but since you can use this tool to open, or copy your own scripts and then run them from remote location, does not sound impossible to automate this job. ...
    (microsoft.public.windows.server.active_directory)
  • Re: Batch files from any file name?
    ... or .cmd file? ... In Unix, I can create a batch file of any name, then run, for instance, ... no. Cmd.exe distinguishes scripts solely by file ...
    (microsoft.public.win2000.cmdprompt.admin)
  • Use Group Policy to assign computer startup scripts for 2007 Office deployment
    ... TechNet article to accomplish it using startup scripts, ... It is supposed to run the batch file listed in the ... article from Computer Configuration Windows Settings Scripts Shutdown. ... XP machines. ...
    (microsoft.public.windows.group_policy)
  • Re: UNC Path to local host
    ... Another possibility may be to use the Environment Variable called ComputerName - e.g. ... the localhost entry does for URL paths? ... machine at the beginning of the path to run some scripts - i.e. ... an option for this particular script, and editing each batch file to point to ...
    (microsoft.public.windows.server.general)
  • Re: Login Script Trouble
    ... I figured this one out with regards to why the batch file didn't ... inherit the permissions from the scripts folder. ...
    (microsoft.public.windows.server.general)