Help me with Batch script!


  1. Posts : 5
    Windows 7 Professional 64
       #1

    Help me with Batch script!


    Hi,
    Can somebody assist me with a .bat file I am trying to create?
    This is what I have now:

    Code:
    start /d "C:\Users\Me\Desktop\ghost" ghost.exe
    start /d "C:\Users\Me\Desktop" Poweroff.exe
    
    C:\Windows\System32\powercfg.exe /setactive e428f8a5-615e-488f-b7f7-1ed39450e522
    The first 2 lines start programs on my desktop. The next line, I try to change the power setting so my computer won't go to sleep, but I am not sure how to put this in my script. When I enter the line in command prompt, it works, but I am new to writing batch files.

    What I essentially want to do is to run those two programs and set my power settings to another profile.
    The second program shuts down my computer when the first program ends. It would be nice if I could do this in a batch file without the second external program support. Another idea I had was to start up GHost.exe (1st program) and then run shutdown -t 20, but I also need help expressing this in a batch file, so the line runs only after GHost.exe ends.

    Thanks for your input.
      My Computer


  2. Posts : 1,939
    Windows 7 Ultimate 64 bit Steve Ballmer Signature Edition
       #2

    Oh boy, it's been several years since I did a lot of batch file commands...

    Looks like you might want to add the start " " to that 3rd line, thats the 1st thing that comes to mind.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 11:43.
Find Us