MSFN Forum: Avoid "CMD /C" in Pass 6 auditUser - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Avoid "CMD /C" in Pass 6 auditUser Is it possible? Rate Topic: -----

#1 User is offline   chon_ 

  • Member
  • PipPip
  • Group: Members
  • Posts: 175
  • Joined: 04-September 03

Posted 08 November 2007 - 02:07 PM

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

This post has been edited by chon_: 08 November 2007 - 02:08 PM



#2 User is offline   midiboy 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 586
  • Joined: 04-July 04

Posted 08 November 2007 - 04:21 PM

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

#3 User is offline   Joe User 99 

  • Member
  • PipPip
  • Group: Members
  • Posts: 168
  • Joined: 24-September 03

Posted 09 November 2007 - 02:37 PM

I have not tried it with program installations, however I am calling regedit to import .reg files from that pass, without calling cmd.

#4 User is offline   maxXPsoft 

  • MSFN Master
  • Group: Developers
  • Posts: 2,482
  • Joined: 14-November 03
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 10 November 2007 - 10:49 AM

View PostJoe User 99, on Nov 9 2007, 02:37 PM, said:

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

#5 User is offline   chon_ 

  • Member
  • PipPip
  • Group: Members
  • Posts: 175
  • Joined: 04-September 03

Posted 10 November 2007 - 01:35 PM

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.

This post has been edited by chon_: 10 November 2007 - 01:36 PM


#6 User is offline   sp00f 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 712
  • Joined: 30-November 06

Posted 15 November 2007 - 06:11 AM

Quote

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?

This post has been edited by sp00f: 15 November 2007 - 07:10 AM


#7 User is offline   midiboy 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 586
  • Joined: 04-July 04

Posted 15 November 2007 - 01:44 PM

Hi sp00f,

Quote

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.

#8 User is offline   sp00f 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 712
  • Joined: 30-November 06

Posted 15 November 2007 - 03:17 PM

It works now, but not for all commands.

#9 User is offline   mostafaalkadoom 

  • Group: Members
  • Posts: 2
  • Joined: 21-December 07

Posted 22 December 2007 - 05:21 PM

Don'T WoRk

#10 User is offline   faxio 

  • Group: Members
  • Posts: 6
  • Joined: 10-September 04

Posted 26 January 2008 - 04:19 AM

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:

This post has been edited by faxio: 26 January 2008 - 04:34 AM


#11 User is offline   maxXPsoft 

  • MSFN Master
  • Group: Developers
  • Posts: 2,482
  • Joined: 14-November 03
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 26 January 2008 - 06:32 AM

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"

#12 User is offline   faxio 

  • Group: Members
  • Posts: 6
  • Joined: 10-September 04

Posted 31 January 2008 - 10:07 AM

Hidden cmd Windows
Using CHP

http://www.commandline.co.uk/chp/

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy