using Regular expressions for registry path
hi friends
i creating script in 1 of steps, turns off ie esc in servers in test lab.so have write code following.
$mypath="registry::\hkey_local_machine\software\microsoft\active
setup\installed components\{a509b1a8-4b3f-8cfc-4f3a74704073}"
set-itemproperty-path$mypath-nameisinstalled-value0-force-verbose
but see registry path somehow long. want know possible use regex here shorten path?
for example suppose in path, after hklm there 1 key starts
"so", 1 ode starts "mi" , on. how can use regex
here create $mypath this:
$regpath = "registry::\hkey_local_machine\so*\mi*\ac*\in*\com*\{a50*
here writing asterisks * mean example because know, there 1
value at end of registry path starts {a50 simplicity
& avoiding typos, write initial characters.
at root of path: hkey_local_machine\ find key starts "so" & rest
characters can ( no matter because there is only 1 registry
starts "so" (software key)
thanks in advanced
- edited by maria.holme1 monday, december 15, 2014 7:08 am
Comments
Post a Comment