Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Help me with Batch script!

09 Apr 2010   #1
detailmore

Windows 7 Professional 64
 
 
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 System SpecsSystem Spec
.
09 Apr 2010   #2
Darryl Licht

Windows 7 Ultimate 64 bit Steve Ballmer Signature Edition
 
 

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 System SpecsSystem Spec
Reply

 Help me with Batch script!




Thread Tools




Similar help and support threads
Thread Forum
W10 TP : Old Windows Update Batch/Script
Hi, I need you for obtain a batch for apply this custom : Retrouvez votre bon vieux Windows Update sous Windows 10 - Le comptoir du hardware Can you help me ? Thanks Have a good day !
Windows Updates & Activation
How to run cmd.exe elevated in batch script
Hi All, I am writing a dos batch file for windows7 and it has many commands which need elevated access to run. For elevation I am using elevate.exe. I am doing like below - set Elevation=elevate -wait cmd.exe /c %Elevation% "cd /d %CD% && xcopy /E /Y ...." %Elevation% "cd /d %CD% &&...
General Discussion
batch script help
dear all any help to make batch script this the reason i want to make a batch file is to help me update the online games in 60 computers by overwriting or copying big files in one click from 1 source computer... instead of turning on all 60 computers and updating all online games, he'll just...
General Discussion
PDF file association REG or Batch Script
At work i use 2 different PDF viewing software. One is Adobe for editing and the other is Foxit for quick viewing. They have their pros and cons and so I use them interchangeably. For some work I will use Foxit for several hours at a time and only open something in Adobe on an as needed basis...
Software
Problem with echo in batch script
Morning i have a problem with batch script in Windows 7. this is my code: @echo off set mypath=c:\tools if not exist "%mypath%\architet.txt" goto check3264 find /I "x64-based PC" "%mypath%\architet.txt" >nul 2>&1 if %errorlevel% EQU 0 (set architet=64) ELSE (set architet=32) goto uacok...
General Discussion


Our Sites

Site Links

About Us

Find 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 12:22.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App