MSFN Forum: Add shutdown. - MSFN Forum

Jump to content



  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

Add shutdown. Suggestion. Rate Topic: -----

#1 User is offline   AJARBAS 

  • Alexandre Jarbas Dolzanes Furtado
  • Group: Members
  • Posts: 41
  • Joined: 17-September 06
  • OS:XP Pro x86
  • Country: Country Flag

  Posted 17 November 2009 - 05:51 PM

You could later add a shutdown script?
Thanks.

This post has been edited by AJARBAS: 18 November 2009 - 03:04 PM



#2 User is offline   Yzöwl 

  • Wise Owl
  • Group: Super Moderator
  • Posts: 4,118
  • Joined: 13-October 04
  • OS:Windows 7 x64

Posted 18 November 2009 - 07:13 AM

Add a shutdown script to what?

I really do hope you don't mean to the HFSLIP script!
I cannot see any reason why even a sizable minority of end users would feel the need to automatically shutdown their PC after having created an installation source.


#3 User is offline   AJARBAS 

  • Alexandre Jarbas Dolzanes Furtado
  • Group: Members
  • Posts: 41
  • Joined: 17-September 06
  • OS:XP Pro x86
  • Country: Country Flag

  Posted 18 November 2009 - 09:10 AM

Well, I am computer technician and I can develop the project at night and go to sleep, it would at least for me very useful script shutdown. I could use a third party application?

#4 User is offline   tommyp 

  • MSFN Addict
  • Group: Developers
  • Posts: 1,664
  • Joined: 09-January 04
  • OS:none specified
  • Country: Country Flag

Posted 18 November 2009 - 11:07 AM

You're a computer tech who doesn't know how to make a script to turn off a computer after a program is executed? Tell me, are you using hfslip for personal use?

#5 User is offline   AJARBAS 

  • Alexandre Jarbas Dolzanes Furtado
  • Group: Members
  • Posts: 41
  • Joined: 17-September 06
  • OS:XP Pro x86
  • Country: Country Flag

  Posted 18 November 2009 - 02:22 PM

I know how to command, but I do not integrate them with your project. If possible. I am beginner and I think the script really complicated and I'm afraid of making mistakes. Yes I am one of the updates to customers. I learned in Forums have little or match any knowledge in programming languages. And for personal use as well.

This post has been edited by AJARBAS: 18 November 2009 - 02:41 PM


#6 User is offline   Yzöwl 

  • Wise Owl
  • Group: Super Moderator
  • Posts: 4,118
  • Joined: 13-October 04
  • OS:Windows 7 x64

Posted 18 November 2009 - 02:43 PM

Well in that case, (as you're a tech you should know this), the logical fix for that particular scenario would be this.
HFShut.cmd
@CALL HFSLIP-1.7.9.CMD
@SHUTDOWN /S /T 30
This method would mean that you could ignore opening the script and changing it needlessly!

#7 User is offline   AJARBAS 

  • Alexandre Jarbas Dolzanes Furtado
  • Group: Members
  • Posts: 41
  • Joined: 17-September 06
  • OS:XP Pro x86
  • Country: Country Flag

  Posted 18 November 2009 - 02:54 PM

View PostYzöwl, on Nov 18 2009, 06:43 PM, said:

Well in that case, (as you're a tech you should know this), the logical fix for that particular scenario would be this.
HFShut.cmd
@CALL HFSLIP-1.7.9.CMD
@SHUTDOWN /S /T 30
This method would mean that you could ignore opening the script and changing it needlessly!


Thanks :thumbup

#8 User is offline   MrJinje 

  • Tool™ Developer
  • Group: Developers
  • Posts: 862
  • Joined: 14-October 09
  • OS:none specified
  • Country: Country Flag

  Posted 18 November 2009 - 03:03 PM

LAWL, I'm a tech too, here is a Scheduled Task to run Yzöwl's script at 11PM tonight, we techs gotta stick together. Now you don't even need to be at the computer to start the darn thing.

SCHTASKS /create /tn "HFShut" /tr c:\HFShut.cmd /sc once /sd 11/18/2009 /st 23:00

This post has been edited by MrJinje: 18 November 2009 - 03:07 PM


#9 User is offline   jvidal 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 510
  • Joined: 14-November 05

Posted 18 November 2009 - 03:08 PM

Plus, the process takes about 10 minutes, you REALLY can't wait ten minutes for the script to finish and then turn off your PC manually?
btw, none of your options will workm because you have to press a key after hfslip finishes. if you don't, it will NEVER get to the shutdown command, unless you modify the script to skip that "press any key..." part.

'nuff said!

This post has been edited by jvidal: 18 November 2009 - 03:12 PM


#10 User is offline   AJARBAS 

  • Alexandre Jarbas Dolzanes Furtado
  • Group: Members
  • Posts: 41
  • Joined: 17-September 06
  • OS:XP Pro x86
  • Country: Country Flag

  Posted 18 November 2009 - 03:19 PM

View PostMrJinje, on Nov 18 2009, 07:03 PM, said:

LAWL, I'm a tech too, here is a Scheduled Task to run Yzöwl's script at 11PM tonight, we techs gotta stick together. Now you don't even need to be at the computer to start the darn thing.

SCHTASKS /create /tn "HFShut" /tr c:HFShut.cmd /sc once /sd 11/18/2009 /st 23:00


If I make this script it sets the task scheduler of windows. And the patch initializes the time I determine?
Sorry for my ignorance.
Thanks

<Edit />

View Postjvidal, on Nov 18 2009, 07:08 PM, said:

Plus, the process takes about 10 minutes, you REALLY can't wait ten minutes for the script to finish and then turn off your PC manually?
btw, none of your options will workm because you have to press a key after hfslip finishes. if you don't, it will NEVER get to the shutdown command, unless you modify the script to skip that "press any key..." part.

'nuff said!


Sorry my friend. my computer takes about one hour. How do I close the prompt and continue the command off.

This post has been edited by Yzöwl: 18 November 2009 - 04:48 PM


#11 User is offline   MrJinje 

  • Tool™ Developer
  • Group: Developers
  • Posts: 862
  • Joined: 14-October 09
  • OS:none specified
  • Country: Country Flag

  Posted 18 November 2009 - 03:30 PM

View PostAJARBAS, on Nov 18 2009, 03:19 PM, said:

If I make this script it sets the task scheduler of windows. And the patch initializes the time I determine?
Pretty much. Assuming you remove the snip that other guy mentioned. Find more details on ss64's - Schtasks page

#12 User is offline   AJARBAS 

  • Alexandre Jarbas Dolzanes Furtado
  • Group: Members
  • Posts: 41
  • Joined: 17-September 06
  • OS:XP Pro x86
  • Country: Country Flag

  Posted 18 November 2009 - 03:37 PM

View PostMrJinje, on Nov 18 2009, 07:30 PM, said:

View PostAJARBAS, on Nov 18 2009, 03:19 PM, said:

If I make this script it sets the task scheduler of windows. And the patch initializes the time I determine?
Pretty much. Assuming you remove the snip that other guy mentioned. Find more details on ss64's - Schtasks page


Thanks :rolleyes:

#13 User is offline   tommyp 

  • MSFN Addict
  • Group: Developers
  • Posts: 1,664
  • Joined: 09-January 04
  • OS:none specified
  • Country: Country Flag

Posted 18 November 2009 - 03:59 PM

Another option... check out step 9 of hfslip advanced. When running a post-cmd, you can run a command that is parsed just before the ISO is created. So, if your iso takes 40 seconds to create, then when doing a shutdown cmd, make sure you allow enough countdown time for the iso to create before the system shuts down. There ya go. It's already there. I guess you can config it to make your PC text message your cell so you know when the iso is ready too. The options are endless. :)

#14 User is offline   AJARBAS 

  • Alexandre Jarbas Dolzanes Furtado
  • Group: Members
  • Posts: 41
  • Joined: 17-September 06
  • OS:XP Pro x86
  • Country: Country Flag

  Posted 18 November 2009 - 04:00 PM

I'll try thanks :rolleyes:

<Edit />
May have to study more ahahah. I give up. :blushing:

This post has been edited by Yzöwl: 18 November 2009 - 04:47 PM


#15 User is offline   Yzöwl 

  • Wise Owl
  • Group: Super Moderator
  • Posts: 4,118
  • Joined: 13-October 04
  • OS:Windows 7 x64

Posted 18 November 2009 - 04:46 PM

View PostAJARBAS, on Nov 18 2009, 03:10 PM, said:

Well, I am computer technician and I can develop the project at night and go to sleep
A night worker who sleeps on the job! :P

#16 User is offline   AJARBAS 

  • Alexandre Jarbas Dolzanes Furtado
  • Group: Members
  • Posts: 41
  • Joined: 17-September 06
  • OS:XP Pro x86
  • Country: Country Flag

  Posted 18 November 2009 - 04:58 PM

View PostYzöwl, on Nov 18 2009, 08:46 PM, said:

View PostAJARBAS, on Nov 18 2009, 03:10 PM, said:

Well, I am computer technician and I can develop the project at night and go to sleep
A night worker who sleeps on the job! :P


Aahahahah f*** that. :yes:

#17 User is offline   Yzöwl 

  • Wise Owl
  • Group: Super Moderator
  • Posts: 4,118
  • Joined: 13-October 04
  • OS:Windows 7 x64

Posted 18 November 2009 - 05:03 PM

View Postjvidal, on Nov 18 2009, 09:08 PM, said:

btw, none of your options will workm because you have to press a key after hfslip finishes. if you don't, it will NEVER get to the shutdown command, unless you modify the script to skip that "press any key..." part.

Thanks for the reminder, try this version:
HFShut.cmd
@ECHO/|CALL HFSLIP-1.7.9.CMD
@SHUTDOWN /S /T 30


#18 User is offline   AJARBAS 

  • Alexandre Jarbas Dolzanes Furtado
  • Group: Members
  • Posts: 41
  • Joined: 17-September 06
  • OS:XP Pro x86
  • Country: Country Flag

  Posted 18 November 2009 - 05:16 PM

View PostYzöwl, on Nov 18 2009, 09:03 PM, said:

View Postjvidal, on Nov 18 2009, 09:08 PM, said:

btw, none of your options will workm because you have to press a key after hfslip finishes. if you don't, it will NEVER get to the shutdown command, unless you modify the script to skip that "press any key..." part.

Thanks for the reminder, try this version:
HFShut.cmd
@ECHO/|CALL HFSLIP-1.7.9.CMD
@SHUTDOWN /S /T 30



Thanks It's almost bedtime here in Brazil. Aahahah :w00t:

#19 User is offline   jvidal 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 510
  • Joined: 14-November 05

Posted 18 November 2009 - 09:24 PM

BTW, what kind of computer do you have? I believe it's a pretty old one, mine takes about 10 mins to run hfslip, iso creation included...

#20 User is offline   Geej 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 547
  • Joined: 01-January 08
  • OS:XP Pro x86
  • Country: Country Flag

Posted 27 November 2009 - 10:48 AM

I normally shutdown the PC after I run HFSLIP just before I sleep. So I made a utility to do that.
This autoit utility will shutdown your PC after HFSlip finishes it's task.
You can run before or during hfslip runs (but not when it finishes)
When HFSlip finishes, an attempt to send a keystroke to close the console window is triggered.
15 secs grace period to cancel Forced Shutdown.
Does not requires any modification to hfslip-1.7.9-xxx.cmd
Can run from any folder you wish.
If you change your mind, can access thru systemtray to cancel this script. (Red icon)
Tested in XP with hfslip-1.7.9_beta_t.cmd (should also work with rest of OS version)

Attached File  DetectHFend.exe (296.78K)
Number of downloads: 5
DetectHFend.exe
Size: 296.78 Kb (303,905 bytes)
MD5: C1452C422B0C56863BFE695CC54FD3B2

Autoit code:
Opt("WinTitleMatchMode", 2);2=subStr
opt("TrayIconDebug",1)
#Include <Misc.au3>
_Singleton(@ScriptName, 0)

Winwait ("Slipstreaming Complete")
$FT02=WinGetTitle ("- Slipstreaming Complete")
WinActivate ($FT02)
WinWaitActive ($FT02)
sleep (700)
Send ("{enter}")
sleep (1000)
	
		For $i=15 to 0 Step -1; 15 secs to cancel shutdown
			$Reply=msgbox (262180,"Shutdown PC in 15 secs...","Confirm Shutdown PC?"&@crlf& _ 
			"Default Action is 'Shutdown' if no selection is made within 15 secs."& @crlf & _ 
			$i& " sec",1); 1 sec timeout with Yes
			If $Reply = 6 then shutdown (5); 5=Forced shutdown
			If $Reply = 7 then Exit; User select 'No'
		next
		If @error -1 then shutdown (5)


Share this topic:


  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy