Scripting help
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
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
Answers (12)
Please log in to answer
Posted by:
dtuttle
15 years ago
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
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
Posted by:
lindsamw
15 years ago
Posted by:
airwolf
15 years ago
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.
Posted by:
lindsamw
15 years ago
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
http://itninja.com/blog/view/appdeploy:-articles:-activesetup
Posted by:
tcasey
15 years ago
Posted by:
jirvine
14 years ago
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.
Posted by:
wsteo
14 years ago
Posted by:
lindsamw
14 years ago
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.
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â€Â.
Posted by:
GillySpy
14 years ago
Posted by:
BR0ck94
14 years ago
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.
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.
Posted by:
jmoretti
14 years ago
Posted by:
KevinG
14 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.