Jump to content
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble

MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, register and become a site sponsor/subscriber and ads will be disabled automatically. 


Sign in to follow this  
chon_

Avoid "CMD /C" in Pass 6 auditUser

Recommended Posts

I've been following FireGeier's guide to unattended vista (it's awesome BTW, congrats! :thumbup ), everything works OK, but I have a doubt: in his guide he mentions that the Synchronous Commands in Pass 6 auditUser must have the comand CMD/ C (wich calls vista's command line interpreter) preceding the actual command for installing the application; for example:

cmd /c %AppsRoot%\Install\AcrRead\AcroRead.msi /qb

I tried to install some apps without the CMD /C instruction but the setup fails and quits.

If I use the CMD /C command everything works OK.

The only problem is that CMD /C opens (of course) a black command window, which I don't like.

Is there any way to avoid CMD /C in the syntax?

This issue is merely cosmetic, as I said, everything works fine, but I don't like black command windows open.:P

Edited by chon_

Share this post


Link to post
Share on other sites

Hi there !

you can use the programm cmdow to make the cmd window go away. Be sure to have the program somewhere in the path, then use this commandline in the xml:

cmd /c "cmdow @ /HID & %DVDRoot%\setupcommand...."

Bye,

Alex

Share this post


Link to post
Share on other sites
I have not tried it with program installations, however I am calling regedit to import .reg files from that pass, without calling cmd.

Regedit and cmd are both native to Windows and it knows what they are. does that make sense?

To do a msi you can use this: msiexec.exe /I %SystemDrive%\APPS\Jump2reg\Jump2reg.msi /qb

When you hide that thing installing and it seems hungup remember you can Ctrl Alt Del and end task

Share this post


Link to post
Share on other sites

Thanks

regarding the CMDOW tool, I don't like it that much, so does my antivirus and prevents it form running, hence, it causes an error :P

Thanks for the MSIEXEC /I tip maxXPsoft, I'll try it tonight :thumbup

BTW, I noticed that the error occurs only when the command line has spaces, for example, the following line does NOT cuase any trouble:

%CDROM%\Install\nero\INSTALL.CMD

but, as you can see it has no spaces in it, in the other hand, the following line DOES cuase a problem:

:%CDROM%\Install\Office2007\setup.exe /adminfile CUSTOM.MSP

note the blank space between setup.exe and /adminfile and between adminfile and custom.msp.

Edited by chon_

Share this post


Link to post
Share on other sites
regarding the CMDOW tool, I don't like it that much, so does my antivirus and prevents it form running, hence, it causes an error

Antivirus during vista setup :blink: , i dont think so

@alex

I tried it in fase 4, but that didnt work.

Can you show an example from one of your commands please with cmdow in it?

Edited by sp00f

Share this post


Link to post
Share on other sites

Hi sp00f,

Can you show an example from one of your commands please with cmdow in it?

Sure. For instance in phase 4 I have the following synchronous command:

cmd /c "cmdow @ /HID & 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:\DVDRoot.txt SETX DVDRoot %i: -m"

I am attaching my xml in case you need it.

Share this post


Link to post
Share on other sites

you can use Java script (WSH) to Completely hide cmd Window , Perfect ! :thumbup

example.js

//  this's  Java Script example
var CmdPath = "your cmd path\\example.cmd";
var cmd1 = "%windir%\\System32\\cmd.exe /c " + CmdPath;
var WshShell = WScript.CreateObject("WScript.Shell");

return1 = WshShell.Run(Cmd1,0,true);

autounattend.xml

in specialize or audituser

<settings pass="specialize">
<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">
<Order>1</Order>
<Path>cscript %windir%\Setup\example.js</Path>[/color]
<Description>Run Jscript</Description>
</RunSynchronousCommand>
</RunSynchronous>
</component>
</settings>

example.cmd

 
@echo off
%CDROM%\Install\nero\INSTALL.CMD
%DVDRoot%\setupcommand...."
and more ....

Sorry ! My English is poor. :blushing:

Edited by faxio

Share this post


Link to post
Share on other sites

NOTE:

Not always needed but when you do an expand variable or a path with blank spaces in it for instance %ProgramFiles%\

use quotes around it "%ProgramFiles%\dada"

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...