Re: batch file wont run

Tech-Archive recommends: Fix windows errors by optimizing your registry



I did what you said, I then ran an advertisement to my pc. This is the error
it got:
Severity Type Site code System Description Date / Time
Component Message ID

Error Milestone OTT PC1276 An error occurred while
preparing to run the program for advertisement "OTT200F1" ("OTT00059" -
"irfanview ini file"). The operating system reported error 2147942402: The
system cannot find the file specified. Additional program properties:
Command line: irfanview.vbs Working directory: Drive letter (? = any):
Possible cause: This message most commonly occurs when the program's
command-line executable file could not be found, when a required drive
letter connection to a distribution point could not be established, or when
the program is configured to use the SMS Software Installation Account but
the account is not specified, could not be found, or does not have the
appropriate permissions. Solution: Check each of the items listed above.
11/7/2007 11:20:34 AM Software Distribution 10003





Hopefully this will shed some light on my problem



thanks,

Scott


"Kim Oppalfens [MVP]" <""Kim dot Oppalfens\"@google mail.com"> wrote in
message news:e%23ZoCBMIIHA.4732@xxxxxxxxxxxxxxxxxxxxxxx
Scott wrote:
A collegue took my batch file and wrote a vb script, since the batch file
isn't working anyway, i was wondering if a vb script would have a greater
chance of suceeding? If so, how do i use it? do i paste it into the
command line, or is there something else i have to do first?
Here is the script:
' VBScript.

Dim FSO

Set FSO = CreateObject("Scripting.FileSystemObject")

FSO.CopyFile "\\pc1276\restore\i_view32.ini", "c:\program
files\irfanview\i_view32.ini"



Scott


"Matthew Hudson" <MatthewHudson@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message news:49F0E988-8DC8-42AF-B00A-2B9D1039B635@xxxxxxxxxxxxxxxx
Since Error code 1 is a general error it would be hard to figure out.

since you have it half working do this. Re-run the adv with "Allow user
to
interact" Go into the batch file and add a "pause" at the last line.
now
re-run the adv. It should install correctly and should try to copy.
Since
it fails with the batch file it will pause so you can see the dos error.
See
how that goes...
--
-----------------------
http://sms-hints-tricks.blogspot.com/


"Scott" wrote:

Partial success!!

first to confirm your question, yes i have 2 programs in one package.

I was able to get the first program to install in the default "out of
the
box" configuration, however, the second program which copies a modified
ini
file into the clients progam files directory failed with the message:

Severity Type Site code System Description Date / Time Component
Message ID
Error Milestone OTT PC1276 The program for advertisement "OTT200EC"
failed
("OTT00059" - "irfanview ini file"). A failure exit code of 1 was
returned.
User context: NT AUTHORITY\SYSTEM Possible cause: Systems Management
Server (SMS) determines status for each program it executes. If SMS
cannot
find or correlate any installation status Management Information Format
(MIF) files for the program, it uses the program's exit code to
determine
status. An exit code of 1 is considered a failure. Solution: For more
information on the exit code, refer to the documentation for the
program you
are distributing. 11/5/2007 10:18:21 AM Software Distribution 10006

Any ideas on how to tweak this?

Scott

"Matthew Hudson" <MatthewHudson@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message
news:7A80E06F-4B40-4D38-B823-82AFB68A5FAB@xxxxxxxxxxxxxxxx
Yes it should run it in one pass. If you have run it on your test
machine
multiple times you might want to click the "Always run the previous
program"
That way they all run.

See if that will help.

You should have 2 programs in 1 package correct.
--
-----------------------
http://sms-hints-tricks.blogspot.com/


"Scott" wrote:

thanks Matthew,

I made the modification you suggested, however, sms will still not
install
the program (irfanview and the accompanying ini package(the batch
file
listed below)

If i run the packages separtely, it will work, but i thought using
the
"run
this program first" option, that i could do it in one pass.

Any ideas?
"Matthew Hudson" <MatthewHudson@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message
news:3EBF8A7A-8A36-4038-928B-52B139AA64CA@xxxxxxxxxxxxxxxx
The "/y" goes in the front for copy and the back for xcopy. It
should
read
copy /Y "\\pc1276\restore\i_view32.ini" "c:\program
files\irfanview\i_view32.ini"


-----------------------
http://sms-hints-tricks.blogspot.com/


"Scott" wrote:

I have installed a program successfully using sms. I now have to
modify
they
ini file to enhance some user settings.

I thought i could deploy the program and the ini file modification
in
the
same package. the install would run silently, then pull the batch
file
which
basically copies the correct version of the ini file and overwrites
the
default ini file on the clients workstation. I can get these two
programs to
work independently ( two separate packages, then advertise them.)
This
is a
lousy way of doing it.

here is the batch file:
copy "\\pc1276\restore\i_view32.ini" "c:\program
files\irfanview\i_view32.ini" /y

I have named it batchfile.bat

any help would be greatly appreciated.

Scott









You either put the vbs in the command line, or you can put in cscript.exe
yourvbs.vbs

--
"Everyone is an expert at something"
Kim Oppalfens - Sms Expert for lack of any other expertise
Windows Server System MVP - SMS
http://www.blogcastrepository.com/blogs/kim_oppalfenss_systems_management_ideas/default.aspx


.



Relevant Pages

  • Re: batch file wont run
    ... It should install correctly and should try to copy. ... Server (SMS) determines status for each program it executes. ... An exit code of 1 is considered a failure. ... default ini file on the clients workstation. ...
    (microsoft.public.sms.setup)
  • Re: batch file wont run
    ... I was hoping to deploy the program default install, and the modified ini ... file in one sms package deployment. ... Personally I would create a SMS Installer package for me it is very quick ...
    (microsoft.public.sms.setup)
  • Re: batch file wont run
    ... You either need to run this with user rights, Grant guest access to the share and folder, or create a MSI/SMS Install Package with includes the files. ... Personally I would create a SMS Installer package for me it is very quick and simple to install the file and still run under the local system content. ... An exit code of 1 is considered a failure. ...
    (microsoft.public.sms.setup)
  • Deploying Office 2003 Failed
    ... Exit code was an error. ... Action ended 2:23:26: INSTALL. ... When I logged on to a client machine as a user with administrative privilege on the client and run the script, ... I used similar script to deploy Office XP using SMS 2.0 and it worked. ...
    (microsoft.public.sms.swdist)
  • Deploying Office 2003 Failed
    ... Exit code was an error. ... Action ended 2:23:26: INSTALL. ... When I logged on to a client machine as a user with administrative privilege on the client and run the script, ... I used similar script to deploy Office XP using SMS 2.0 and it worked. ...
    (microsoft.public.sms.swdist)