Jump to content











Photo
- - - - -

Run a batchfile from memory key on first logon


  • Please log in to reply
2 replies to this topic

#1 swindmiller

swindmiller

    Newbie

  • Members
  • 15 posts
  •  
    United States

Posted 03 October 2013 - 02:11 PM

I want to run a batchfile located on the same memory key where I am installing windows from.

 

I see this:

 <Path>cmd /q /c "FOR %i IN (C D E F G H I J K L N M O P Q R S T U V W X Y Z) DO IF EXIST %i:\FIRADISK\LOADISO.CMD  cmd /k %i:\FIRADISK\LOADISO.cmd"</Path> 

So can I just add this:

  <FirstLogonCommands>
                <SynchronousCommand wcm:action="add">
                    <CommandLine>%i:\copy.bat</CommandLine>
                    <Description>Key</Description>
                    <Order>1</Order>
                    <RequiresUserInput>false</RequiresUserInput>
                </SynchronousCommand>
   </FirstLogonCommands>

under this section:

<settings pass="oobeSystem">
    <component name="Microsoft-Windows-Shell-Setup" 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">

Using the %i as the drive letter for the key?

 

Thanks,

Scott



#2 swindmiller

swindmiller

    Newbie

  • Members
  • 15 posts
  •  
    United States

Posted 03 October 2013 - 02:19 PM

Tried testing it out and that did not seem to work. How can I do this?

 

Thanks,

Scott



#3 RoyM

RoyM

    Frequent Member

  • .script developer
  • 420 posts
  • Interests:"Booting and Owning".
  •  
    United States

Posted 04 October 2013 - 02:11 AM

Hi swindmiller
 
Would be glad to help, but More info required.
 
1  What are you booting from, internal HDD/OS or from the USB, what OS, and what flavor of OS are you running.
2  If it is a PE you are booting to, you will want to use windowsPE pass
3  What is the name of .xml, autounattend, unattend, somethingelse, etc. (also, are there other .xml's present)
4  when do you want this command to run, by clicking, from batch, from boot, autorun, runonce, etc.
 
   There may be a much easier way to accomplish what you want without using an answer file.
   Post contents of copy.bat please if permissible.
 
Provide detailed explanations of what it is you exactly want to accomplish,
what steps you have taken, and in what order you have proceeded, so that
a clearer understanding will be presented.
Without this much needed info, it will be difficult to provide you with specific answers.
 
 
Regards RoyM





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users