Jump to content


  • 0
P@docIT

Having trouble installing an app via OSD TS

Question

I am trying to install an app via OSD TS and having trouble. The command line works manually. Below is the error I'm getting and a description of the TS.

 

The task sequence execution engine failed executing the action (Install Remedy) in the group (Helpdesk Apps) with the error code 2147942402

Action output: 80070002 (e:\nts_sms_fre\sms\framework\core\ccmcore\commandline.cpp,997)

clCommandLine.Execute( uOptions, pszWorkingDir, lpDesktop ), HRESULT=80070002 (e:\nts_sms_fre\sms\client\osdeployment\installsoftware\runcommandline.cpp,558)

Entering ReleaseSource() for C:\_SMSTaskSequence\Packages\CR200091

reference count 1 for the source C:\_SMSTaskSequence\Packages\CR200091 before releasing

Delete source directory C:\_SMSTaskSequence\Packages\CR200091

Released the resolved source C:\_SMSTaskSequence\Packages\CR200091

cmd.Execute(pszPkgID, sProgramName, dwCmdLineExitCode), HRESULT=80070002 (e:\nts_sms_fre\sms\client\osdeployment\installsoftware\main.cpp,385)

CreateProcess failed. Code(0x80070002)

Command line execution failed (80070002)

Failed to executecommand line 'setup -i silent -DOPTIONS_FILE="C:\_SMSTaskSequence\WDPackage\Scripts\CustomScripts\Options.txt"' .

The system cannot find the file specified. (Error: 80070002; Source: Windows)

Install Software failed to run command line, hr=0x80070002. The operating system reported error 2147942402: The system cannot find the file specified.

 

I can clearly see what the problem (in red) is but I'm not sure why it's happening. TS is setup as run command line because it seems like the "options" file needs to have an absolute path to work properly. The first time I tried running it manually I placed the "options" file in the same folder as the setup.cmd but I still had to add the entire path in order for it to work. I have this same setup to install Cisco iron port and that works perfectly. I've updated my MDT toolkit package to make sure the custom scripts folder is up to date. BMC Remedy Client 7.5 package is just source files, no program.

 

post-10749-0-31832200-1320864841_thumb.png

 

Quick side note: the setup file is a setup.cmd file that passes some arguments on to a setup.exe in a different folder. The app does not install properly if you don't launch it using the setup.cmd

 

I followed the below steps on cretaing a silent install and it works manually but I can't seem to apply it to an SCCM ts.

 

Hello everyone. I've read the 7.5 installation guide (appendix B) which talks about using the silent installer. I'm attempting to silently install the User Tool. According to the installation guide you should create a file named "Options.txt" and copy the installation options into this file from the example options file (named "ARSystem-ini-template.txt" found in the utility folder).

 

 

 

I have the following contents in the "Options.txt" file:

-P installLocation=c:\\Program Files\\BMC Software\\ARSystem

-A featureARSystemClients

-A featureUserTool

-A featureODBC

-A featureCrystalReports

-J USER_TOOL_SELECTED_VIEW_LANGUAGES=de,en,es,fr,it,ja,ko,ru,zh_CN

-J BMC_AR_SERVER_INSTANCES_LIST=RemedyServerName,0

-A featureAlertTool

 

I built a BAT file which will launch the "setup.cmd" file using the proper options.

 

NOTE: Please note, this only works while installing from a local or a mapped drive. It doesn't work with the installer files in a UNC path.

 

I named the BAT file "install.bat" and put it in the same folder where the "setup.cmd" file is located (in my case it's in "C:\Software Downloads\ARS 7.5\Patch 002\ARSuiteKitClientWindows\Disk1"). The contents of the "install.bat" file are as follows:

setup -i silent -DOPTIONS_FILE="C:\Software Downloads\ARS 7.5\Patch 002\ARSuiteKitClientWindows\Disk1\Options.txt"

That's it, easy cheesy. When I lauch the "install.bat" file the Remedy user tool is installed and the specified server is added as the default Remedy server.

 

Thanks,

Mike

Share this post


Link to post
Share on other sites

8 answers to this question

Recommended Posts

  • 0

Have you tried packaging up the thing and installing it as software and not a Run Command Line item? And if you're having problems, then maybe post the code you're using in the .CMD file. Ususally the culprit is the path(s) being used in the script...

Share this post


Link to post
Share on other sites

  • 0

Have you tried packaging up the thing and installing it as software and not a Run Command Line item? And if you're having problems, then maybe post the code you're using in the .CMD file. Ususally the culprit is the path(s) being used in the script...

 

I have tried it both ways. When I did it as "install Software" I tried using the install.bat method taken from what I posted above, Same results. I changed the command line the from just "setup" to "setup.cmd" and it seems to partially install the app now. However based on some testing i've done manually the patrtial install points to it not being able to read the "Options.txt" file. Is there a way to provide an absolute path other than deployroot? Although I have that same method working for 2 other TS and they work fine. Below is the contents of the the setup.cmd file. This is not written by me, it is the normal installer for this application.

 

@echo off

@if not "%ECHO%" == "" echo %ECHO%

@if "%OS%" == "Windows_NT" setlocal

 

:: ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::

:: GET SETUP.EXE ::

:: ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::

set __SETUP_EXE=%~d0%~p0\InstData\VM\setup.exe

if exist "%__SETUP_EXE%" goto getargs

 

set __SETUP_EXE=%~d0%~p0\InstData\NoVM\setup.exe

if not exist "%__SETUP_EXE%" goto nosetupexe

goto getargs

 

:nosetupexe

echo No setup.exe found.

goto end

 

:: ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::

:: GET COMMAND LINE ARGUMENTS ::

:: ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::

:: Get the command line

:getargs

 

:: Decide how to startup depending on the version of windows

if NOT "%OS%"=="Windows_NT" goto Windows98AndMEGetargs

if "%eval[2+2]" == "4" goto 4NTGetargs

set __INSTALLER_COMMAND_LINE_ARGS=%*

goto runcommand

 

:Windows98AndMEGetargs

:: Loop allows for any number of arguments up to the command line limit

set __INSTALLER_COMMAND_LINE_ARGS=

:loop

if "%1" == "" goto runcommand

if not "%__INSTALLER_COMMAND_LINE_ARGS%"=="" set __INSTALLER_COMMAND_LINE_ARGS=%__INSTALLER_COMMAND_LINE_ARGS% %1

if "%__INSTALLER_COMMAND_LINE_ARGS%"=="" set __INSTALLER_COMMAND_LINE_ARGS=%1

shift

goto loop

 

:: 4NT Shell from jp software

:4NTGetargs

set __INSTALLER_COMMAND_LINE_ARGS=%$

goto runcommand

 

:: ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::

:: RUN SETUP.EXE ::

:: ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::

:runcommand

"%__SETUP_EXE%" %__INSTALLER_COMMAND_LINE_ARGS%

 

:: ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::

:: DELETE VARIABLES ::

:: ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::

set __SETUP_EXE=

set __INSTALLER_COMMAND_LINE_ARGS=

 

:: ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::

:: END ::

:: ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::

:end

@if "%OS%" == "Windows_NT" endlocal

Share this post


Link to post
Share on other sites

  • 0

Okay, since my BATCHfu is awful these days, and I admit, I'm worn out right now, I thought I'd toss out some VBScript code you could try until either my brain gets back into gear, or someone else chimes in.

 

You can use Notepad to copy the following into a .VBS file. Then your "setup.exe" file should be up one directory level, and your "options.txt" file should reside in the same folder as the script (you can name the folder whatever you want). Once you do that, test it out manually to make sure it works. Then, before using in SCCM, delete the last line so it doesn't cause a poup during deployment (you won't be able to see the popup, so things just hang).

 

And if that doesn't work for you, do some digging on the syntax need for a batch file to get the current directory instead of using a variable for the deployment root (sorry, like I said, my brain is worn out)...

 

 

Option Explicit

Dim objWshShell, objFSO, strScriptFileDirectory, strScriptParentDirectory

Set objWshShell = WScript.CreateObject("WScript.Shell")

Set objFSO = CreateObject("Scripting.FileSystemObject")

strScriptFileDirectory = objFSO.GetParentFolderName(wscript.ScriptFullName)

strScriptParentDirectory = objFSO.GetParentFolderName(strScriptFileDirectory)

If objFSO.FileExists(strScriptParentDirectory & "\setup.exe") Then

If objFSO.FileExists(strScriptFileDirectory & "\Options.txt") Then

objWshShell.Run """" & strScriptParentDirectory & "\setup.exe"" -i silent -DOPTIONS_FILE=""" & strScriptFileDirectory & "\Options.txt""", 1, True

Else

'Abort the VBScript and return a failure code to SCCM because the Options.txt file wasn't found.

Wscript.Quit(1)

End If

Else

'Abort the VBScript and return a failure code to SCCM because the Setup.exe file wasn't found.

Wscript.Quit(1)

End If

Wscript.echo "If both files exist in the designated spots, then the app would be done installing now."

Share this post


Link to post
Share on other sites

  • 0

Hi,

 

the Setup.exe should be an Install Shiled Insataller. You can create a response file for a silent installation with the command line "setup.exe -r -f1".\setup.iss". With the response file you can create a simple program in the SCCM package "setup.exe -s". With the -s switch the setup will look for the setup.iss and run completely unattended. Just make sure you capture the iss file on a clean machine without any previous installations of your Remedy Client. This way you can avoid all the hassle of batch files and option files (which are place in the MDT script folder?).

Share this post


Link to post
Share on other sites

  • 0

Okay, since my BATCHfu is awful these days, and I admit, I'm worn out right now, I thought I'd toss out some VBScript code you could try until either my brain gets back into gear, or someone else chimes in.

 

You can use Notepad to copy the following into a .VBS file. Then your "setup.exe" file should be up one directory level, and your "options.txt" file should reside in the same folder as the script (you can name the folder whatever you want). Once you do that, test it out manually to make sure it works. Then, before using in SCCM, delete the last line so it doesn't cause a poup during deployment (you won't be able to see the popup, so things just hang).

 

And if that doesn't work for you, do some digging on the syntax need for a batch file to get the current directory instead of using a variable for the deployment root (sorry, like I said, my brain is worn out)...

 

 

Option Explicit

Dim objWshShell, objFSO, strScriptFileDirectory, strScriptParentDirectory

Set objWshShell = WScript.CreateObject("WScript.Shell")

Set objFSO = CreateObject("Scripting.FileSystemObject")

strScriptFileDirectory = objFSO.GetParentFolderName(wscript.ScriptFullName)

strScriptParentDirectory = objFSO.GetParentFolderName(strScriptFileDirectory)

If objFSO.FileExists(strScriptParentDirectory & "\setup.exe") Then

If objFSO.FileExists(strScriptFileDirectory & "\Options.txt") Then

objWshShell.Run """" & strScriptParentDirectory & "\setup.exe"" -i silent -DOPTIONS_FILE=""" & strScriptFileDirectory & "\Options.txt""", 1, True

Else

'Abort the VBScript and return a failure code to SCCM because the Options.txt file wasn't found.

Wscript.Quit(1)

End If

Else

'Abort the VBScript and return a failure code to SCCM because the Setup.exe file wasn't found.

Wscript.Quit(1)

End If

Wscript.echo "If both files exist in the designated spots, then the app would be done installing now."

 

Thanks Lucid. Never apologize for trying to help. I appreciate it very much. I will try it out and let you know what happens

 

Hi,

 

the Setup.exe should be an Install Shiled Insataller. You can create a response file for a silent installation with the command line "setup.exe -r -f1".\setup.iss". With the response file you can create a simple program in the SCCM package "setup.exe -s". With the -s switch the setup will look for the setup.iss and run completely unattended. Just make sure you capture the iss file on a clean machine without any previous installations of your Remedy Client. This way you can avoid all the hassle of batch files and option files (which are place in the MDT script folder?).

 

Not sure if it matters or not but the setup.exe is installanywhere. The options.txt is taken from an ini file in the installation folder.

Share this post


Link to post
Share on other sites

  • 0

Well, it matters. But not that much. The syntax is just slightly different. Look here.

I am still thinking that the problem is caused by the %deployroot% variable. If the options txt is placed in the package folder just replace the path by ".\Scripts\CustomScripts\Options.txt".

Share this post


Link to post
Share on other sites

  • 0

Well, it matters. But not that much. The syntax is just slightly different. Look here.

I am still thinking that the problem is caused by the %deployroot% variable. If the options txt is placed in the package folder just replace the path by ".\Scripts\CustomScripts\Options.txt".

 

Thanks for all the help. I've finally resolved the issue. Thanks to the install anywhere link you sent I decided to create a response file using the -r switch. Once I had that I used the following command "setup.exe -i silent -f %deployroot%\Scripts\CustomScripts\options.properties". Works like a charm.

Share this post


Link to post
Share on other sites

  • 0

Sorry to revive an old thread, but I found this on Google and have been troubleshooting this for a few days now. I found a solution to the original problem and wanted to share in case someone else stumbles upon this in the future. When installing the Remedy via SCCM (2012 SP1 in my case), there are 2 things that are important.

 

  1. The working directory has to be the folder ABOVE the Disk1 folder. Remedy requires the folder be called Disk1 and since SCCM copies the files to a cache, that link will break unless we copy up the entire Disk1 folder.
  2. The Options.txt file has to be the full path even if the file is in the working directory.

I created an application with the contents contained in

 

\\Server_Name\Folder_Name\

 

and ran the install command

 

Disk1\setup.cmd -i silent -DOPTIONS_FILE="\\Server_Name\Folder_Name\Disk1\Options.txt"

 

*Technically this will still fail because the detection method kicks off write after the setup.cmd script runs, but if you wait until the install finishes look in the Program Files or Start Menu, it is installed successfully.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.