Sign in to follow this  
Followers 0
crikush

AutoIt & deep freeze

12 posts in this topic

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

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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 ...
 

Share this post


Link to post
Share on other sites

Hhhh.. I do not know why it gets a little :mellow:

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Another day I read somewhere about DeepFreeze: exist a line codes or commad lines to freeze or unfreeze the DeepFreeze... and more.

Try this.

Write a script to send command lines to DeepFreeze is more simple.

Good luck.

Edited by detefon

Visit my repository

Share this post


Link to post
Share on other sites

I'd be more interesting to know WHY you want to disable Deep Freeze. You could just get the commands from your Administrator...

Share this post


Link to post
Share on other sites

Hi,

i dont have deep freeze support commands.

I'm administrator and i want run script on all computers to make updates.

i tried to do it with Tab Apparently it does not work.

So I'm trying to find a solution.

Moshe

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

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

Share this post


Link to post
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:

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

DFC is part of DeepFreeze. you should find it in the Program Files folder.

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