To have internet and the network access of your MacBook Air, which lacks of ethernet, and my trials to add a virtual adapter failed, simply add 2 virtual network devices to your machine:
How to add Windows firewall rules with Powershell
This example adds port rules and an application rule for UltraVnc, after making a backup of firewall’s configuration:
$date = Get-Date -format "yyyyMMdd"
$exportfilename = "C:\temp\"+ $date + "WFconfiguration.wfw"
netsh advfirewall export $exportfilename
netsh advfirewall firewall add rule name="VNC1" dir=in action=allow protocol=TCP localport=5900
netsh advfirewall firewall add rule name="VNC2" dir=in action=allow protocol=TCP localport=5800
netsh advfirewall firewall add rule name="UltraVNC" dir=in action=allow program="C:\Program Files (x86)\uvnc bvba\UltraVnc\winvnc.exe"
Reference:http://www.windowsitpro.com/article/windows-server/windows-firewall-netsh-commands-142324
Import mybucket.co bookmarks via API
I’m starting using mybucket.co as my bookmarking solution due it simplicity, intensive and easy use of tagging and easy to use API apart other features. So my first issue is a way to import all my existing bookmarks in my browser to mybucket and I coded this ruby script that parses a html file extracting urls which are uploaded to mybucket auth by api key
require "uri" require "net/http" bookmarks_file_name = 'bookmarks.html' mybucket_api_key = '[api_key for your bucket]' class Bookmark def url @url end def url=(url) @url = url end def title @title end def title=(title) @title = title end end File.open(bookmarks_file_name, 'r') do |f| bookmarks =[] while line = f.gets singlebookmark = Bookmark.new urlmatch = line.match(/<a href="([^" titlematch="line.match(/([^" )="" ]*)?="">]*)<\/A>/) if urlmatch singlebookmark.url = urlmatch[1].to_s singlebookmark.title = titlematch[1].to_s bookmarks << singlebookmark end end bookmarks.each do |b| params = {'api_key' => mybucket_api_key, 'href' => b.url, 'source' => '', 'type' => '', } x = Net::HTTP.post_form(URI.parse('http://mybucket.co/submit'), params) puts x.body puts "Added link: #{b.url}" end puts "--Summary:--" puts "File - #{bookmarks_file_name}" puts "Number of bookmarks - #{bookmarks.count}" end
Set Windows license key and activate it by command line
If you need to set a corporate license key for many PC this can be very useful in order to automate the process of activation:
slmgr.vbs -ipk [license key] slmgr.vbs -ato
Howto migrate a VBox harddisk to Vmware vmdk
VBoxManage clonehd source.vdi target.vmdk –format VMDK
[1]http://www.virtualbox.org/manual/ch08.html#vboxmanage-clonevdi
link navigate to url on an entire Flash stage with AS3
The accurate way to insert a link to an entire flash stage as a banner or animated logo is adding a listener to MouseEvent.CLICK in the whole stage:
var url:URLRequest = new URLRequest("[dest URL]");
stage.addEventListener(MouseEvent.CLICK, onStageClick);
function onStageClick(event:MouseEvent):void
{
navigateToURL(url, "_self");
}
PC inventory information gatherer v1
I use this script (Powershell) in order to gather information about a PC to be registered in my maintain system inspired on the New Delhi PowerShell User Group and helped by consulting reference on SS64:
$Date = Get-Date -format "yyyyMMdd"
$ComputerName = (Get-Item env:\Computername).Value
$FolderName = $Date + $ComputerName
new-item -path . -name $FolderName -type directory
$ExportFile = ".\" + $FolderName + "\installedsoft.txt"
Get-WmiObject -ComputerName $ComputerName -Class Win32_Product | select Name | Out-File $ExportFile
$ExportFile = ".\" + $FolderName + "\licences.html"
.\ProduKey.exe /shtml $ExportFile
$ExportFile = ".\" + $FolderName + "\cpuz"
.\cpuz\cpuz_x32.exe -html= $ExportFile
$ExportFile = ".\" + $FolderName + "\logicalDisk.txt"
Get-WmiObject win32_logicalDisk -ComputerName $ComputerName | select DeviceID,VolumeName,@{Expression={$_.Size /1Gb -as [int]};Label="Total Size(GB)"},@{Expression={$_.Freespace / 1Gb -as [int]};Label="Free Size (GB)"} | Out-File $ExportFile
$ExportFile = ".\" + $FolderName + "\systemInfo.txt"
systeminfo.exe | Out-File $ExportFile
$ExportFile = ".\" + $FolderName + "\mac.txt"
getmac | Out-File $ExportFile
It depends on CPUZ and ProduKey executables on the same folder.
Forzar el display language a todos los usuarios
Instalando windows con una copia en inglés y luego instalando el paquete de idioma español, por defecto al crear usuarios aparece como lenguaje el inglés, incluso especificando en las opciones regionales y de idioma, tanto los mensajes e interfaces de Windows como los menús de Internet Explorer aparecen en inglés. Para solventarlo, usando políticas de grupo se especifica que el idioma de interfaz sea el español:
gpedit.msc
Ir a Configuración del equipo>Plantillas administrativas> Panel de control>Configuración regional y de idiomas > Limta los idiomas de la interfaz de usuario que Windows usa para todos los usuarios que hayan iniciado sesión.
Activar la directiva y eligiendo en las opciones Limitar usuarios al siguiente idioma: Español
Importando el archivo de datos y autocompletado de contactos en Outlook 2010
Outlook, en su versión 2010 ha cambiado la localización de almacenamiento de sus archivos de datos (PST), siendo ahora localizados en Documents\Outlook Files. Otro cambio es que no basta copiar el archivo Outlook.nk2 a la ruta %appdata%\Microsoft\Outlook para recuperar La lista de Autocompletar de contactos al escribir en el campo «Para:» sino que para que se haga efectiva la importación, luego de la copia del archivo hay que ejecutar Outlook con el modificador /importnk2:
outlook.exe /importnk2
Referencias: