Ok. i've tried but i can't get this to work. So i'm asking for help.

I have a batch file that sets power configuration on an xp desktop. run locally, it works.

What's the best way to run this using the scripting module. ideally, i'd like to have it run at user login.

I've tried uploading the batch file as a dependency. Then i have set verify - nothing, on success- Launch “c:\windows\system32\cmd.exe” with params “ISPSpowercfg.bat”.

that's it. no joy though.

When i try to run it using the run now tool, it just sits in the "run now status" queue. under pushed 1/1 and completed 0/1. In fact there about 85 "script runs" for various things and all have pushed 1/1 and completed 0/1. Maybe somethings wrong with the kbox?

thanks for the help.

Matt
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
If you have the Kbox script drop you batch file in the startup folder it will run... but if you do this it will run at every login....


I know in the registry there is a "run once"(ill see if I can link to it) - this will allow you to have something ... well run once at boot up. If I were you I would have you batch file make a log to confirm that it ran, in case you need to a 2nd trip, you know who would have it and who wouldn't
Answered 10/09/2009 by: dtuttle
Purple Belt

Please log in to comment
0
In the scripting, just launch the batch file directly. Problem with that though, the kbox will run it under a different user context. So if its user specific settings, would probably want to read up on the registry Active Setup? I think its called. I use to do a lot of stuff with that and autoit.
Answered 10/15/2009 by: lindsamw
Orange Senior Belt

Please log in to comment
0
Along the same lines as lindsamw's response, you an use AutoIT to write a wrapper to perform the registry modifications under a specific profile using RunAs. If you only want this to run once, you can have the logon script check for a custom registry key that it writes after successfully modifying the power settings.
Answered 11/24/2009 by: airwolf
Tenth Degree Black Belt

Please log in to comment
0
ya airwolf I used autoit to write my Active Setup registry keys. I don't use Active Setup enough its a handy trick for making sure something runs against a user, any user who ever logs into the box. Its easy to update too :) Theres a nice little article on it even here on appdeploy.com

http://itninja.com/blog/view/appdeploy:-articles:-activesetup
Answered 12/03/2009 by: lindsamw
Orange Senior Belt

Please log in to comment
0
Have you tried just copying the contents of your batch file into a "Run Batch File..." step in the "On Success" section?

If you are going to include your batch file as a dependency your parameter is going to have look something like: $(KACE_DEPENDENCY_DIR)\ISPSpowercfg.bat
Answered 12/04/2009 by: tcasey
Senior Yellow Belt

Please log in to comment
0
In my scripting pane, under Verify, Step 1, I select "Run a batch file"and then copy the contents of my tested and working batch file into the code area. I don't select anything else. Then I just deploy that script. KBOX will run it silently so the user doesn't see a batch window. However, if you have other scripts that are not deploying, you may have other issues.
Answered 01/13/2010 by: jirvine
Yellow Belt

Please log in to comment
0
Power management will be available in 5.1. Maybe, you do not need to write the script anymore.
Answered 02/19/2010 by: wsteo
Senior Yellow Belt

Please log in to comment
0
Was just going over some threads and noticed this, you would want the batch file launched on remediation and the verify step to always fail, or the "launch a program" option. Although that can be finicky with dos commands and things of that nature (including batch files). Check to make sure your bat file is getting downloaded to the clients. You can check that dependancies are getting downloaded C:\Program Files (x86)\KACE\KBOX\packages\kbots (drop the x86 part if your running on 32bit windows).

One other thing I would mention here, check out powercfg.exe ( http://technet.microsoft.com/en-us/library/cc748940(WS.10).aspx ) for configuring power options. Using powercfg.exe you can also make it a GPO that applies to users.

ORIGINAL: msandona



I've tried uploading the batch file as a dependency. Then i have set verify - nothing, on success- Launch “c:\windows\system32\cmd.exe” with params “ISPSpowercfg.bat”.


Answered 02/25/2010 by: lindsamw
Orange Senior Belt

Please log in to comment
0
5.1 will also have the ability to specify a different RUN AS account for scripts.

But today scripts can update the HKEY_CURRENT_USER if a user is logged in so you set the script to run when a user is logged in and then modify the RUNONCE key for that user.
Answered 02/25/2010 by: GillySpy
Seventh Degree Black Belt

Please log in to comment
0
I am also having trouble with this. I have tried everything I can think of such as selecting "launch a program" "run a batch file" "attach the batch file as a dependency and then attempt to launch it"
Each time I'm stuck with pushed: 1/1 completed 0/1.

I don't believe that this should be this difficult. The batch file runs perfectly fine locally. I even tried the schtasks trick to runas an admin.
Answered 05/07/2010 by: BR0ck94
Yellow Belt

Please log in to comment
0
Gerald, Power Mgmt and scripting with the ability to run as the local consol user are two things I need to be able to do soon with the Kbox. I'm very excited to see that these features wil be added to v5.1! Do you have an estimated timeline for its release?

Thanks!

-Joe Moretti
Answered 05/14/2010 by: jmoretti
Yellow Belt

Please log in to comment
0
Add ISPSpowercfg.bat as a dependency

Launch a program...
Directory: $(KACE_DEPENDENCY_DIR)
File: ISPSpowercfg.bat

Check : Wait for startup

Parameters: *** Leave this blank
Answered 05/16/2010 by: KevinG
Purple Belt

Please log in to comment
Answer this question or Comment on this question for clarity