Jump to content

Sl45h3R

Active Members
  • Posts

    92
  • Joined

  • Last visited

Posts posted by Sl45h3R

  1. It could be done, but only if you make the teensy download another executable and execute it.

    I've done this myself, i wrote a program that calls everything and provides error handling, make the teensy download it over ftp, execute it, then listen for data over hid, then if everything goes successfully my program sends a "0" over hid and it's displayed green, if not it sends "1" and then its displayed red.

  2. Heres a few that i quickly wrote up, their only for windows, ill try and try to make unix ones tomorrow.

    void MSISilentUninstall(char *ProductName)
    {
      delay(150);
      CommandAtRunBar('wmic product where name=\'' + ProductName + '\' call uninstall');
      delay(20000);
    }
    
    void MSISilentInstall(char *MSIFile)
    {
      delay(150);
      CommandAtRunBar('msiexec /package ' + MSIFile + ' /quiet');
      delay(5000);
    }
    
    void ReleaseRenewIpAddress()
    {
      CommandAtRunBar("ipconfig /release");
      delay(1500);
      CommandAtRunBar("ipconfig /renew");
      delay(1500);
    }
    
    void ExecuteFile(char *filename)
    {
      CommandAtRunBar(filename);
    }
    
    void ComputerShutDown(char *timeout)
    {
      CommandAtRunBar('shutdown -s -t ' + timeout);
    }
    
    void ComputerRestart(char *timeout)
    {
      CommandAtRunBar('shutdown -r -t ' + timeout);
    }
    
    void ComputerHibernate(char *timeout)
    {
      CommandAtRunBar('shutdown -h -t ' + timeout);
    }
    
    void ComputerStandby(int timeout)
    {
      delay(timeout*1000); // Delay for timeout
      CommandAtRunBar("rundll32 powrprof.dll,SetSuspendState");
    }

×
×
  • Create New...