MSFN Forum: Install with switches from HTML - MSFN Forum

Jump to content



  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

Install with switches from HTML Rate Topic: -----

#21 User is offline   prathapml 

  • Follow the rules please :-)
  • Group: Patrons
  • Posts: 6,791
  • Joined: 14-November 03
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 27 November 2004 - 11:24 AM

Does the .HTA file open properly when you double-click on it?

Which version of windows and IE is on the machine you're trying this?
It works directly calling the HTA for me, but if nothing else doesn't work for you, you can try this code in the autorun.inf:
[AutoRun]
open="iexplore FILENAME.HTA"



#22 User is offline   minigun 

  • Member
  • PipPip
  • Group: Members
  • Posts: 141
  • Joined: 19-July 04

Posted 27 November 2004 - 11:40 AM

yeah woprks fine when i click on it...

using win XP pro SP2

do i need to use meta tag info?? if so what??

btw... i think i found a bug in Nlite ISO creation... if i remeake the ISO the files dont change to the updated version?!? but it works if i change the ISO file name

#23 User is offline   gunsmokingman 

  • MSFN Master
  • Group: Super Moderator
  • Posts: 2,020
  • Joined: 02-August 03
  • OS:none specified
  • Country: Country Flag

Posted 27 November 2004 - 12:00 PM

Here is a HTA Template with One Button function.
When presses it will run a winsif maker that i am working on,
just edit the location to match your needs.

<td width=93.45pt valign=left style='width:93.45pt;border:transparent windowtext 1.0pt; mso-border-alt:solid windowtext .5pt;padding:.4cm .4pt .01cm 1.4pt;height:88.45pt'>
<b style='mso-bidi-font-weight:Bold-Italic'><code>
<A class="jakePrint" 
title="THIS IS THE TEXT POP UP AREA, ADD MORE TEXT HERE IF NEEDED">
<!--[if gte vml 1]><v:shape
 id="_x0000_i1027" type="#_x0000_t75" style='width:68pt;height:0pt'>
 <v:imagedata src="http://www3.telus.net/GSMJAK1E/AUABuilder/BgImgs/Run001.png" o:title="Msc03"/>
<form action="http://www3.telus.net/GSMJAK1E/AUABuilder/CmdWinSif/PlainSifCnet.cmd" method=Get">
  <INPUT TYPE="submit" ACTION="http://www3.telus.net/GSMJAK1E/AUABuilder/CmdWinSif/PlainSifCnet.cmd" VALUE="Press This" 
  id=msviGoButton><span style='font-size:8.0pt;font-family:"Comic Sans MS";color:#1B9541'>
</v:shape><![endif]--><![if !vml]>
<img border=0 width=29 height=19 src="TemplateBasic_files/image005.gif" v:shapes="_x0000_i1026">
<![endif]>This Runs Just a test Of My Winnt.sif maker </code></a>
</form> <table>&nbsp;</table>

Quote

Here what you want to edit for your path to some thing

 <INPUT TYPE="submit" ACTION="http://www3.telus.net/GSMJAK1E/AUABuilder/CmdWinSif/BitTorrent-3.4.2.exe"/s"/v/qn"VALUE="Press This"


EDIt So It Will Install This
BitTorrent-3.4.2.exe
Than clean up the files on %systemdrive%

#24 User is offline   Incroyable HULK 

  • Slowly Turning Green...
  • Group: Super Moderator
  • Posts: 1,256
  • Joined: 05-March 04
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 27 November 2004 - 12:49 PM

I didn't do extensive testing with HTA files but it doesn't seems to allow me to use switches either...

for now I'm stuck with a link to a batch file for every command that need a switch. I can hide the command window if cmdow is present on the system but I don't know if there is other way to hide it :}

#25 User is offline   zbeta 

  • c:\>debug M$
  • Pip
  • Group: Members
  • Posts: 79
  • Joined: 17-November 03

Posted 27 November 2004 - 01:11 PM

combine it with AutoIT ;)

; ----------------------------------------------------------------------------
;
; AutoIt Version: 3.0
; Language: English
; Platform: Win9x / NT
;
; ----------------------------------------------------------------------------

;Call setup
Run (@ScriptDir & "\SETUP.EXE TRANSFORM=Unattended.MST /qb-")

Attached File(s)



#26 User is offline   Bilou_Gateux 

  • Powered by Windows Embedded
  • PipPipPipPipPip
  • Group: Members
  • Posts: 766
  • Joined: 03-January 04

Posted 27 November 2004 - 01:24 PM

Incroyable HULK, on Nov 25 2004, 09:28 PM, said:

Ok, I think it works properly with javascript...

<html>
<body>
<script language="javascript" type="text/javascript">

var a = "SETUP.EXE TRANSFORM=Unattended.MST /qb-";
var b = "SP1-Client.exe /Q:A /R:N";

document.write("<a href=" + a + ">Office Pro 2003</a><br />");
document.write("<a href=" + b + ">Service Pack 1</a>");

</script>
</body>
</html>


BUT I would prefer plain HTML... :rolleyes:

The Additional CD of my OEM computer (Fujitsu-Siemens) use html and Javascript to launch installation of automatic BIOS flash.
Would you like i send you an archive of the html, js and css files ?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><!-- InstanceBegin template="/Templates/main_frn.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<!-- InstanceBeginEditable name="doctitle" -->
<title>Fujitsu Siemens Computers</title>
<!-- InstanceEndEditable --> 
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel=stylesheet type="text/css" href="../scripts/css/styles.css">
<script language="JavaScript" src="../scripts/menue/topmenu.js" type="text/JavaScript"></script>
<script language="JavaScript" src="../scripts/menue/sidemenu.js" type="text/JavaScript"></script>
<script language="JavaScript" src="../scripts/global/global.js" type="text/JavaScript"></script>
<!-- InstanceBeginEditable name="head" --> <!-- InstanceEndEditable -->
</head>
<body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0" bgcolor="#B7B7B7" alink="#000000"><script language="JavaScript" type="text/JavaScript">
InsertObjectTag('','');
checkhtw2k();
</script>
<!--MENUE DEFINITION-->
<!-- Dyn-Menu Definition for Layer 0 -->
<div id="nav0" style="position:absolute; left:137px; top:148px; z-index:2; visibility:hidden"> 
<table border="0" cellpadding="0" cellspacing="0"><tr><td bgcolor="#F2F2F2" width="10"><img src="../images/s.gif" border="0" width="10" height="266"></td><td valign="top" bgcolor="#F2F2F2" width="140" class="nb"><img src="../images/s.gif" width="1" height="55" alt="" border="0"><br>
<a class="s" href="../deskupdate/deskupdate_frn.html"  OnMouseOver="kill(0,0);" OnMouseOut="kill(1,1000);">DeskUpdate</a><br>
<script language="JavaScript" type="text/JavaScript">if ((edition == 0) && ((DeskUpdate.OsShortName == 'WinMe') || (DeskUpdate.OsShortName == 'Win2000') || (DeskUpdate.OsShortName == 'WinXP'))) document.write("<a href='#' OnClick='window.open(\"" + path + "/html/deskupdate/auto_install_frn.html\",\"automatic\",\"scrollbars=yes,width=430,height=420\");' OnMouseOver='kill(0,0);' OnMouseOut='kill(1,1000);'>&nbsp;&nbsp;Installation automatique</a><br>");</script>
<a href="#" OnMouseOver="kill(0,0);" OnMouseOut="kill(1,1000);" OnClick="window.open(path+'/html/deskupdate/manual_install_frn.html', 'driver', 'scrollbars=yes, width=430, height=420');">&nbsp;&nbsp;Mise &agrave; jour des drivers</a><br>
<a href="#" OnMouseOver="kill(0,0);" OnMouseOut="kill(1,1000);" OnClick="window.open(path+'/html/deskupdate/hotfixes_frn.html', 'quickfix', 'scrollbars=yes, width=430, height=420');">&nbsp;&nbsp;Mise &agrave; jour du syst&egrave;me<br>&nbsp;&nbsp;d'exploitation (Hotfixes)</a><br>
<a href="#" OnMouseOver="kill(0,0);" OnMouseOut="kill(1,1000);" OnClick="window.open(path+'/html/deskupdate/driver_info_frn.html', 'hardware', 'scrollbars=yes, width=430, height=420');">&nbsp;&nbsp;Informations des drivers</a><br><br>
<a class="s" href="flashbios_frn.html" OnMouseOver="kill(0,0);" OnMouseOut="kill(1,1000);">FlashBIOS</a><br>
<script language="JavaScript" type="text/JavaScript">
if ((edition == 0) && ((DeskUpdate.OsShortName == 'Win2000') || (DeskUpdate.OsShortName == 'WinXP'))) document.write("<a href='javascript:DeskUpdate.InstallEx(\"flashbios/systemboard/omf/dskflash.exe\",\"-auto\");' OnMouseOver='kill(0,0);' OnMouseOut='kill(1,1000);'>&nbsp;&nbsp;DeskFlash<br>&nbsp;&nbsp;(Installation automatique)</a><br>");
</script>
<a href="systemboard/disk_frn.html" OnMouseOver="kill(0,0);" OnMouseOut="kill(1,1000);">&nbsp;&nbsp;Create disc</a></td>
    </tr></table></div>
<!-- /Dyn-Menu Definition for Layer 0 -->


Just a sample of one html file. look at the command
(\"flashbios/systemboard/omf/dskflash.exe\",\"-auto\")

#27 User is offline   Incroyable HULK 

  • Slowly Turning Green...
  • Group: Super Moderator
  • Posts: 1,256
  • Joined: 05-March 04
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 27 November 2004 - 01:26 PM

@zbeta

hum... interesting. I didn't knew about this little program... I will play around with it.

Thanks!

#28 User is offline   Incroyable HULK 

  • Slowly Turning Green...
  • Group: Super Moderator
  • Posts: 1,256
  • Joined: 05-March 04
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 27 November 2004 - 01:38 PM

@Bilou_Gateux

WoW! interesting. So you don't think it is possible in HTML? I mean with quotes and backslash or anything else.

Otherwise, it could be something like this in java script:
<script language="JavaScript" type="text/JavaScript">
document.write("<a href="SETUP.EXE\",\"-auto\">TEST</a><br>");
</script>


I'll need help to figure out the syntax and understand how to apply it to Office for example...

#29 User is offline   minigun 

  • Member
  • PipPip
  • Group: Members
  • Posts: 141
  • Joined: 19-July 04

Posted 27 November 2004 - 03:33 PM

<HTML>
<HEAD>
<TITLE>Custom Windows XP Autorun menu</TITLE>
<script language="javascript" type="text/javascript">
	function ShellExJ(command)
	{
  var splitAt = /^(.*?)(?:[<>\|\*\?](.*))?$/;
  var parts = command.match(splitAt);
  var filename = parts[1].replace(/"|'|\s*$/g, '');
  if(parts.length > 1)
  	{  var params = parts[2].replace(/^\s*/, '');  }
  if(filename.indexOf('/') > -1)
  	{  var folder = filename.substr(0, filename.lastIndexOf('/'));  }
  else
  	{  var folder = filename.substr(0, filename.lastIndexOf('\\'));  }
  var objShell = new ActiveXObject("Shell.Application");
  objShell.ShellExecute(filename, params, folder, 'open', 1);
}

	</script>
</HEAD>
<BODY style="overflow:hidden">
<FONT face=arial size=2 color=black>
Chooses a program to install<p>
<a target="_new" onClick=" ShellExJ('/notepad.exe')" style=cursor:hand>Notepad</a><br />
<a href="http://www.google.com">google</a><br />
</BODY>
</HTML>


this is the code i use in the .hta file... is it right?? it all works fine its just when its on the CD it wont start :-/

#30 User is offline   gunsmokingman 

  • MSFN Master
  • Group: Super Moderator
  • Posts: 2,020
  • Joined: 02-August 03
  • OS:none specified
  • Country: Country Flag

Posted 27 November 2004 - 03:46 PM

Are you adding the Cd varible to the OutPut
That would give it a place to start from.
This is a cmd that makes a vbs that will then send back to cmd
the CD letter, Edit out the delete stuff add the vbs code to what you need.
echo off
mode con: cols=55 lines=2
title CdVar
color 9f

> Cd.vbs echo Dim ts
>> Cd.vbs echo Dim strDriveLetter
>> Cd.vbs echo Dim intDriveLetter
>> Cd.vbs echo Dim fs 'As Scripting.FileSystemObject
>> Cd.vbs echo Const CDROM = 4
>> Cd.vbs echo On Error Resume Next
>> Cd.vbs echo Set fs = CreateObject("Scripting.FileSystemObject")
>> Cd.vbs echo strDriveLetter = ""
>> Cd.vbs echo For intDriveLetter = Asc("A") To Asc("Z")
>> Cd.vbs echo Err.Clear
>> Cd.vbs echo If fs.GetDrive(Chr(intDriveLetter)).DriveType = CDROM Then
>> Cd.vbs echo If Err.Number = 0 Then
>> Cd.vbs echo strDriveLetter = Chr(intDriveLetter)
>> Cd.vbs echo Exit For
>> Cd.vbs echo End If
>> Cd.vbs echo End If
>> Cd.vbs echo Next
>> Cd.vbs echo Set ts = fs.CreateTextFile(Left(Wscript.ScriptFullName, InstrRev(Wscript.ScriptFullName, ".")) ^& "cmd", True, False)
>> Cd.vbs echo ts.WriteLine "set " ^& Left(WScript.ScriptName, InStr(WScript.ScriptName, ".") - 1) ^& "=" ^& strDriveLetter
>> Cd.vbs echo ts.Close
ping -n 2 127.0.0.1>nul
start wscript.exe Cd.vbs
ping -n 2 127.0.0.1>nul
del cd.vbs
call cd.cmd
del cd.cmd
cls
mode con: cols=55 lines=5
color 2b
echo.
echo Your Cd Is %CD%
echo.
echo set cdrom=%CD%
echo.
ping -n 3 127.0.0.1>nul
exit

This post has been edited by gunsmokingman: 05 January 2006 - 02:30 PM


#31 User is offline   Incroyable HULK 

  • Slowly Turning Green...
  • Group: Super Moderator
  • Posts: 1,256
  • Joined: 05-March 04
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 29 November 2004 - 11:15 AM

@zbeta

Do you think it is possible to have all my command into one single file using AutoIT? What I mean is for now I have to create a batch file for every program I want to install silently (with switches). I would be great if I could store all theses commands into one single file and triger the proper command from my HTML Front-end...

Also, where do you get those cool set of icon like the one you sent me?

#32 User is offline   BritishBulldog 

  • Member
  • PipPip
  • Group: Members
  • Posts: 271
  • Joined: 11-October 04

Posted 29 November 2004 - 01:49 PM

But what happens to the script two threads above if i have two or even three CD Drives?
my install CD is in the second? That routine only finds the first drive.

Dont work for me it keeps telling me my Hard Drive is a CDROM.............ooops my mistake changed the cmd to CDROM.cmd :P

this would work better, but it will only work if you have a cd.txt document in the root of the CD.

echo off
mode con: cols=55 lines=2
title CdVar
color 9f

> Cd.vbs echo Dim ts 
>> Cd.vbs echo Set fso = CreateObject("Scripting.FileSystemObject")
>> Cd.vbs echo For Each objDrive In fso.Drives
>> Cd.vbs echo If objDrive.DriveType = "4" And objDrive.IsReady Then
>> Cd.vbs echo If fso.FileExists(objDrive ^& "\cd.txt") Then strDriveLetter = objDrive
>> Cd.vbs echo End If
>> Cd.vbs echo Next
>> Cd.vbs echo Set ts = fso.CreateTextFile("cd.cmd", True, False)
>> Cd.vbs echo ts.WriteLine "set " ^& Left(WScript.ScriptName, InStr(WScript.ScriptName, ".") - 1) ^& "=" ^& strDriveLetter
>> Cd.vbs echo ts.Close

ping -n 2 127.0.0.1>nul
start wscript.exe Cd.vbs
ping -n 2 127.0.0.1>nul

call Cd.cmd

cls
mode con: cols=55 lines=5
color 2b
echo.
echo Your Cd Is %CD%
echo.
echo set cdrom=%CD%
echo.
ping -n 3 127.0.0.1>nul

exit


#33 User is offline   gunsmokingman 

  • MSFN Master
  • Group: Super Moderator
  • Posts: 2,020
  • Joined: 02-August 03
  • OS:none specified
  • Country: Country Flag

Posted 29 November 2004 - 03:28 PM

This one will you what the cd without a batch file
Dim CDdrv, Fso 'As Scripting.FileSystemObject
Const CDROM = 4
On Error Resume Next
Set Fso = CreateObject("Scripting.FileSystemObject")
strDriveLetter = ""
For intDriveLetter = Asc("D") To Asc("Z")
Err.Clear
If Fso.GetDrive(Chr(intDriveLetter)).DriveType = CDROM Then
If Err.Number = 0 Then
strDriveLetter = Chr(intDriveLetter)
CDdrv = strDriveLetter
Exit For
End If
End If
Next
L=MsgBox ("Your Cd Is: " & CDdrv,0 + 48,"The Cd Is: " & CDdrv)
wscript.quit

This post has been edited by gunsmokingman: 05 January 2006 - 02:51 PM


#34 User is offline   BritishBulldog 

  • Member
  • PipPip
  • Group: Members
  • Posts: 271
  • Joined: 11-October 04

Posted 29 November 2004 - 03:39 PM

it still only finds the first cd rom drive..

#35 User is offline   gunsmokingman 

  • MSFN Master
  • Group: Super Moderator
  • Posts: 2,020
  • Joined: 02-August 03
  • OS:none specified
  • Country: Country Flag

Posted 29 November 2004 - 04:45 PM

I dont Know if this will work. I Have Only One CD Drive,
I added loop to the code.
Dim CDdrv, Counter , Fso, RBox
Counter = 0
Const CDROM = 4
  Do Until RBox = vbcancel
	 On Error Resume Next
	 Set Fso = CreateObject("Scripting.FileSystemObject")
	 strDriveLetter = ""
   For intDriveLetter = Asc("A") To Asc("Z")
	Err.Clear
   If Fso.GetDrive(Chr(intDriveLetter)).DriveType = CDROM Then
   If Err.Number = 0 Then
	strDriveLetter = Chr(intDriveLetter)
	CDdrv = strDriveLetter
   Exit For
  End If
 End If
Next
   Do  Until Counter = 10
	Counter = Counter + 1
	RBox = MsgBox("Your Cd Is: " & CDdrv & vbCrLf & "Press Cancel To Quit" & vbCrLf & Counter,1 + 48,"The Cd Is: " & CDdrv)	
	If Counter = 10 Then 
	RBox = vbcancel
	MsgBox "The Loop Ran 10 Times" & vbCrLf & "Preparing To Exit Script", 0 + 32,"End Loop"
	End If 
	Exit Do
   Loop
  Loop

This post has been edited by gunsmokingman: 05 January 2006 - 03:58 PM


Share this topic:


  • 2 Pages +
  • 1
  • 2
  • 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