cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
DKroll76
Level 4

Target system minimum RAM requirement

Hello all,

Using Installshield 2014 Pro, creating an Installscript project. I want to be able to check to make sure the target system has at least 8GB of RAM before installing. How can I do this?

Thanks,

David
Labels (1)
0 Kudos

(8) Replies
DLee65
Level 13

Does this help any?
http://helpnet.installshield.com/installshield18helplib/IHelpBuildCondition.htm
PhysicalMemory >= 8192

I am assuming that you are creating a basic MSI project. You did not specify the project type.
0 Kudos
DKroll76
Level 4

It's an InstallScript project. I don't see anything about install conditions on the General Information tab.
0 Kudos
DLee65
Level 13

You are correct about the General tab; but you can add to the OnBegin event I suspect to perform your check. Just make sure that it only runs on first run or you may get behavior you do not like when trying to uninstall a product if a consumer has modified memory at all. I realize this is a corner case but it is good to be aware of it.

You will want to use GetSystemInfo I believe.
http://helpnet.installshield.com/installshield18helplib/mergedProjects/installshield18langref/LangrefGetSystemInfo.htm
0 Kudos
DKroll76
Level 4

Thanks Dan, I think this is getting me on the right track. I have added the OnBegin function, but it looks like the prereqs are running before that gets called. Is there a way to check before any of the prereqs start?

Thanks,

David

P.S. I'm still very new with Installshield, I appreciate your patience.
0 Kudos
DLee65
Level 13

Ouch! I wish I could give you some tips there. Back when I was handling pure InstallScript installations I was scripting all of my 'prerequisites' during the product install; I don't even think they had a concept like 'prerequisites'. Hopefully someone from Flexera can chime in and provide guidance or someone who handles this more frequently.
0 Kudos
DKroll76
Level 4

I'm looking into possibly running a powershell script that can return the physical memory as the first prerequisite. We'll see how that goes. Thanks for all of your help Dan!
0 Kudos
DLee65
Level 13

Are you comfortable with creating a C++ EXE That does the check for you using the GetPhysicallyInstalledSystemMemory? It would avoid any problems with executing scripts on systems that do not have PowerShell activated, although perhaps InstallShield has a way around this problem. Just a thought.

Here is a code example: https://msdn.microsoft.com/en-us/library/windows/desktop/aa366589%28v=vs.85%29.aspx
0 Kudos
DKroll76
Level 4

Here's what I did to solve the problem...

1. Created a powershell script that checks for at least 8gb of RAM. If more than 8gb, it writes a text file to the CommonFiles folder.
2. Created a prerequisite that looks for the text file. If the file isn't there, it runs the powershell script. If that fails, the install terminates.

I include powershell.exe AND the script file in my prerequisite. I tested disabling Powershell on a Win 8.1 VM and it still runs fine.

Thanks for all the help Dan!
0 Kudos