Sign in to follow this  
Followers 0
BPBNA

FileInstall question...

6 posts in this topic

#1 ·  Posted (edited)

I'm pretty sure I know the answer to this but I wanna double check before I use the file since I cant test it here and it will be deployed to multiple company branches. If I use FileInstall inside an If statement and the If condition isn't satisfied, it wont copy over the file, right?

For example:

If @OSSERVICEPACK <> "Service Pack 2" then
    FileInstall("C:\Patch\xpsp2_x86.exe", @HomeDrive & "\xpsp2\xpsp2_x86.exe", 1)
    RunWait(@HomeDrive & "\xpsp2\xpsp2_x86.exe /quiet /norestart /o /n", "", @SW_HIDE)
EndIf

Edit: typo

Edited by BPBNA

Share this post


Link to post
Share on other sites



I'm pretty sure I know the answer to this but I wanna double check before I use the file since I cant test it here and it will be deployed to multiple company branches. If I use FileInstall inside an If statement and the If condition isn't satisfied, it wont copy over the file, right?

Wow, deploying a script to multiple company branches WITHOUT testing. You're a real brave man. I've allways said that testing and documentation is only for wimps. :whistle:

Cheers

Kurt


__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

Well I work at the helpdesk for the company so any issues with it will go straight to me anyways. Its a pretty simple script so there isn't much that could go wrong on my end. The only things that could go wrong is the Windows updates that it installs causing problems, which so far it has. SP2 has seemed to cause quite a few computers to loop at startup. It makes it to the Windows XP screen then restarts. Not really worth it IMO but we don't have a choice =/

So about the FileInstall, will it only copy the file to the directory if the If statement is true?

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

FileInstall will only install if that line of code is ran...if your logic prevents that from happening then it won't go...just like any other function

Edited by evilertoaster

Share this post


Link to post
Share on other sites

So about the FileInstall, will it only copy the file to the directory if the If statement is true?

yes.

Cheers

Kurt


__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

If @OSVersion = "WIN_XP" and @OSServicePack <> "Service Pack 2" Then...

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0