Announcement

Collapse
No announcement yet.

Windows XP UserNames

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Windows XP UserNames

    OK , 2 Questions
    In order to get all the User names in windows XP or 2k, and have AMS create a folder in another location, named with the same names, this is what I did.
    <IR_ACTIONS_LIST>
    <Action name="Message Box">
    <Type>5</Type>
    <Function>0</Function>
    <DTIndentLevel>0</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <DialogTitle>Outlook</DialogTitle>
    <DialogMessage>Please Close Outlook</DialogMessage>
    <Icon>1</Icon>
    <Variable>%Result%</Variable>
    <DialogType>0</DialogType>
    <DefaultButton>0</DefaultButton>
    </Action>
    <Action name="Search">
    <Type>18</Type>
    <Function>0</Function>
    <DTIndentLevel>0</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <Variable>%Files%</Variable>
    <Delimiter>;;</Delimiter>
    <FileName>*.pst</FileName>
    <LocalFixedDrives>0</LocalFixedDrives>
    <RemoteDrives>0</RemoteDrives>
    <RemovableDrives>0</RemovableDrives>
    <CDROMDrives>0</CDROMDrives>
    <SpecificDirectoriesDrives>1</SpecificDirectoriesDrives>
    <CustomDirectoriesDrives>C:\PST_Save</CustomDirectoriesDrives>
    <RecurseCustom>1</RecurseCustom>
    <DialogTitle>Searching for Files</DialogTitle>
    <DialogText>Searching for files. This may take a few moments.</DialogText>
    <ShowDialog>0</ShowDialog>
    </Action>
    <Action name="Comment">
    <Type>202</Type>
    <Function>2</Function>
    <DTIndentLevel>0</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <Comment>Checks to see whether this process has been run once before</Comment>
    </Action>
    <Action name="IF">
    <Type>200</Type>
    <Function>1</Function>
    <DTIndentLevel>0</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <Condition>%Files% &amp;gt; 0</Condition>
    </Action>
    <Action name="Message Box">
    <Type>5</Type>
    <Function>0</Function>
    <DTIndentLevel>1</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <DialogTitle>Path Exist</DialogTitle>
    <DialogMessage>.pst Files have been Detected in C:\PST_Save Please Rename or Move this Folder Before Running this Scan again</DialogMessage>
    <Icon>1</Icon>
    <Variable>%Result%</Variable>
    <DialogType>0</DialogType>
    <DefaultButton>0</DefaultButton>
    </Action>
    <Action name="GOTO">
    <Type>209</Type>
    <Function>1</Function>
    <DTIndentLevel>1</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <Label>FILEFOUND</Label>
    </Action>
    <Action name="END IF">
    <Type>201</Type>
    <Function>1</Function>
    <DTIndentLevel>0</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    </Action>
    <Action name="Message Box">
    <Type>5</Type>
    <Function>0</Function>
    <DTIndentLevel>0</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <DialogTitle>Find DBX Files</DialogTitle>
    <DialogMessage>Search HardDrive for all available Outlook.pst files?</DialogMessage>
    <Icon>3</Icon>
    <Variable>%DBXResult%</Variable>
    <DialogType>2</DialogType>
    <DefaultButton>0</DefaultButton>
    </Action>
    <Action name="IF">
    <Type>200</Type>
    <Function>1</Function>
    <DTIndentLevel>0</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <Condition>%DBXResult% = ok</Condition>
    </Action>
    <Action name="Search">
    <Type>18</Type>
    <Function>0</Function>
    <DTIndentLevel>1</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <Variable>%DBXFiles%</Variable>
    <Delimiter>;;</Delimiter>
    <FileName>*.pst</FileName>
    <LocalFixedDrives>0</LocalFixedDrives>
    <RemoteDrives>0</RemoteDrives>
    <RemovableDrives>0</RemovableDrives>
    <CDROMDrives>0</CDROMDrives>
    <SpecificDirectoriesDrives>1</SpecificDirectoriesDrives>
    <CustomDirectoriesDrives>C:\Documents and Settings\</CustomDirectoriesDrives>
    <RecurseCustom>1</RecurseCustom>
    <DialogTitle>Searching for .pst Files</DialogTitle>
    <DialogText>Searching for files. This may take a few moments.</DialogText>
    <ShowDialog>1</ShowDialog>
    </Action>
    <Action name="Comment">
    <Type>202</Type>
    <Function>2</Function>
    <DTIndentLevel>1</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <Comment>Search the known path for Outlook .pst extentions in All Users</Comment>
    </Action>
    <Action name="Count Delimited Strings">
    <Type>63</Type>
    <Function>0</Function>
    <DTIndentLevel>1</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <Variable>%DBXString%</Variable>
    <Source>%DBXFiles%</Source>
    <Delimiter>;;</Delimiter>
    </Action>
    <Action name="Set Value">
    <Type>6</Type>
    <Function>0</Function>
    <DTIndentLevel>1</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <Variable>%OEVar%</Variable>
    <Value>0</Value>
    <Evaluate>0</Evaluate>
    </Action>
    <Action name="Create">
    <Type>28</Type>
    <Function>0</Function>
    <DTIndentLevel>1</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <DirectoryName>C:\PST_Save</DirectoryName>
    </Action>
    <Action name="WHILE">
    <Type>204</Type>
    <Function>1</Function>
    <DTIndentLevel>1</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <Condition>%OEVar% &amp;lt; %DBXString%</Condition>
    </Action>
    <Action name="Get Delimited String">
    <Type>64</Type>
    <Function>0</Function>
    <DTIndentLevel>2</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <Variable>%DBX%</Variable>
    <Source>%DBXFiles%</Source>
    <Delimiter>;;</Delimiter>
    <ItemIndex>%OEVar%</ItemIndex>
    </Action>
    <Action name="Get Delimited String">
    <Type>64</Type>
    <Function>0</Function>
    <DTIndentLevel>2</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <Variable>%DBXUser%</Variable>
    <Source>%DBXFiles%</Source>
    <Delimiter>;;</Delimiter>
    <ItemIndex>%OEVar%</ItemIndex>
    </Action>
    <Action name="Parse Path">
    <Type>62</Type>
    <Function>0</Function>
    <DTIndentLevel>2</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <Variable>%NewString%</Variable>
    <Source>%DBX%</Source>
    <ParseType>2</ParseType>
    </Action>
    <Action name="Mid">
    <Type>24</Type>
    <Function>0</Function>
    <DTIndentLevel>2</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <Variable>%1%</Variable>
    <SourceString>%NewString%</SourceString>
    <StartAtPosition>23</StartAtPosition>
    <NumberOfCharacters>20</NumberOfCharacters>
    </Action>
    <Action name="Comment">
    <Type>202</Type>
    <Function>2</Function>
    <DTIndentLevel>2</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <Comment>Needed to trim off the known "Documents and Settings" folder</Comment>
    </Action>
    <Action name="Find">
    <Type>21</Type>
    <Function>0</Function>
    <DTIndentLevel>2</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <Variable>%FoundPos%</Variable>
    <SearchIn>%1%</SearchIn>
    <SearchFor>\</SearchFor>
    <StartAtPosition>0</StartAtPosition>
    <SearchDirection>0</SearchDirection>
    <CaseSensitive>0</CaseSensitive>
    </Action>
    <Action name="Comment">
    <Type>202</Type>
    <Function>2</Function>
    <DTIndentLevel>2</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <Comment>Know that the next Folder will be at the \ mark</Comment>
    </Action>
    <Action name="Left">
    <Type>22</Type>
    <Function>0</Function>
    <DTIndentLevel>2</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <Variable>%1%</Variable>
    <SourceString>%1%</SourceString>
    <NumberOfCharacters>%FoundPos%</NumberOfCharacters>
    </Action>
    <Action name="Create">
    <Type>28</Type>
    <Function>0</Function>
    <DTIndentLevel>2</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <DirectoryName>C:\PST_Save\%1%</DirectoryName>
    </Action>
    <Action name="Copy">
    <Type>25</Type>
    <Function>0</Function>
    <DTIndentLevel>2</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <Source>%DBXUser%</Source>
    <Destination>C:\PST_Save\%1%</Destination>
    <RecurseSubdirectories>0</RecurseSubdirectories>
    <OverwriteExistingFiles>0</OverwriteExistingFiles>
    <ContinueAfterFail>0</ContinueAfterFail>
    <CopyHiddenSystem>0</CopyHiddenSystem>
    <DialogTitle>Copying Files</DialogTitle>
    </Action>
    <Action name="Set Value">
    <Type>6</Type>
    <Function>0</Function>
    <DTIndentLevel>2</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <Variable>%OEVar%</Variable>
    <Value>%OEVar% + 1</Value>
    <Evaluate>1</Evaluate>
    </Action>
    <Action name="END WHILE">
    <Type>205</Type>
    <Function>1</Function>
    <DTIndentLevel>1</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    </Action>
    <Action name="LABEL">
    <Type>208</Type>
    <Function>1</Function>
    <DTIndentLevel>1</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <Label>FILEFOUND</Label>
    </Action>
    <Action name="Open">
    <Type>7</Type>
    <Function>0</Function>
    <DTIndentLevel>1</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <FileName>C:\PST_Save</FileName>
    <Verb>open</Verb>
    <WorkingDir>C:\PST_Save</WorkingDir>
    <RunMode>0</RunMode>
    </Action>
    <Action name="END IF">
    <Type>201</Type>
    <Function>1</Function>
    <DTIndentLevel>0</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    </Action>
    </IR_ACTIONS_LIST>
    As you see, The New folders are created with the correct User name, and any files found in that user profile will be copied to the appropriate folder, my thought here is there must be a more efficient way to get the User Profile name located in
    C:\Documents and Settings\%UserName%\Local Settings.......
    rather than the complicated process I devised to do the same job.
    Also, what Variable can be set for the root?, in WindowsXP there is a built in variable %SystemRoot% which the cmd.exe understands, but in AMS? if I want to create a folder in root, I cannot assume that it will be C:, the only other way would be to parse path from a known file and extract it from the first character in that string, as that should be the drive letter? Much like the %WinDir% variable always knows where windows is located, so what about %Root%

  • #2
    Re: Windows XP UserNames

    Won't the %WinDir% and %SysDir% always be in the "root" drive? i.e. parse path to extract... As far as I know you can only have one Windows installation per partition and it must be on the boot partition... I assume by root drive you mean boot drive.

    Corey Milner
    Creative Director, Indigo Rose Software

    Comment


    • #3
      Re: Windows XP UserNames

      I'm not the best at clearness of explaining things sorry.
      Do this for me, and will solve all, show me actions taken to
      Create a folder called "NewFolder" on the root drive
      If I see what actions you did then I can figure out the rest

      Comment


      • #4
        Re: Windows XP UserNames

        If you use a STRING > PARSE PATH > DRIVE action on %WinDir% you should get the "root" path, i.e. "C:"

        Then all you need to do is use a FOLDER > CREATE action using that "root" path...

        Corey Milner
        Creative Director, Indigo Rose Software

        Comment

        Working...
        X