Jump to content

Recommended Posts

Posted
I need to deploy some software (to an RM CC3 network) which has a setup.exe and some command lines, so I can't package it. I can deploy it via a batch file in the startup scripts GPO (sshh, don't tell RM!), but that installs it every time it boots. Is there a way that I can run a script which first checks whether the application exists? I'm sure it is possible, but I've spent too long on an RM network to know how!
Posted (edited)
I need to deploy some software (to an RM CC3 network) which has a setup.exe and some command lines, so I can't package it. I can deploy it via a batch file in the startup scripts GPO (sshh, don't tell RM!), but that installs it every time it boots. Is there a way that I can run a script which first checks whether the application exists? I'm sure it is possible, but I've spent too long on an RM network to know how!

 

Why not just install it via GPO and use a transform file?

 

For referance: http://www.itninja.com/blog/view/deploying-mst-files-using-group-policy​

Edited by X-13
Posted

Assuming it's a normal VBS startup script?

 

Then just run a check on the installed exe location, and do an if not then install etc

 

Example, not tested

 

Set fso = CreateObject("Scripting.FileSystemObject")
If (fso.FileExists("MyExe.Com")) Then
 
Else
  "InstallCrap"
End If

 

Steve

Posted (edited)
I need to deploy some software (to an RM CC3 network) which has a setup.exe and some command lines, so I can't package it.

You just need to create a suitable package.ini file to deploy the EXE.

 

[Package]
Description=Example Application
Version=1.0.0.0
OS=5.WS,6.WS
ExeFile=NameOfYourInstaller.exe
Addcommand= /passive /quiet /norestart
UninstallCommand= /passive /quiet /norestart

 

See TEC21757 (RM KB article) for more details.

Edited by Arthur
Posted
You just need to create a suitable package.ini file to deploy the EXE.

 

Forgot that was possible. I think the script might be the way to go, though, as there is another file it needs which has to be in the same location as the setup.exe, and I don't know what AppAgent would make of that.

Posted

What you want is something like this..

 

 @echo off

REM * Installing EloTouch Drivers 5.5.0 32-bit *
if exist "C:\Program Files\Elo TouchSystems" goto lastbit

:Install_EloTouch
\\schoolname.internal\Applications$\Drivers\SW602132_EloTouchMouse_5.5.0\32Bit\EloSetup.exe [/Reboot] [/NoHandshake] [/s] [/iu] [/is] [/P:1,2,3,4]

:lastbit
exit

Posted (edited)
What you want is something like this..

-- Code --

Using GoTo's @Chuckster? Shame on you! I believe there's a velociraptor heading your way ;) (Somebody be a darling and post the link? XKCD's blocked here)

Although if you insist on it, I might point out :lastbit wasn't required.. Batch will interpret "goto :eof" (end-of-file) as an immediate quit, iirc

 

@echo off
REM * Installing EloTouch Drivers 5.5.0 32-bit *
if not exist "C:\Program Files\Elo TouchSystems" (


[indent]\\schoolname.internal\Applications$\Drivers\SW602132_EloTouchMouse_5.5.0\32Bit\EloSetup.exe [/Reboot] [/NoHandshake] [/s] [/iu] [/is] [/P:1,2,3,4][/indent]




[indent])[/indent]

Edited by Garacesh
Posted

So, a velociraptor-free command would be:

 

if not exist "C:\Program Files\PaperCut NG\licence.txt"

"\\server1\software installers\papercut\pcng-setup-13.3.23186.exe" /TYPE=secondary_print /VERYSILENT /NOICONS

Yes?

Posted (edited)

With brackets, yes.

if not exist "C:\Program Files\PaperCut NG\licence.txt" ("\\server1\software installers\papercut\pcng-setup-13.3.23186.exe" /TYPE=secondary_print /VERYSILENT /NOICONS)

 

Personally I like to 'branch' my code across multiple lines and with indents, just for easier readability, so I'd personally have it as:

if not exist "C:\Program Files\PaperCut NG\licence.txt" (


[indent]"\\server1\software installers\papercut\pcng-setup-13.3.23186.exe" /TYPE=secondary_print /VERYSILENT /NOICONS[/indent]




[indent])[/indent]

 

But the command line interprets it the same, either way.

 

Currently, the code character-for-character, as-posted, is two separate commands, one of which being an IF with a condition but no action, the other being the install.

It would check for licence.txt, and if it found it, progress to the next command (install PaperCut). If it didn't find it, it would proceed to the next command. The brackets make it all one command, and it will only process the if the IF statement is true (in this case, if the license.txt file doesn't exist).. Else's also work (but not ELIF, but you can nest IF commands to the same effect)..

 

if not exist "C:\Program Files\PaperCut NG\licence.txt" (


[indent]"\\server1\software installers\papercut\pcng-setup-13.3.23186.exe" /TYPE=secondary_print /VERYSILENT /NOICONS[/indent]




[indent]) ELSE ([/indent]




[indent][indent]Echo "Yup, it's there!"[/indent]

[/indent]


[indent][indent])[/indent]

[/indent]

Edited by Garacesh
  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...