|
I'm not sure if this is the best place to ask, but I've got a question for people who know Windows scripting. We have an AD setup where about half of the users are missing a piece of required software. Rather than installing this one by one, we want to run a logon script to install and configure it using elevated privileges. We're a newly setup department so we don't have SCCM or similar to push out software yet, so this will be a one-time thing. I started looking into this and found we could use VBScript to run commands, but I haven't been able to get it to do what I want. I've got the logic right, I'm just struggling with how VBScript handles certain things. In particular, I can't seem to get it to call the installer .exe file, but I also can't see any errors because it's running quiet. Is this the right approach, or is there a better/easier alternative for installing software than VBScript? Are there any resources/examples of doing this?
|
# ¿ Sep 1, 2011 19:04 |
|
|
# ¿ May 6, 2024 15:49 |
|
I'm writing a pre-commit git hook in powershell that checks the syntax of Ruby files. The command I'd like to run is:code:
quote:The term 'C:\opscode\chef\embedded\bin\erb.bat -P -x -T '-' <file path> | C:\opscode\chef\embedded\bin\ruby.exe -c' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
|
# ¿ Apr 15, 2014 17:51 |
|
SniperWoreConverse posted:Try dropping the quotes, that way your variables will be the files you want instead of a string that happens to be the path to the file. (I think, dunno about the -P -x -T stuff) C:\chef-repo>powershell.exe -ExecutionPolicy RemoteSigned -File .git\hooks\pre-commit-hook.ps1 You must provide a value expression on the right-hand side of the '-' operator. At C:\chef-repo\.git\hooks\pre-commit-hook.ps1:58 char:48 + $errors = & $erb $file | $php_bin - <<<< c $file + CategoryInfo : ParserError: ( [], ParentContainsErrorRecordEx ception + FullyQualifiedErrorId : ExpectedValueExpression
|
# ¿ Apr 15, 2014 19:44 |
|
I changed it to code:
|
# ¿ Apr 15, 2014 21:41 |