Go Back   TechArena Community > Technical Support > Computer Help > Windows XP > Windows XP Support
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



.inf file will not run from the command line

Windows XP Support


Reply
 
Thread Tools Search this Thread
  #1  
Old 31-01-2004
Member
 
Join Date: Aug 2005
Posts: 13
.inf file will not run from the command line

I have got an .inf gile which usually installs properly when I right click on it and select install but when I execute the command:
rundll32.exe setupapi,InstallHinfSection DefaultInstall 132
LatexWithoutCommandPrompt.inf

Then I am getting "Installation failed". You can check the whole file which is written below. Also note that a few lines may have wrapped. Thanks


"LaTeX Without Command Prompt" (LaWCP) Utility
;
; Michael A. Covington - 2004
;
; This script makes it possible to run LaTeX and TeXify
; by right-clicking on the files.

; TO INSTALL:
; First make any necessary changes in the [Strings] section.
; Then right-click on the .inf file and choose Install.
;
; To install from the command line or in a .bat file:
; rundll32.exe setupapi,InstallHinfSection DefaultInstall 132
LatexWithoutCommandPrompt.inf
;
; To uninstall, use Control Panel, Add/Remove Programs
; or use the same command but with "DefaultUninstall" instead of
"DefaultInstall".

[Version]
signature="$Windows NT$"


;; Definitions of strings used subsequently

[Strings]

EDITOR="c:\Program Files\pfe\pfe32.exe" ; editor with which to open TeX
files
BACKUP=".$$$" ; extension of editor backup
files

LATEX="c:\texmf\miktex\bin\latex.exe" ; locations of TeX programs...
TEXIFY="c:\texmf\miktex\bin\texify.exe"
DVIPS="c:\texmf\miktex\bin\dvips.exe"

NAME="LaTeX Without Command Prompt utility" ; name
to use for uninstall
UDHERE="Software\Microsoft\Windows\CurrentVersion\Uninstall\LaWCP" ; where
to keep the uninstall info
FILENAME="LatexWithoutCommandPrompt.inf" ; this
file


;; How to install and uninstall

[DefaultInstall]
CopyFiles = LaWCP.Files.Inf
AddReg = LaWCP.Reg

[DefaultUninstall]
DelFiles = LaWCP.Files.Inf
DelReg = LaWCP.Reg


;; How to copy the .inf file from its present location
;; to the windows INF folder (directory 17) so it will be available
;; at uninstall time

[DestinationDirs]
LaWCP.Files.Inf = 17

[LaWCP.Files.Inf]
%FILENAME%



;; Registry entries to be installed (and removed upon uninstallation).
;; Throughout, %11% is windows\system32, where cmd.exe resides.

[LaWCP.Reg]

;; Label editor backup files as such, and always show their extensions
HKCR,"%BACKUP%",,,"Editor Backup File"
HKCR,"%BACKUP%",AlwaysShowExt

;; Always show extensions of the following file types

HKCR,".aux",AlwaysShowExt
HKCR,".lof",AlwaysShowExt
HKCR,".log",AlwaysShowExt
HKCR,".lot",AlwaysShowExt
HKCR,".toc",AlwaysShowExt
HKCR,".ps", AlwaysShowExt
HKCR,psfile,AlwaysShowExt
HKCR,txtfile,AlwaysShowExt

;; Options for .tex and .ltx files

HKCR,".ltx",,,"LaTeX.Document"
HKCR,".ltx",AlwaysShowExt

HKCR,".tex",,,"LaTeX.Document"
HKCR,".tex",AlwaysShowExt

HKCR,LaTeX.Document\shell\open,,,"Open"
HKCR,LaTeX.Document\shell\open\command,,,"""%EDITOR%"" ""%1"""

HKCR,LaTeX.Document\shell\latex
HKCR,LaTeX.Document\shell\latex,,,"LaTeX"
HKCR,LaTeX.Document\shell\latex\command,,,"""%11%\cmd.exe"" /s /c ""color f0
&& ""%LATEX%"" ""%1"" && echo. && pause"""

HKCR,LaTeX.Document\shell\latextwice
HKCR,LaTeX.Document\shell\latextwice,,,"TeXify"
HKCR,LaTeX.Document\shell\latextwice\command,,,"""%11%\cmd.exe"" /s /c
""color f0 && ""%TEXIFY%"" ""%1"" && echo. && pause"""

;; Options for .dvi files

HKCR,".dvi",,,LaTeX.DVI
HKCR,".dvi",AlwaysShowExt

HKCR,LaTeX.DVI\shell\dvips
HKCR,LaTeX.DVI\shell\dvips,,,"DVIPS"
HKCR,LaTeX.DVI\shell\dvips\command,,,"""%11%\cmd.exe"" /s /c ""color 70 &&
""%DVIPS%"" ""%1"" && echo. && pause"""

;; Icons.
;; These are taken from Windows' stock set, so they are also used for other
purposes.

HKCR,LaTeX.Document\DefaultIcon,,,"""%11%\shell32.dll"",-151" ; page with
a gear on it
HKCR,LaTeX.DVI\DefaultIcon,,, """%11%\shell32.dll"",-153" ; window
with a gear in it

;; How to uninstall this package using Add/Remove Programs

HKLM,%UDHERE%,DisplayName,,"%NAME%"
HKLM,%UDHERE%,UninstallString,,"rundll32.exe setupapi,InstallHinfSection
DefaultUninstall 132 %17%\%FILENAME%"

;; END.

Reply With Quote
  #2  
Old 31-01-2004
Member
 
Join Date: Aug 2005
Posts: 13
Re: .inf file will not run from the command line

Alright, so I found out that the command needs to be the below:

rundll32.exe setupapi,InstallHinfSection DefaultInstall 132
..\LatexWithoutCommandPrompt.inf

I dont know why the .\ is necessary to make it start in its own directory under all circumstances.
Reply With Quote
  #3  
Old 31-08-2007
Member
 
Join Date: Aug 2007
Posts: 1
You are right, you need to specify a path to the inf on the cmd line and not just the file name.
Reply With Quote
Reply

  TechArena Community > Technical Support > Computer Help > Windows XP > Windows XP Support
Tags: ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: ".inf file will not run from the command line"
Thread Thread Starter Forum Replies Last Post
How to Turn File Sharing On/Off via command line? Obessed Networking & Security 3 10-11-2010 02:40 AM
How to create a .ISO File and burn a CD, via command-line Dubeyji Windows Software 6 15-09-2010 06:00 AM
Create torrent-file via command line GurdeepS Technology & Internet 8 23-06-2010 06:52 AM
Software to break a PDF file from the command line AmdUser Windows Software 2 05-05-2009 02:48 PM
Add a File Printer port from Command Line mandalorian2 Software Development 0 29-04-2008 08:52 PM


All times are GMT +5.5. The time now is 04:01 PM.