Simple Fixlet Authoring Help Needed

(imported topic written by tscott91)

I know this will be very simple for most of you here so please bare with me…

I want to copy a folder to a local PC and then copy a file into the windows startup that points to a file in said folder…

Zipped folder? of BGInfo*.* to unzip to C:\BGInfo*.*.

Put start_bginfo.bat into C:\Documents and Settings\All Users\Start Menu\Programs\Startup

I would like it if the folder was passed to each relay server and then copied to the local workstations… I’m still pretty new to BigFix and haven’t done the training yet as it’s not offered very often…

Thanks

(imported comment written by BenKus)

Hi tscott,

I think you want to do this:

  1. Put all the files you want in a folder on your console.

  2. Use the software distribution wizard and select the folder with the files.

  3. Go through the wizard until you get to the end and click on the actionscript tab.

  4. Edit the action to remove the “run” or “wait” lines (since you don’t need to execute anything).

  5. Add the actionscript commands:

waithidden cmd.exe /C mkdir "C:\BGInfo"
waithidden cmd.exe /C copy /Y “__Download*.*” "C:\BGInfo"
waithidden cmd.exe /C copy /Y “__Download\start_bginfo.bat” “C:\Documents and Settings\All Users\Start Menu\Programs\Startup\start_bginfo.bat”

Note that I assumed the start_bginfo.bat was in the BGinfo folder… I didn’t test this so let me know if you see any failures…

Ben

(imported comment written by tscott91)

Dude… You are the freaking MAN!!!

Thanks so much for taking the time to do this…

Tom

(imported comment written by SystemAdmin)

Just a little something to add onto what Ben wrote. Since MS changed the location of where user profiles are stored in Vista/7, you may want to change the one line to this:

waithidden cmd.exe /C copy /Y “__Download\start_bginfo.bat” “{value of variable “ALLUSERSPROFILE” of environment}\Start Menu\Programs\Startup\start_bginfo.bat”

Just adds a bit more flexibility to the fixlet.

(imported comment written by thesurg3on91)

Hi,

Does %systemroot%\ work as an environment variable in bigfix? i would rather put this in the windows directory instead of the root of C

(imported comment written by thesurg3on91)

also what happens if this folder already exists? will it overwrite?

(imported comment written by cstoneba)

yes, systemroot works. These are the most common ones I use:

q: value of variable “systemroot” of environment

A: C:\WINDOWS

q: value of variable “ProgramFiles” of environment

A: C:\Program Files

q: value of variable “Userprofile” of environment

A: C:\Documents and Settings\xxxxxx

If the folder already exists, then the mkdir will probably fail. To fix this, you could first put in an action to delete the folder, or put some relevance into the fixlet that says it is not applicable if the folder already exists wiithin the C:\windows\ folder

(imported comment written by Raja9109)

How to wrte Script for searching for strings inside a file Pls help me…

(imported comment written by NoahSalzman)

There are many threads in this Forum on that topic. Do this search in Google:

site:forum.bigfix.com search strings file

(imported comment written by Raja9109)

Thanks Noah I got it