RegEx and capturing groups

hi.
i'm trying to use the capturing groups to extract substrings.
this is the data format: MTWTFSS@2005-03-19
and this my regex: Pattern.compile("((\\p{Upper}|-){7})@(19|20)\\d\\d-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])");
i want to extract the substring before the @. i have set the capturing group, but i always get an error:
java.lang.IllegalStateException: No match found
at java.util.regex.Matcher.group(Matcher.java:353)
at vdrremotecontrol.VDRTimer.(VDRTimer.java:93)
at vdrremotecontrol.VDRRemoteControl.getTimersFromVDR(VDRRemoteControl.java:628)
at vdrremotecontrol.VDRRemoteControl.loadSettings(VDRRemoteControl.java:855)
at tvbrowser.core.plugin.JavaPluginProxy.doLoadSettings(JavaPluginProxy.java:191)
... 5 more
what's the right way to set the capturing group?
greetings, henrik

me again :-)
// MTWTFSS@2005-03-19
Pattern repeatingAt =
tingAt =
Pattern.compile("((\\p{Upper}|-){7})@(19|20)\\d\\d-(0[
1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])");
if(dayPattern.matcher(day).matches()) {
repeating = false;
this.day_of_month = Integer.parseInt(day);
} else if(datePattern.matcher(day).matches())
tches()) {
repeating = false;
this.day_of_month =
of_month =
Integer.parseInt(datePattern.matcher(day).group(3));
} else
} else if(simpleRepeating.matcher(day).matches()) {
repeating = true;
repeating_days = determineDays(day);
} else
} else if(repeatingAtShort.matcher(day).matches())
repeating = true;
String days = day.substring(0,
bstring(0, day.indexOf("@"));
repeating_days = determineDays(days);
} else if(repeatingAt.matcher(day).matches())
tches()) {
repeating = true;
Matcher matcher =
matcher = repeatingAt.matcher(day);
System.out.println("#"+day+"#");
System.out.println(matcher.groupCount());
System.out.println(matcher.group(1));
String days = day.substring(0,
bstring(0, day.indexOf("@"));
repeating_days = determineDays(days);
}output is:
[java] #MDMDFSS@2005-06-10#
[java] 5
[java] SCHWERWIEGEND: Die Einstellungen des
n des Plugins "Video Disc Recorder" konnten nicht
geladen werden.
[java]
java]
(/home/henni/.tvbrowser/java.vdrremotecontrol.VDRRemot
eControl.prop)
[java] util.exc.TvBrowserException: Die
: Die Einstellungen des Plugins "Video Disc Recorder"
konnten nicht geladen werden.
[java]
java]
(/home/henni/.tvbrowser/java.vdrremotecontrol.VDRRemot
eControl.prop)
[java] at
a] at
tvbrowser.core.plugin.JavaPluginProxy.doLoadSettings(J
avaPluginProxy.java:197)
[java] at
a] at
tvbrowser.core.plugin.AbstractPluginProxy.loadSettings
(AbstractPluginProxy.java:114)
[java] at
a] at
tvbrowser.core.plugin.PluginProxyManager.activatePlugi
n(PluginProxyManager.java:505)
[java] at
a] at
tvbrowser.core.plugin.PluginProxyManager.activateAllPl
uginsExcept(PluginProxyManager.java:459)
[java] at
a] at
tvbrowser.core.plugin.PluginProxyManager.init(PluginPr
oxyManager.java:220)
[java] at
a] at tvbrowser.TVBrowser.main(TVBrowser.java:307)
[java] Caused by:
d by: java.lang.IllegalStateException: No match
found
[java] at
a] at
java.util.regex.Matcher.group(Matcher.java:353)
[java] at
a] at
vdrremotecontrol.VDRTimer.<init>(VDRTimer.java:94)
[java] at
a] at
vdrremotecontrol.VDRRemoteControl.getTimersFromVDR(VDR
RemoteControl.java:628)
[java] at
a] at
vdrremotecontrol.VDRRemoteControl.loadSettings(VDRRemo
teControl.java:855)
[java] at
a] at
tvbrowser.core.plugin.JavaPluginProxy.doLoadSettings(
JavaPluginProxy.java:191)
[java] ... 5
... 5
more[/cod
e][u][/u]
This example executes fine.
        String expression = "((\\p{Upper}|-){7})@(19|20)\\d\\d-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])";
        String data = "MTWTFSS@2005-03-19";
        Pattern p = Pattern.compile(expression);
        Matcher m = p.matcher(data);
        while (m.find()) {
            System.out.println(m.group(1));
        }        /Kaj

Similar Messages

  • Regular expressions and capture groups

    Hi everyone :)
    Is there a way to override the default behaviour of capture groups in regular expressions? More specifically I want to override this:
    "The captured input associated with a group is always the subsequence that the group most recently matched."
    For example, if I have a string that is this:
    * <comment one>
    * <comment two>
    <some text>
    I have a pattern of the form "(.*)(/\\*.*\\*/)(.*)" which will match multi-line comments. I have also specified the flag DOTALL so that the predefined character class '.' matches over line-breaks.
    If I apply this pattern to the above string I get comment two being captured, not comment one. This is because of the stipulation that I cited above.
    I need to be able to capture only the first match, and prevent the capture group from being overwritten by more recent matches.
    Is this possible? Any ideas?
    Thanks in advance.
    Kind regards,
    Ben Deany

    Is there a way to override the default behaviour of
    capture groups in regular expressions? More
    specifically I want to override this:No, but you don't need to.
    I have a pattern of the form "(.*)(/\\*.*\\*/)(.*)"
    which will match multi-line comments.Comment two is captured by the second group because comment one is eaten by the first group. Use the reluctant quantifier "*?" on the . in the first group instead of the greedy quantifier "*" to get what is apparently the behavior you want. Then the first group will contain nothing, the second group will contain comments one and two, and the third group will contain the following text.
    .* is a very powerful thing to use. It will match everything in its path, guzzling text like moonshine at Mardi Gras. The only reason it doesn't match comment two as well is because then the expression as a whole would not match.
    The parentheses surrounding the first and third groups are not needed (unless you want to use group methods on them too).

  • Regex capture groups in IdocScript

    Hello,
    I'm looking for a way to print out capture groups as part of a regex match using Idoc Script. Here's a basic example of what I'm trying to do.
    HTML:
    <p>This is a paragraph of text</p>
    Idoc Script:
    <!--$r = wcmElement("regexText")-->
    <!--$if regexMatches(regexText, "<p>(.*)</p>")-->
    <!--$firstParagraph = $1-->
    <!--$endif-->
    Essentially, what I'm trying to do is store the value between the <p></p> tags in a variable. I know there's a syntax error in my above script, but the IdocScript documentation does not touch on capture groups at all, so I'm left to guess on what I know from other scripting languages.
    Thanks,
    Josh

    <p> tags are escaped and ssIncludeXML will not do the trick.
    you can try somethign like..
    <!--$myHTMlMarkup =wcmElement("regexText")-->
    <!--$startindex= strIndexOf(myHTMlMarkup,"&gt;p&lt;")-->
    <$loopwhile startindex+ 1 > 0$>
         <!--$stopIndex= strIndexOf(myHTMlMarkup,"&gt;/p&lt;")-->
         <!--$para = strSubstring(myHTMlMarkup,startindex + 9,stopIndex) -->
         <!--$myHTMlMarkup=strIndexOf(myHTMlMarkup,stopIndex + 10)-->
         <!--$startindex= strIndexOf(myHTMlMarkup,"&gt;p&lt;")-->
    <!--$endloop-->

  • Reg Exp and non capturing groups

    Hello,
    I got problems with the non capturing groups in java.
    I want to extract the 2nd ocurenc of a given patern from a string.
    This ist the string =" 12.12.2004 [Logging] [Success] ### More text [Perhaps more brackets here] some text"
    Now I want to extract the 2nd occurecy of the brackets with an unknow text pattern.
    I tried this pattern = "(?:\[\w+\] )\[w+\]"
    I thought that the non-capturing pattern helps me to find the first pair of [] brackets. the capturing group should give me want i want.
    But I still get the result: [Logging] [Success]"
    Even if I try just to use only the non cpaturing patern "(?:\[\w+\])" I still get an output from Matcher.group() which I didnt expect here!
    What I am doing wrong?
    Thanx for any help

    Sorry, sabre150 I just missed it to answer you.
    I have placed it into eclipse in a scrapbookpage into the following code:
    final String regexp = "[^\\]]*\\[[^\\]]*\\]\\s*(.*)";
    final String zeile = " 12.12.2004 [Logging] [Success] ### More text [Perhaps more brackets here] some text";
    java.util.regex.Pattern pattern = java.util.regex.Pattern.compile(regexp);
    java.util.regex.Matcher matcher = pattern.matcher("");
    matcher.reset(zeile);
    System.out.println("Found: "+matcher.find());
    System.out.println(matcher.group());Output was:
    Found: true
    12.12.2004 [Logging] [Success] ### More text [Perhaps more brackets here] some text
    and not what I wanted
    "[Success] ### More text [Perhaps ...."
    I dont know what I am doing wrong.
    I thought I could solve it with the non-capturing group, but they doesnt seem to work.
    My question to the non-capturing group is:
    I have this pattern [code]"(?:.*)".
    This pattern will probably match the String "Hello Mary!"
    But it should not capture the string.
    So matcher.find() is true, but matcher.group() is the whole string and nit null, like I expected.

  • Regex Matching on Capture groups

    I have this regular expression:
    (throw|give)(?: ([1-3][A-B]))+
    given this input:
    throw 1A 2C 1B 3C
    How would I capture each of the items 1A 2C 1B and 3C?
    In the above expression I have 3 capture groups
    group0: whole expression
    group1: (throw|give)
    group2: ((?:1|2|3)(?:A|B|C))
    The problem is that when I execute the find() on my matcher it tries matching the whole expression at once! That means for the group 2 I always get the last match only:
    group0: throw 1A 2C 1B 3C
    group1: throw
    group2: 3C
    How do I get the matcher to only match on ONE capture group at a time?! Is it possible? I thought that was the purpose of the find() method. The documentation says find() matches on a "subsequence", yet I can only get it to match on the whole expression. Plus, I don't see where "subsequence" is defined in the documentation. What am I missing here?

    "Attempts to find the next subsequence of the input sequence that matches the pattern." (my emphasis)
    find() matches the whole regex, not components thereof. What you need to do is use one regex to match the whole expression and return a capture group with the digit-letter pairs, and then use another regex on that capture group to extract the pairs one at a time.*******************************************************************************
    Answer provided by Friends of the Water Cooler. Please inform forum admin via the
    'Discuss the JDC Web Site' forum that off-topic threads should be supported.

  • PS Script to find the list of users and the groups in a Workgroup server

    Hi There, could you please explain on how to get a complete list of local users and local groups in a "Workgroup" server to which they belong to using Powershell. I'm able to get the users list but couldn't find any help in finding
    the script to find to which localgroup the user belong to. Anticipating your response. Also let me know the cmdlet for Win2k3 servers to find the same.

    Here's some code from David Pham (don't remember wher I fund this code):
    Trap {"Error: $_"; Break;}
    Function EnumLocalGroup($LocalGroup)
    $Group = [ADSI]"WinNT://$strComputer/$LocalGroup,group"
    "Group: $LocalGroup"
    # Invoke the Members method and convert to an array of member objects.
    $Members= @($Group.psbase.Invoke("Members"))
    ForEach ($Member In $Members)
    $Name = $Member.GetType().InvokeMember("Name", 'GetProperty', $Null, $Member, $Null)
    $Name
    # Specify the computer.
    $strComputer = gc env:computername
    "Computer: $strComputer"
    $computer = [adsi]"WinNT://$strComputer"
    $objCount = ($computer.psbase.children | measure-object).count
    $i=0
    foreach($adsiObj in $computer.psbase.children)
    switch -regex($adsiObj.psbase.SchemaClassName)
    "group"
    { $group = $adsiObj.name
    EnumLocalGroup $group }
    } #end switch
    $i++
    } #end foreach

  • Install Updates task not working during Build and Capture in SCCM 2012

    Working with a new SCCM 2012 installation.
    We are trying to get a Build and Capture TS to install all updates for Win7SP1.
    All packages are deployed to DP, build and cap machine is in a collection with all updates deployed to it. Agent installation parameters include "SMSMP" "SMSSLP" parameters. Machine is not being attached to the domain during OS install. 
    Updates can be pushed to existing domain machines, so obviously the updates themselves are working.
    The task sequence works correctly to install the image, but "Install Updates" task just sits there and eventually times out. (No indication of updates being installed.) If this task is working, shouldn't I see a Downloading Updates progress bar, or was that
    eliminated from 2012?

    Same issue for me except I'm running 2012 R2 my B&C runs forever on Install Software Updates, eventually just rebooting and coming back to the login screen of Windows 7 without ever finishing the Install Updates.
    Been working on it litteraly for weeks.
    1- Tried adding .Net 4.52 as an application installation thinking maybe it would resolve the issue
    2- Tried installing via Run Command Line + DISM all hotfixes that require 2 reboots as per (https://support.microsoft.com/en-us/kb/2894518)
    3- Tried to simply REMOVE the same hotfixes from my Software Update Groups alltogether.
    4- Injected all applicable software updates through Offline Servicing in the SCCM Console (Schedule Updates) on the Windows 7 DVD wim file. That way my logic was that once it would hit the Software Updates, there would be a lot less to install.
    I'm at the point where I had to open a case with Microsoft Premier Support as of yesterday. So, nothing new to report yet. But yes, this is a true pain in the ***.
    For the sake of comparison, I am running 4 Update Groups: one containing patches up to 2012. Another one for 2013, 2014 and 2015. I have patches for Windows 7 + Office of all categories except Service Packs.
    If someone has any ideas, feel free to chime in. 

  • Administrator Account Disabled after sysprep and capture task sequence in MDT 2010

    Hi
    We are currently migrating from Windows XP to windows 7.  As part of our migration we have 5 base Images (for different areas of the business)
    Here is what we are doing:
    Create a reference machine with the source files for windows 7 Pro x86
    Install applications as part of the Task sequence to build a reference machine.
    Make the updates to the machine - required for the build.
    Run  the Sysprep and capture template to take the capture of the Reference machine.
    Import the Capture into the Operating system folder within MDT2010
    Create a task sequecne to deploy the image.
    Deploy the Image for Testing.
    Deploy the image to a machine
    Update the machine with the defects
    Re Capture the deployed machine and call it ver2.wim
    re deploy ver2.wim
    Testers test
    Defects logged + additional user settings to be captured in the build
    Re capture and sysprep runs says the capture has been succesful however after a reboot the administrator account is disabled.
    We cant seem to capture anything from here on in.  Nothing has been changed in the unattend.
    Autologon is set to enable the administrator account and the password is set to blank as this is then handled by policy when the machine is joined to the domain - we have not enabled the unattended join to the domain at this point in time but it will be
    for deploying the image.
    Have we got our image strategy wrong? does the same rule apply about sysprep running more than 3 times on a single machine if it is captured and redeployed after a sucessfully sysprep to the same hardware or even different hardware.

    Hi,
        One of the things Sysprep/WAIK do is disable the adminsitrator account.
        You mentioned that you are setting the autologing to the administrator account and that you are setting it with a blank password, you can add a simple command in to sysprep's xml to reenable the account:
    <component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <RunSynchronous>
    <RunSynchronousCommand wcm:action="add">
    <Order>1</Order>
    <Path>net user administrator /active:yes</Path>
    </RunSynchronousCommand>
    </RunSynchronous>
    </component>
       Give it a try and let us know .
    Best Regards, Marianok
    Saludos, MarianoK
    Disclaimer: While I do my best to make sure everything I post is accurate and safe, I’m certainly not perfect so all this information is provided "AS IS" with no warranties or guarantees and confers no rights. Any suggested steps or code provided should be
    done under your own risk, I take no responsibilities if your system blows, the universe stops spinning, o nor for any other adverse consequence the information on this code might cause directly or indirectly.
    Aclaración: Aunque hago lo posible por verificar que todo lo que posteo es correcto y seguro, Yo ciertamente no soy perfecto y puedo cometer errores, por lo tanto esta informacion es provista "AS IS" / "Como Está" sin garantía alguna y no le confiere ningún
    derecho. Cualquier instrucción descripta o código incluido deben ser empleados bajo su propia responsabilidad y bajo su propio riesgo. No me hago responsable si sus datos se dañan, su si
    Hi Marianok,
    Thanks for your response and taking the time to read the topic we have raised. We believe we already have this step in place but perhaps we have it in the wrong area of the unattend.
    Please find below our unattend file for the capture:
    <?xml version="1.0" encoding="utf-8"?>
    <unattend xmlns="urn:schemas-microsoft-com:unattend">
    <settings pass="windowsPE">
    <component name="Microsoft-Windows-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
    <ImageInstall>
    <OSImage>
    <WillShowUI>OnError</WillShowUI>
    <InstallTo>
    <DiskID>0</DiskID>
    <PartitionID>1</PartitionID>
    </InstallTo>
    <InstallFrom>
    <Path>.\Operating Systems\Windows 7 Install Media x86\Sources\install.wim</Path>
    <MetaData>
    <Key>/image/index</Key>
    <Value>1</Value>
    </MetaData>
    </InstallFrom>
    </OSImage>
    </ImageInstall>
    <UpgradeData>
    <Upgrade>false</Upgrade>
    </UpgradeData>
    <Display>
    <ColorDepth>16</ColorDepth>
    <HorizontalResolution>1024</HorizontalResolution>
    <RefreshRate>60</RefreshRate>
    <VerticalResolution>768</VerticalResolution>
    </Display>
    <ComplianceCheck>
    <DisplayReport>OnError</DisplayReport>
    </ComplianceCheck>
    <UserData>
    <AcceptEula>true</AcceptEula>
    <ProductKey>
    <Key></Key>
    </ProductKey>
    </UserData>
    </component>
    <component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <SetupUILanguage>
    <UILanguage>en-US</UILanguage>
    </SetupUILanguage>
    <InputLocale>0409:00000409</InputLocale>
    <SystemLocale>en-US</SystemLocale>
    <UILanguage>en-US</UILanguage>
    <UserLocale>en-US</UserLocale>
    </component>
    </settings>
    <settings pass="generalize">
    <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <DoNotCleanTaskBar>true</DoNotCleanTaskBar>
    </component>
    </settings>
    <settings pass="specialize">
    <component name="Microsoft-Windows-UnattendedJoin" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
    <Identification>
    <Credentials>
    <Username></Username>
    <Domain></Domain>
    <Password></Password>
    </Credentials>
    <JoinDomain></JoinDomain>
    <JoinWorkgroup></JoinWorkgroup>
    <MachineObjectOU></MachineObjectOU>
    </Identification>
    </component>
    <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
    <ComputerName></ComputerName>
    <ProductKey></ProductKey>
    <RegisteredOrganization>OurCompanyNameHere</RegisteredOrganization>
    <RegisteredOwner>Windows User</RegisteredOwner>
    <TimeZone></TimeZone>
    <DoNotCleanTaskBar>true</DoNotCleanTaskBar>
    </component>
    <component name="Microsoft-Windows-IE-InternetExplorer" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Home_Page>about:blank</Home_Page>
    <IEWelcomeMsg>false</IEWelcomeMsg>
    </component>
    <component name="Microsoft-Windows-Deployment" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <RunSynchronous>
    <RunSynchronousCommand wcm:action="add">
    <Description>EnableAdmin</Description>
    <Order>1</Order>
    <Path>cmd /c net user Administrator /active:yes</Path>
    </RunSynchronousCommand>
    <RunSynchronousCommand wcm:action="add">
    <Description>UnfilterAdministratorToken</Description>
    <Order>2</Order>
    <Path>cmd /c reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v FilterAdministratorToken /t REG_DWORD /d 0 /f</Path>
    </RunSynchronousCommand>
    </RunSynchronous>
    </component>
    <component name="Microsoft-Windows-International-Core" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <InputLocale>0409:00000409</InputLocale>
    <SystemLocale>en-US</SystemLocale>
    <UILanguage>en-US</UILanguage>
    <UserLocale>en-US</UserLocale>
    </component>
    <component name="Microsoft-Windows-TapiSetup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <TapiConfigured>0</TapiConfigured>
    <TapiUnattendLocation>
    <AreaCode>""</AreaCode>
    <CountryOrRegion>1</CountryOrRegion>
    <LongDistanceAccess>9</LongDistanceAccess>
    <OutsideAccess>9</OutsideAccess>
    <PulseOrToneDialing>1</PulseOrToneDialing>
    <DisableCallWaiting>""</DisableCallWaiting>
    <InternationalCarrierCode>""</InternationalCarrierCode>
    <LongDistanceCarrierCode>""</LongDistanceCarrierCode>
    <Name>Default</Name>
    </TapiUnattendLocation>
    </component>
    <component name="Microsoft-Windows-SystemRestore-Main" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <DisableSR>1</DisableSR>
    </component>
    </settings>
    <settings pass="oobeSystem">
    <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
    <UserAccounts>
    <AdministratorPassword>
    <Value>QQBkAG0AaQBuAGkAcwB0AHIAYQB0AG8AcgBQAGEAcwBzAHcAbwByAGQA</Value>
    <PlainText>false</PlainText>
    </AdministratorPassword>
    <LocalAccounts>
    <LocalAccount wcm:action="add">
    <Description>Temp account</Description>
    <DisplayName>Temp account</DisplayName>
    <Group>Users</Group>
    <Name>TempAccount</Name>
    </LocalAccount>
    </LocalAccounts>
    </UserAccounts>
    <AutoLogon>
    <Enabled>true</Enabled>
    <Username>Administrator</Username>
    <Domain></Domain>
    <Password>
    <Value>UABhAHMAcwB3AG8AcgBkAA==</Value>
    <PlainText>false</PlainText>
    </Password>
    <LogonCount>999</LogonCount>
    </AutoLogon>
    <Display>
    <ColorDepth>32</ColorDepth>
    <HorizontalResolution>1024</HorizontalResolution>
    <RefreshRate>60</RefreshRate>
    <VerticalResolution>768</VerticalResolution>
    </Display>
    <FirstLogonCommands>
    <SynchronousCommand wcm:action="add">
    <CommandLine>cscript.exe C:\MININT\Scripts\LiteTouch.wsf /start</CommandLine>
    <Description>Lite Touch new OS</Description>
    <Order>1</Order>
    </SynchronousCommand>
    <SynchronousCommand wcm:action="add">
    <CommandLine>cscript.exe D:\MININT\Scripts\LiteTouch.wsf /start</CommandLine>
    <Description>Lite Touch new OS</Description>
    <Order>2</Order>
    </SynchronousCommand>
    <SynchronousCommand wcm:action="add">
    <CommandLine>cscript.exe E:\MININT\Scripts\LiteTouch.wsf /start</CommandLine>
    <Description>Lite Touch new OS</Description>
    <Order>3</Order>
    </SynchronousCommand>
    <SynchronousCommand wcm:action="add">
    <CommandLine>cscript.exe F:\MININT\Scripts\LiteTouch.wsf /start</CommandLine>
    <Description>Lite Touch new OS</Description>
    <Order>4</Order>
    </SynchronousCommand>
    </FirstLogonCommands>
    <OOBE>
    <HideEULAPage>true</HideEULAPage>
    <NetworkLocation>Work</NetworkLocation>
    <ProtectYourPC>1</ProtectYourPC>
    <SkipUserOOBE>true</SkipUserOOBE>
    </OOBE>
    <RegisteredOrganization>Ourcomapanynamehere</RegisteredOrganization>
    <RegisteredOwner>Windows User</RegisteredOwner>
    <TimeZone></TimeZone>
    </component>
    <component name="Microsoft-Windows-International-Core" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <InputLocale>0409:00000409</InputLocale>
    <SystemLocale>en-US</SystemLocale>
    <UILanguage>en-US</UILanguage>
    <UserLocale>en-US</UserLocale>
    </component>
    </settings>
    <settings pass="offlineServicing">
    <component name="Microsoft-Windows-PnpCustomizationsNonWinPE" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <DriverPaths>
    <PathAndCredentials wcm:keyValue="1" wcm:action="add">
    <Path>\Drivers</Path>
    </PathAndCredentials>
    </DriverPaths>
    </component>
    </settings>
    <cpi:offlineImage cpi:source="catalog://pr-dep-03/captureshare$/operating systems/windows 7 install media x86/sources/install_windows 7 professional.clg" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
    </unattend>
    Hope this helps!

  • Build and Capture TS fails in "Prepare Configuration Manager Client" task

    I have a ConfigMgr 2012 R2 + CU1 I use for Windows 7 deployment.
    I have made a "build and Capture" TS in ConfigMgr that I use to build my reference image.
    When I run the TS it fails at the "Prepare Configuration Manager Client" step where I get the following error:
    The task sequence execution engine failed executing the action (Prepare Configuration Manager Client) in the group (Capture the Reference Machine) with the error code 2147749938
    Action output: ... 1 instance(s) of 'SMS_MaintenanceTaskRequests' successful
    Successfully reset Registration status flag to "not registered"
    Successfully disabled provisioning mode.
    Start to cleanup TS policy
    getPointer()->ExecQuery( BString(L"WQL"), BString(pszQuery), lFlags, pContext, ppEnum ), HRESULT=80041032 (e:\nts_sccm_release\sms\framework\core\ccmcore\wminamespace.cpp,463)
    ns.Query(sQuery, &spEnum), HRESULT=80041032 (e:\qfe\nts\sms\framework\tscore\utils.cpp,3666)
    End TS policy cleanup
    TS::Utility::CleanupPolicyEx(false), HRESULT=80041032 (e:\nts_sccm_release\sms\client\osdeployment\preparesmsclient\preparesmsclient.cpp,564)
    pCmd->Execute(), HRESULT=80041032 (e:\nts_sccm_release\sms\client\osdeployment\preparesmsclient\main.cpp,136)
    Wmi query 'select *from CCM_Policy where PolicySource = 'CcmTaskSequence'' failed, hr=0x80041032
    Failed to delete policies compiled by TaskSequence (0x80041032)
    Failed to prepare SMS Client for capture, hr=80041032
    Failed to prepare SMS Client for capture, hr=80041032. The operating system reported error 2147942402: The system cannot find the file specified.
    If I disable the "Install Software Updates" part of my TS it will run without probems. It installs 154 updates during the build.
    I have seen another reference to this problem on this forum but why should the large number of the updates be the reason why the task sequcens cannot prepare the SCCM client for capture.
    Sounds to me that it's a BUG :-(
    Thomas Forsmark Soerensen

    I'm glad I'm not the only one running into this.  I've been racking my brain for the past few days trying to figure out where I went wrong. 
    SCCM 2012 R2 CU1
    Installation properties in TS: SMSMP=mp.f.q.d.n FSP=mp.f.q.d.n DNSSUFFIX=f.q.d.n PATCH="%_SMSTSMDataPath%\Packages\AP200003\hotfix\KB2882125\Client\x64\configmgr2012ac-sp1-kb2882125-x64.msp;%_SMSTSMDataPath%\Packages\AP200003\hotfix\KB2905002\Client\x64\configmgr2012ac-r2-kb2905002-x64.msp;%_SMSTSMDataPath%\Packages\AP200003\hotfix\KB2938441\Client\x64\configmgr2012ac-r2-kb2938441-x64.msp"
    Drop Windows 7 WIM that has all the updates Schedule Updates (offline servicing) installed (169 of 277)
    Apply several updates offline (the dual-reboot Windows 7 updates among others)
    Run Windows Updates more than once to be sure I get everything
    Breaks at the preparing client for capture step
    Is this:
    a bug?
    a known issue
    something that's just frowned upon for no technical reason?
    I'd love to hear from an SCCM guru [at Microsoft] on what the heck is going on here.

  • LDAP- When importing a Group it goes into Security Users and not Groups.

    Hello,
    I created a new LDAP Server
    cn=GroupBI,OU=Groups,OU=Systems,OU=Milan,OU=Italy,OU=Countries,DC=u,DC=a,DC=g
    Connection Test was ok.
    The problem is on importing members of my group, on Security Import window instead of having the group drop-down list populated I have the user drop-down list populated with "GroupBI".
    If I import this group (considered as a user by BI) it goes into Security > Users and not Security > Groups.
    This does not make sense.
    I'm sure this "GroupBI" is a group and not a user and the atribute type used is sAMAccountname
    Any help?
    Cheers

    Let me tell how we did Authentication using LDAP
    I havent imported any groups or users once the LDAP is set up and connection was successfull. I simply created the session variables USER DISPLAYNAME EMAIL and mapped to LDAP Variables uid, displayname, mail.
    Authentication is done in this way by mapping the OBIEE variables to LDAP variables instead of importing the groups.
    Now for Authorization I created the groups populated using some db tables and captured the group name and loglevel and applied filters on the group in the rpd for data level and permissions on the group in webcat for object level.
    So just for Authentication purposes I think we can authenticate with out really importing groups as long as you map OB variables to LDAP
    hope it helps
    Prash

  • Install Updates step fails in Build and Capture (error code 87D00272)

    Hello,
    I was really hoping someone could help me with this.
    Background information:
    - We have a CM07 server in a production environment.
    - I've set up a CM12 RTM server, following the guides in this forum, with the hopes of migrating soon.
    - I wanted to do OSD from scratch to learn more and to take advantage of new features in CM12.
    - I have a few virtual machines running for testing OSD/apps (these are the only clients managed by my CM12 server).
    - Since it's not possible to have two WDS servers running at the same time AFAIK (without using registry tweaks, the F11 trick, that by the
    way doesn't work for me) I have created a bootable TS media that I mount on the virtual machines whenever I want to test OSD.
    Now, to my problem:
    I can't figure out why my Build and Capture TS is failing on the Install Software Updates step. smsts.log file says: Failed
    to RefreshUpdates, hr=087d00272, followed by: Failed to run the action: Install Software Updates. Component is disabled (Error: 87D00272; Source: CCM).
    I have read about similar issues occurring in CM07 capture task sequences since the machine is joined to a Workgroup. The proposed solution was adding SMSSLP=FQDN to the client installation properties, but since that functionality is moved to the MP in CM12,
    it should be enough to specify SMSMP=FQDN in my case. It's not working anyway. Tried it to a Deploy TS also, where the machine is domain joined, but I got the same error.
    The error code 87D00272 returns no results on Google. This stumps me, as someone surely has had the same problem? Here are the relevant portions
    of the smsts.log file
    If someone had the chance to look at this, I would greatly appreciate it. Thank you!
    Refreshing Updates InstallSWUpdate 2012-06-13 10:15:33 228 (0x00E4)
    spInstall->RefreshTargetedUpdates( spCallback, &bAlreadyCompleted ),
    HRESULT=87d00272 (e:\nts_sccm_release\sms\client\osdeployment\installswupdate
    \installswupdate.cpp,467) InstallSWUpdate 2012-06-13 10:15:34 228 (0x00E4)
    Failed to RefreshUpdates, hr=0x87d00272 InstallSWUpdate 2012-06-13 10:15:34 228
    (0x00E4)
    RefreshTargetedUpdates(spInstall, spCallback, bAlreadyCompleted), HRESULT=87d00272
    (e:\nts_sccm_release\sms\client\osdeployment\installswupdate
    \installswupdate.cpp,1295) InstallSWUpdate 2012-06-13 10:15:34 228 (0x00E4)
    RefreshUpdates(), HRESULT=87d00272 (e:\nts_sccm_release\sms\client\osdeployment
    \installswupdate\installswupdate.cpp,906) InstallSWUpdate 2012-06-13 10:15:34
    228 (0x00E4)
    InstallUpdates(pInstallUpdate, tType, sJobID, sActiveRequestHandle),
    HRESULT=87d00272 (e:\nts_sccm_release\sms\client\osdeployment\installswupdate
    \main.cpp,248) InstallSWUpdate 2012-06-13 10:15:34 228 (0x00E4)
    Setting TSEnv variable SMSTSInstallUpdateJobGUID= InstallSWUpdate 2012-06-13
    10:15:34 228 (0x00E4)
    Process(pInstallUpdate, tType), HRESULT=87d00272 (e:\nts_sccm_release\sms\client
    \osdeployment\installswupdate\main.cpp,304) InstallSWUpdate 2012-06-13 10:15:34
    228 (0x00E4)
    Process completed with exit code 2278556274 TSManager 2012-06-13 10:15:34
    912 (0x0390)
    ---------! TSManager 2012-06-13 10:15:34 912 (0x0390)
    Failed to run the action: Install Software Updates.
    Component is disabled (Error: 87D00272; Source: CCM) TSManager 2012-06-13
    10:15:34 912 (0x0390)
    MP server http://CFGMGR-SRV.zenit.brummer.se. Ports 80,443. CRL=false. TSManager
    2012-06-13 10:15:34 912 (0x0390)
    Setting authenticator TSManager 2012-06-13 10:15:35 912 (0x0390)
    Set authenticator in transport TSManager 2012-06-13 10:15:35 912 (0x0390)
    Sending StatusMessage TSManager 2012-06-13 10:15:35 912 (0x0390)
    Setting message signatures. TSManager 2012-06-13 10:15:35 912 (0x0390)
    Setting the authenticator. TSManager 2012-06-13 10:15:35 912 (0x0390)
    CLibSMSMessageWinHttpTransport::Send: URL: CFGMGR-SRV.zenit.brummer.se:80  CCM_POST
    /ccm_system/request TSManager 2012-06-13 10:15:35 912 (0x0390)
    Request was succesful. TSManager 2012-06-13 10:15:35 912 (0x0390)
    Set a global environment variable _SMSTSLastActionRetCode=-2016411022 TSManager
    2012-06-13 10:15:35 912 (0x0390)
    Set a global environment variable _SMSTSLastActionSucceeded=false TSManager
    2012-06-13 10:15:35 912 (0x0390)
    Clear local default environment TSManager 2012-06-13 10:15:35 912 (0x0390)
    Let the parent group (Setup Operating System) decides whether to continue execution
    TSManager 2012-06-13 10:15:35 912 (0x0390)
    The execution of the group (Setup Operating System) has failed and the execution has
    been aborted. An action failed.
    Operation aborted (Error: 80004004; Source: Windows) TSManager 2012-06-13
    10:15:35 912 (0x0390)
    Failed to run the last action: Install Software Updates. Execution of task sequence
    failed.
    Component is disabled (Error: 87D00272; Source: CCM) TSManager 2012-06-13
    10:15:35 912 (0x0390)
    MP server http://CFGMGR-SRV.zenit.brummer.se. Ports 80,443. CRL=false. TSManager
    2012-06-13 10:15:35 912 (0x0390)
    Setting authenticator TSManager 2012-06-13 10:15:35 912 (0x0390)
    Set authenticator in transport TSManager 2012-06-13 10:15:35 912 (0x0390)
    Sending StatusMessage TSManager 2012-06-13 10:15:35 912 (0x0390)
    Setting message signatures. TSManager 2012-06-13 10:15:35 912 (0x0390)
    Setting the authenticator. TSManager 2012-06-13 10:15:35 912 (0x0390)
    CLibSMSMessageWinHttpTransport::Send: URL: CFGMGR-SRV.zenit.brummer.se:80  CCM_POST
    /ccm_system/request TSManager 2012-06-13 10:15:35 912 (0x0390)
    Request was succesful. TSManager 2012-06-13 10:15:35 912 (0x0390)
    Launching command shell. OSDSetupHook 2012-06-13 10:15:45 1932
    (0x078C)
    executing command: C:\WINDOWS\system32\cmd.exe /k OSDSetupHook 2012-06-13
    10:15:45 1932 (0x078C)
    executed command: C:\WINDOWS\system32\cmd.exe /k OSDSetupHook 2012-06-13
    10:15:45 1932 (0x078C)
    Execution::enExecutionFail != m_eExecutionResult, HRESULT=80004005 (e:
    \nts_sccm_release\sms\client    asksequence    smanager    smanager.cpp,756) TSManager
    2012-06-13 10:16:57 912 (0x0390)
    Task Sequence Engine failed! Code: enExecutionFail TSManager 2012-06-13
    10:16:57 912 (0x0390)
    TSManager 2012-06-13 10:16:57 912 (0x0390)
    Task sequence execution failed with error code 80004005 TSManager 2012-06-13
    10:16:57 912 (0x0390)

    I can add that I've looked at the Site Status in the Monitoring tab, and everything looks green apart from some Warnings about User and System Discovery. In Component Status, I have a warning about the Distribution Point on C$. I thought placing a NO_SMS_ON_DRIVE.SMS
    file in the root of C: would mean no stuff was placed there? I can't see anything SCCM related, but it seems that it has placed a DP on C:?
    The error message about DP is: 
    Distribution Manager has not tried to install IIS component of operating system to distribution point "["Display=\\CFGMGR-SRV.zenit.brummer.se\"]MSWNET:["SMS_SITE=PS1"]\\CFGMGR-SRV.zenit.brummer.se\". You should install and configure IIS manually. Please
    ensure RDC is also enabled.

  • Osd build and capture with copy profile

    I used the build and capture ts from sccm 2012 r2 to create my windows 7 64bit. I did not realize I would loose the administrator customization. How to keep those changes that I was planning to use as default user setting when deploy it? 
    Thanks

    If you need to customise the image (if there are some customisations that you can't do by Group Policy) then you should create it using MDT. MDT supports copyprofile
    http://www.gerryhampsoncm.blogspot.ie/2014/03/create-customised-reference-image-with.html
    Gerry Hampson | Blog:
    www.gerryhampsoncm.blogspot.ie | LinkedIn:
    Gerry Hampson | Twitter:
    @gerryhampson

  • Build and capture task sequence stops after apply windows updates

    Hi
    SCCM 2012 SP1 CU4. Deploying Windows 7 SP1.
    Pulling my hair out over this one. I successfully performed a build and capture installing some applications. When I choose to install Windows updates, the updates install, the system reboots then doesn't continue. Applications don't install, image isn't captured.
    I've tired using the default B&C TS and receive the same results. I've amended the TS to as follows, as suggested in a technet forum post: https://social.technet.microsoft.com/Forums/en-US/a535e509-fc6a-483c-bf24-7e2aa064e5b7/deploying-100-of-available-software-updates-during-a-task-sequence?forum=configmanagerosd
    Looking at smsts.log there's errors relating to not accepting the license agreement, but I didn't think this would stop the TS. 
    Can someone point out why the deployment stops?
    https://dl.dropboxusercontent.com/u/23479177/smsts-20141113-182413.log 
    Cheers

    This is very common scenario you´re having! :)
    For OSD and for Capture I always create myown Software Update Group, which lets me totally control, what updates goes to the image and which doesn´t. I then edit membership of update and tag or un-tag update to the group.
    I suggest you do the following:
    1. Create manual Computer record and add it to OSD Capture collection.
    2. Create SUG for OSD Capture and un-tag updates which are listed in KB2894518. But that might not be enough.
    3. Deploy TS to the OSD Capture collection.
    4. Create/modify virtual machine with MAC matching the computer record.
    5. Run PXE and hook Capture TS.

  • How to restrict Sales office and Sales Group.

    Hi All,
    I want to restrict the users from changing the sales office and sales group in the sales order.
    Is there any standard way to achieve this or do we need to do with User exit??
    Please help.
    Thanks,
    Pavan.

    hi
    there is no standard settings for estrict the users from changing the sales office and sales group in the sales order
    so you have to write the logic in userexit
    DATA: lt_user_list   TYPE STANDARD TABLE OF tvarvc,
           lw_user_list   TYPE tvarvc,
           lr_user        TYPE RANGE OF syuname,
           lw_user        LIKE LINE OF lr_user.
    IF screen-name EQ ' VBAK-VKBUR' and   VBAK-VKGRP.
    * IF sy-tcode EQ 'VA02'.
    **Get list of users who are allowed to change SO - only they can change payment terms
         SELECT *
           FROM tvarvc
           INTO TABLE lt_user_list
          WHERE name = 'ZSD_VA02_ALLOWED'
            AND type = 'S'.
         IF sy-subrc = 0.
           LOOP AT lt_user_list INTO lw_user_list.
             lw_user-sign = lw_user_list-sign.
             lw_user-option = lw_user_list-opti.
             lw_user-low    = lw_user_list-low.
             lw_user-high   = lw_user_list-high.
             APPEND lw_user TO lr_user.
             CLEAR lw_user.
           ENDLOOP.
    **    If user is not in the users listed for change allowed
           IF sy-uname NOT IN lr_user.
             screen-input = 0.
           ELSE.
             screen-input = 1.
           ENDIF.
         ENDIF.
       ENDIF.
    ENDIF.
    go to STVARV t code here you check the NAME and give the user ids who need to change

  • Unable to Log and Capture AND make FCP a boot disk

    I am unable to go into Log and Capture mode in FCP 4. I can capture from firewire using I movie just fine so I know the sytem works. The minute I open Log and Capture from within FCP (with the JVC Mini-DV camera hooked up thru Firewire), it crashes. Help. I upgraded from FCP 3 to FCP 4 a couple years ago and it hasn't worked right since. Would re-installing the FCP 4 upgrade work? Also, my system works very sluggish. Please explain to me how I would make the veersion of FCP 4 my boot disk. I realize that I can't have the FCP 4 application and the media on the same drive but is there a way to partition one of my drives and make FCP one of the startup disks? Hope this isn't too confusing. Thanks.

    First off, FCP 4 was darn unstable. FCP 4.5 is a free upgrade and is STILL the most stable version out there. FCP 5 is getting there.
    Secondly, try:
    Shane's Stock Tip Mantra: If the program was working fine, and now isn't, or just isn't working the way it should, the first things to do are:
    1) Trash your FCP preferences. Download the appropriate version of FCP Rescue at http://fcprescue.andersholck.com/ and run it.
    2) Open the Disk Utility and Repair Permissions.
    As for partitioning the hard drive, that isn't necessary. Hasn't been since FCP 3.
    Shane

Maybe you are looking for