2

I need to activate Time Freeze (alternative for steadystate) as my last step. It has to run codes that it needs

cmd /c C:\"Program Files"\"Toolwiz Time Freeze"\ToolwizTimeFreeze.exe /usepass=password /freezealways

Above code is to activate the program after each restart. Hence the freezealways parameter. So this enables the program to also start at each restart

cmd /c C:\"Program Files"\"Toolwiz Time Freeze"\ToolwizTimeFreeze.exe /usepass=password /freeze

This will activate the program at that moment. I need to join both of the commands into 1, so I run them both in the SMSTSPostAction variable command. I was thinking of doing it like this;

cmd /c C:\"Program Files"\"Toolwiz Time Freeze"\ToolwizTimeFreeze.exe /usepass=password /freezealways & cmd /c C:\"Program Files"\"Toolwiz Time Freeze"\ToolwizTimeFreeze.exe /usepass=password /freeze

Any ideas?

3 Answers 3

1

You can put them in the task sequence as two separate commands. This is often better, because if something goes wrong with one of the commands, the logs will show which one.

Or write a small batch file or vbscript with both commands and run that.

4
  • Thank you for your answer. I have tried this. I have them seperate as the last 2 steps in my TS. I have had them in "run command line". Im now trying to do it in a TS Variable SMSTSPostAction. Because this program needs to run after a deployment. I hope this works.
    – Saeed
    Mar 14, 2015 at 13:31
  • @Saeed Ah I missed that you were trying to do it as the postaction - that will only let you run one command, so you need to write a small script and call the script as the post action.
    – Grant
    Mar 14, 2015 at 13:41
  • Yes, i have tried the script. Thats why i wanted to group the 2 commands so it will run in PostAction
    – Saeed
    Mar 14, 2015 at 13:48
  • @saeed a script like a batch file, one command per line.
    – Grant
    Mar 14, 2015 at 13:50
1

Thanks Grant. I have solved it. For those of you who want to know. I have put this code in the last step in my sequence.

cmd /c "C:\Program Files\Toolwiz Time Freeze\ToolwizTimeFreeze.exe" /usepass=password /freezealways && shutdown /r /f /t 0

the /freezealways will enable the program to start at every restart. I figured out that it might not be possible to combine them together in whatever way you can think of, in a script (vbs or bat or whatever) or as seperate command line steps. Just just the parameter /freezealways and add the shutdown after && to combine the command. It will force the restart with /f and this will trigger the program to also activate the protection because of the /freezealways

1
  • For completeness: It is running the CMD parser which makes it possible to run more than one command. && will only run the next command if the current command exits with a 0 ExitCode, where & can be used to run the next command no matter what. For more information on Conditional Execution, see ss64.com/nt/syntax-conditional.html Oct 8, 2018 at 15:24
0

You will definitely need a script if you want to run this in SMSTSPostAction, but you will need to decide if the script will be on the image, on the network, or somewhere else. If it's going to be on the network, make sure your image will have access to that either via the SCCM account or it's public to all users.

It probably doesn't matter, but I would use this opportunity to take advantage of powershell, but it's a matter of personal preference.

1
  • I have tried this, in all scenarios. The problem is, i have protected this image alot. So scripts will not be excecuted because this is blocked. They are kiosk PC's. Other scenario this would work because we already have this in place for our office PC's. So you're completely right aboutt his I have indeed used the powershell, this is also enabled in my boot image. I, like you, prefer this also.
    – Saeed
    Mar 14, 2015 at 14:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .