need help with IF THEN

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • digitalsr2
    Forum Member
    • May 2005
    • 15

    need help with IF THEN

    I have a situation in which I need to detect if a machine is a laptop or desktop and then install the appropriate software. There are about 1000 machines and each machine has a registry key that states what type of machine it is. how can I write a statement to detect that key or machine type and then install the appropriate software.
  • Desmond
    Indigo Rose Staff Member
    • Jul 2003
    • 709

    #2
    This is where i'd start:

    Code:
    sLaptopOrDesktop = Registry.GetValue(**MAIN_KEY**, **SUB_KEY\\SUBKEY**, **VALUE**, true);
    
    if sLaptopOrDesktop == "Laptop" then
    	-- do whatever you want to do for a laptop
    else
    	-- do whatever you want to do for a desktop
    end

    Comment

    Working...
    X