Search found 36 matches

by serverdelux
31 Oct 2013 21:25
Forum: DOS Batch Forum
Topic: [SOLVED]Switches and parameters for creating tasks
Replies: 19
Views: 17848

Re: [SOLVED]Switches and parameters for creating tasks

[SOLVED]

This is .vbs that runs .bat silently

Code: Select all

CreateObject("Wscript.Shell").Run "%SystemDrive%\Folder\?.bat",0,True
by serverdelux
29 Oct 2013 00:36
Forum: DOS Batch Forum
Topic: [SOLVED]Switches and parameters for creating tasks
Replies: 19
Views: 17848

Re: [NOT SOLVABLE] Switches and parameters for creating task

If 1.vbs contains the hide.bat code in same folder as 1.bat: schtasks /create /tn "Task2" /tr "%SystemDrive%\1\2\1.vbs %SystemDrive%\1\2\1.bat" /sc onlogon /rl highest /f I think I'll get the same results as I did two tasks that ran both so this is kinda the same Meanwhile can y...
by serverdelux
28 Oct 2013 12:29
Forum: DOS Batch Forum
Topic: [SOLVED]Switches and parameters for creating tasks
Replies: 19
Views: 17848

Re: [NOT SOLVABLE] Switches and parameters for creating task

Followed your instructions: Created two tasks like this: schtasks /create /tn "Task1" /tr "%SystemDrive%\1\2\1.bat" /sc onlogon /rl highest /f schtasks /create /tn "Task2" /tr "%SystemDrive%\1\2\1.vbs" /sc onlogon /rl highest /f These both say their running bu...
by serverdelux
27 Oct 2013 23:20
Forum: DOS Batch Forum
Topic: [SOLVED]Switches and parameters for creating tasks
Replies: 19
Views: 17848

Re: [NOT SOLVABLE] Switches and parameters for creating task

Try running hide.vbs with the batch file as parameter Hide.vbs: Const HIDDEN_WINDOW = 12 if WScript.Arguments.Count = 0 then WScript.Echo "Missing parameters" end if strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersona...
by serverdelux
27 Oct 2013 18:19
Forum: DOS Batch Forum
Topic: [ SOLVED ] ? Problem with batch creating vbs ?
Replies: 3
Views: 4067

Re: [ SOLVED ] ? Problem with batch creating vbs ?

Good job on solving the nested .vbs write subtracts % problem On the subject of .vbs does anyone know how to write an .vbs that uses a wmic licences status check and if 0 calls a .bat file then ends If other than 0 then does nothing and simply ends Thanks p.s. 0 = notifications status p.s.s. I have ...
by serverdelux
26 Oct 2013 18:29
Forum: DOS Batch Forum
Topic: [SOLVED]Switches and parameters for creating tasks
Replies: 19
Views: 17848

Re: How to pick which switches and parameters for creating t

What is going on here? lol...I wanted a task to run a batch file silent and call a non-silent batch but this is impossible as the call never happens to the second batch Here is an interesting link that uses a .vbs file but tried that code too with no success m An silent batch cannot call a second b...
by serverdelux
24 Oct 2013 22:54
Forum: DOS Batch Forum
Topic: [SOLVED]Switches and parameters for creating tasks
Replies: 19
Views: 17848

Re: How to pick which switches and parameters for creating t

Until I can perfect how to get the silent task to run 1.bat then call 2.bat does anyone know how to get this task schtasks /create /tn "Task1" /tr "%SystemDrive%\1.bat" /sc onlogon /ru "" to start 1.bat with this cmd start /min Thanks Edit : Maybe something like this? I...
by serverdelux
23 Oct 2013 16:36
Forum: DOS Batch Forum
Topic: [SOLVED]Switches and parameters for creating tasks
Replies: 19
Views: 17848

Re: How to pick which switches and parameters for creating t

Hi again, I'm working on my original task again to have it run silent but call another batch at onlogon Task1 schtasks /create /tn "Task1" /tr "%SystemDrive%\1.bat" /sc onlogon /ru "" It runs silent at onlogon but it doesn't run 2.bat batch when called ...lol Also if I ...
by serverdelux
21 Oct 2013 16:53
Forum: DOS Batch Forum
Topic: [SOLVED] Write a batch to write a batch correctly?
Replies: 23
Views: 15610

Re: Write a batch to write a batch correctly?

It worked :shock:...lol

Thank you foxidrive, penpen and ShadowThief
by serverdelux
21 Oct 2013 16:41
Forum: DOS Batch Forum
Topic: [SOLVED] Write a batch to write a batch correctly?
Replies: 23
Views: 15610

Re: Write a batch to write a batch correctly?

Trying this now md %SystemDrive%\1 md %SystemDrive%\1\2 echo :Uninstall1>>%SystemDrive%\1\2\3.bat echo CLS >>%SystemDrive%\1\2\3.bat echo echo Uninstalling...>>%SystemDrive%\1\2\3.bat echo schtasks /query ^| FINDSTR /I "Task">>%SystemDrive%\1\2\3.bat echo IF ERRORLEVEL 1 ( >>%SystemDrive%\...
by serverdelux
21 Oct 2013 16:35
Forum: DOS Batch Forum
Topic: [SOLVED]Switches and parameters for creating tasks
Replies: 19
Views: 17848

Re: How to pick which switches and parameters for creating t

I want to create a task that runs as soon as it created schtasks /create /tn "task1" /tr "%SystemDrive%\1.bat" /sc onlogon /ru "" >nul schtasks /run /tn "task1" I just have to code it into my function here http://www.dostips.com/forum/viewtopic.php?f=3&t=...
by serverdelux
21 Oct 2013 16:00
Forum: DOS Batch Forum
Topic: [SOLVED]Switches and parameters for creating tasks
Replies: 19
Views: 17848

Re: How to pick which switches and parameters for creating t

Doesn't look like you can run the task with the same command you use to create the task, but you can manually run a task with SCHTASKS /Run [Connect_Options] /TN taskname I want to create a task that runs as soon as it created This is possible and tested if using task scheduler to create it but I n...
by serverdelux
21 Oct 2013 15:13
Forum: DOS Batch Forum
Topic: [SOLVED]Switches and parameters for creating tasks
Replies: 19
Views: 17848

Re: How to pick which switches and parameters for creating t

Hi, taking a break from creating silent task for now here is it is... schtasks /create /tn "task1" /tr "%SystemDrive%\1.bat" /sc onlogon /ru "" >nul Right now I need help creating a task that runs as soon as it is created Is it the " once " parameter? I went i...
by serverdelux
21 Oct 2013 13:23
Forum: DOS Batch Forum
Topic: [SOLVED] Write a batch to write a batch correctly?
Replies: 23
Views: 15610

Re: Write a batch to write a batch correctly?

Every (cmd) instance has its own (b)locked actual working directory: The cmd instance that is calling your batch script, just as actual batch script. Additionally the batch script you are running should be not deleted while running. So you must move your batch scripts to a another path prior to exe...
by serverdelux
21 Oct 2013 12:28
Forum: DOS Batch Forum
Topic: [SOLVED] Write a batch to write a batch correctly?
Replies: 23
Views: 15610

Re: Write a batch to write a batch correctly?

You've misunderstood me: Your current working directory is "\1\2" on volume "C:". You want to delete all directories/subdirectories/files starting with "\1" on volume "C:". So you want to delete your working directory, too. This is a problem: Which directory ...