Jump to content

AutoIt & deep freeze


crikush
 Share

Recommended Posts

Hello,

i try build script to disable Deep Freeze.

in deep freeze i can't move with Tab or Uparray to change settings.

MouseClick is not good, becauseI have 10 computers and each computer a different resolution.

any idea how to make this script?

thanks,

Moshe

Link to comment
Share on other sites

any idea how to make this script?

Mmm. By pressing the keys on your keyboard in a special order.

Are you having problems with the AutoIt forum message editor?

:mellow:

Edited by iEvKI3gv9Wrkd41u

"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

Link to comment
Share on other sites

To update a DeepFrozen computer you have to reboot Thawed, Update, then reboot Frozen. There are options to thaw the computer for "x" amounts of boots. Problem is when updating sometime you need to reboot to complete update i.e. starting services. Best thing to do is:

Run Script to first boot thawed: DFC password /BOOTTHAWED

Restart

Run script to update

Restart if needed

Verify Updates

Run DFC password /BOOTFROZEN

Restart

Also you could lock keyboard and mouse to prevent unauthorized installs while thawed:

DFC password /UNLOCK

DFC password /LOCK

Edited by rogue5099
Link to comment
Share on other sites

To update a DeepFrozen computer you have to reboot Thawed, Update, then reboot Frozen. There are options to thaw the computer for "x" amounts of boots. Problem is when updating sometime you need to reboot to complete update i.e. starting services. Best thing to do is:

Run Script to first boot thawed: DFC password /BOOTTHAWED

Restart

Run script to update

Restart if needed

Verify Updates

Run DFC password /BOOTFROZEN

Restart

Also you could lock keyboard and mouse to prevent unauthorized installs while thawed:

DFC password /UNLOCK

DFC password /LOCK

i don't have dfc :mellow:

Link to comment
Share on other sites

  • 1 month later...

I'm having an issue getting the commands to output to the STDout stream:

#include<Constants.au3>
Local $Output
$STDOut = RunWait(@ComSpec&" /c dfc.exe get /isfrozen",@SystemDir,@SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)
While 1
$Output = $Output & StdoutRead($STDOut)
If @error Then ExitLoop
WEnd
 
While 1
$Output = $Output & StderrRead($STDOut)
If @error Then ExitLoop
WEnd
If StringInStr($Output,"THAWED.") Then
MsgBox(0,"Test","Workstation is thawed.")
ElseIf StringInStr($Output,"FROZEN.") Then
MsgBox(0,"Test","Worksation is frozen.")
Else
MsgBox(0,"Test","Unable to determine workstation state.")
EndIf
I have tried various combinations using Run, RunWait, @Comspec & ' /c or 'cmd /c' but have had no success. It seems that you cannot do anything like:
$STDOut = RunWait(@ComSpec&" /c dfc.exe get /isfrozen >c:\Temp\STDOut.txt",@SystemDir,@SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)
either as this breaks the command and nothing is returned at all.

Anyone any ideas on how to get this working or to at the very least get the frozen state of the workstation? Obviously this will be tricky for anyone to test unless they have Deep Freeze installed on a test machine.

The long and the short of it is I'm writing a tool that will run at startup to check when the last AV and Windows updates were run, if it is longer than a week, the machine is rebooted thawed and the updates are run, but I need to check the Frozen\Thawed state to be able to determine what needs done next.

Edited by Techn0mancer
Link to comment
Share on other sites

To answer my own question:

Deep Freeze Commandline (DFC) does not output to the standard stream and cannot be picked up by the SDTOutRead, instead it returns a success code that can be utilised directly:

Local $Return
 
If FileExists(@SystemDir&"\DFC.exe") Then
  $Return = RunWait('cmd /c dfc.exe get /isfrozen',@SystemDir,@SW_HIDE)
  If $Return = 1 Then
    ConsoleWrite(@CR&"Computer is Frozen."&@CR)
  ElseIf $Return = 0 Then
    ConsoleWrite(@CR&"Computer is Thawed."&@CR)
  Else
    ConsoleWrite(@CR&"Unspecified error."&@CR)
  EndIf
Else
  ConsoleWrite(@CR&"DFC.exe not Found, Deep Freeze likely not installed."&@CR)
EndIf
There is a table detailing the return codes from DFC.exe in the Faronics documentation which should give all the info we should need.

Hope this helps anyone else that encounters this issue.

Edited by Techn0mancer
Link to comment
Share on other sites

  • Moderators

FYI - You can't use RunWait expecting a stdout stream. RunWait(), as it states, simply returns the exit code.

However, Run() will allow you to do a stdout stream.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...