Jump to content











Photo
- - - - -

running command line options from apps in 7pe


  • Please log in to reply
2 replies to this topic

#1 catfish182

catfish182
  • Members
  • 8 posts
  • Location:Central Ohio Area
  • Interests:computers. movies. trying not to piss off my wife.
  •  
    United States

Posted 31 May 2011 - 01:12 AM

Hello,
I am still working on a disc where ghost,killdisk, and MvPcInfo can run. I now have working scripts for all of them BUT i would like to set some command line options.

killdisk_win.exe -em=2 -v=100 -ea -nc

this is an example of what i would have killdisk do.

I can not get a batch file to work and my searches are not doing well for me.

So first question- has this been asked before and if so can you point a blind man in that direction?

assuming i am not blind-

How do i add the command line scripting into my script?

thank you in advance for anything

#2 RoyM

RoyM

    Frequent Member

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

Posted 31 May 2011 - 06:57 AM

You can add the command line options directly from shortcuts like this:

Add_Shortcut Syntax:
Add_Shortcut,Type,StartMenuFolder,(path\)FileName,Title,Work Folder,Parameters,(path\)IconFile#$cIconIndex,StartMode=(1,2,3),ToolTipText(only Gena/LiveXP)

Examples:
This examples will start Wise Registry Cleaner Free using Runscanner, Take note of the Parameters section in Syntax above .
Add_Shortcut,Desktop,,"%SystemRoot%\system32\Runscanner.exe","Wise Registry Cleaner Free v5.94","%SystemRoot%\system32","/t 5000 /m+ /sv /sd /ac /y /v /x X:\program#$sfiles\%ProgramFolder%\WiseRegistryCleaner.exe","X:\program#$sfiles\%ProgramFolder%\WiseRegistryCleaner.exe",1


This example will start Killdisk with parameters in your post;
Add_Shortcut,Desktop,,%PE_Programs%\killdisk_win.exe,%ProgramTitle%,%PE_Programs%,"-em=2 -v=100 -ea -nc"

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
How to create/write a batch file from Winbuilder:

[variables]
%ProgramTitle%=ComputerName
%ProgramEXE%=ComputerName.cmd
%ProgramFolder%=ComputerName


[process]
If,ExistFile,%Target_Sys%\%ProgramEXE%,FileDelete,%Target_Sys%\%ProgramEXE%
FileCreateBlank,%Target_Sys%\%ProgramEXE%
TXTAddLine,%Target_Sys%\%ProgramEXE%,start#$s/wait#$s%SystemRoot%\system32\wpeutil.exe InitializeNetwork,Append
TXTAddLine,%Target_Sys%\%ProgramEXE%,%SystemRoot%\System32\reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v "RegisteredOwner" /t REG_SZ /d "System" /f,Append
TXTAddLine,%Target_Sys%\%ProgramEXE%,%SystemRoot%\System32\reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ActiveComputerName" /v "ComputerName" /t REG_SZ /d "%ComputerName%" /f,Append

Above lines will create ComputerName.cmd in %TargetDir%\Windows\sys32 folder:


Contents of ComputerName.cmd:

start /wait %SystemRoot%\system32\wpeutil.exe InitializeNetwork
%SystemRoot%\System32\reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v "RegisteredOwner" /t REG_SZ /d "System" /f
%SystemRoot%\System32\reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ActiveComputerName" /v "ComputerName" /t REG_SZ /d "%ComputerName%" /f

#3 catfish182

catfish182
  • Members
  • 8 posts
  • Location:Central Ohio Area
  • Interests:computers. movies. trying not to piss off my wife.
  •  
    United States

Posted 31 May 2011 - 04:54 PM

Thank you! i will let you know how well it goes!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users