Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Computing > NZ Computing > Batch file question

Reply
Thread Tools

Batch file question

 
 
Lawrence D'Oliveiro
Guest
Posts: n/a
 
      09-09-2006
In message <edu3ge$pgb$(E-Mail Removed)>, Bryce Utting wrote:

> Lawrence D'Oliveiro <(E-Mail Removed)_zealand> wrote:
>>>>I thought Windows was a multitasking OS. Is there no way to start a
>>>>process completely detached from any GUI?
>>>
>>> I'm no expert but I think what you are describing can be done with a
>>> service.

>>
>> How is a "service" different from a "process"?

>
> ... you need a root password to start a service?


What about the GUI issue?
 
Reply With Quote
 
 
 
 
jasen
Guest
Posts: n/a
 
      09-09-2006
On 2006-09-08, mark <(E-Mail Removed)> wrote:

> There is no close-on-exit option for a shortcut pointing at a batch file
> under Windows XP Pro, but in this case, even it there was it wouldn't work
> because it never actually reaches the end of the batch file until the
> application launched by the batch file is exited.


did you report this bug?

last time I reported a bug to M$ they were happy to help (it was just an
error in their documentation, but still...)


How about making a shortcut that points to the UNC and STARTing the shortcut.
 
Reply With Quote
 
 
 
 
Lawrence D'Oliveiro
Guest
Posts: n/a
 
      09-09-2006
In message <edtrvj$rc1$(E-Mail Removed)>, Ray Greene wrote:

> On 8 Sep 2006 00:31:13 +1200, mark <(E-Mail Removed)> wrote:
>
>>I'm wanting to open a Windows application that resides on another machine
>>across the network, and if that machine is not turned on I don't want the
>>machine to "hang" while it figures that out.
>>
>>Using "\\<machine name>\<path>\<executable name>" inside a batch file
>>mostly does what I need, but leaves an ugle DOS window open too.
>>
>>It's been ages since I've needed to use DOS batch files - is there a
>>better way?

>
> Does it have to be a batch file? VBScript will do the job.


Can that run without leaving a window open?
 
Reply With Quote
 
Ray Greene
Guest
Posts: n/a
 
      09-10-2006
On Sun, 10 Sep 2006 11:54:53 +1200, Lawrence D'Oliveiro
<(E-Mail Removed)_zealand> wrote:

>In message <edtrvj$rc1$(E-Mail Removed)>, Ray Greene wrote:
>
>> On 8 Sep 2006 00:31:13 +1200, mark <(E-Mail Removed)> wrote:
>>
>>>I'm wanting to open a Windows application that resides on another machine
>>>across the network, and if that machine is not turned on I don't want the
>>>machine to "hang" while it figures that out.
>>>
>>>Using "\\<machine name>\<path>\<executable name>" inside a batch file
>>>mostly does what I need, but leaves an ugle DOS window open too.
>>>
>>>It's been ages since I've needed to use DOS batch files - is there a
>>>better way?

>>
>> Does it have to be a batch file? VBScript will do the job.

>
>Can that run without leaving a window open?


It doesn't open a window. If it can't find the executable on the network then
it exits quietly and you don't see a thing. If it does find it then you only
see the exe you opened.

--
Ray Greene
 
Reply With Quote
 
Bryce Utting
Guest
Posts: n/a
 
      09-11-2006
Lawrence D'Oliveiro <(E-Mail Removed)_zealand> wrote:
>>>>>I thought Windows was a multitasking OS. Is there no way to start a
>>>>>process completely detached from any GUI?
>>>>
>>>> I'm no expert but I think what you are describing can be done with a
>>>> service.
>>>
>>> How is a "service" different from a "process"?

>>
>> ... you need a root password to start a service?

>
> What about the GUI issue?


services are detached processes with no GUI; they're what system
daemons run as.

however, TTBOMK they're normally started using the msconfig program,
which is of course administrator-only. there *may* be a way to launch
them from userspace via VBScript or similar, though please please
please don't ask ME to look into it.


butting

--
I am very new to programming drivers so if I sound un-knowledgeable
then it's because I am.
-- first4internet's Ceri Coburn on writing Sony's DRM rootkit
http://homepages.ihug.co.nz/~butting
 
Reply With Quote
 
Lawrence D'Oliveiro
Guest
Posts: n/a
 
      09-11-2006
In message <ee2nd9$56d$(E-Mail Removed)>, Bryce Utting wrote:

> Lawrence D'Oliveiro <(E-Mail Removed)_zealand> wrote:
>>>>>>I thought Windows was a multitasking OS. Is there no way to start a
>>>>>>process completely detached from any GUI?
>>>>>
>>>>> I'm no expert but I think what you are describing can be done with a
>>>>> service.
>>>>
>>>> How is a "service" different from a "process"?
>>>
>>> ... you need a root password to start a service?

>>
>> What about the GUI issue?

>
> services are detached processes with no GUI; they're what system
> daemons run as.


Is there not a way under Windows of running a process with no GUI, without
having to resort to super-user privileges?
 
Reply With Quote
 
Enkidu
Guest
Posts: n/a
 
      09-11-2006
Lawrence D'Oliveiro wrote:
> In message <ee2nd9$56d$(E-Mail Removed)>, Bryce Utting wrote:
>
>> Lawrence D'Oliveiro <(E-Mail Removed)_zealand> wrote:
>>>>>>> I thought Windows was a multitasking OS. Is there no way to start a
>>>>>>> process completely detached from any GUI?
>>>>>> I'm no expert but I think what you are describing can be done with a
>>>>>> service.
>>>>> How is a "service" different from a "process"?
>>>> ... you need a root password to start a service?
>>> What about the GUI issue?

>> services are detached processes with no GUI; they're what system
>> daemons run as.

>
> Is there not a way under Windows of running a process with no GUI, without
> having to resort to super-user privileges?
>

You can run a service as any user. However most services run as "System
Account",

Cheers,

Cliff
 
Reply With Quote
 
Dave Taylor
Guest
Posts: n/a
 
      09-12-2006
Enkidu <(E-Mail Removed)> wrote in news:450519b6$1
@news2.actrix.gen.nz:

> You can run a service as any user. However most services run as "System
> Account",
>


I think this can:

Const HIDDEN_WINDOW = 12

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set objStartup = objWMIService.Get("Win32_ProcessStartup")

Set objConfig = objStartup.SpawnInstance_
objConfig.ShowWindow = HIDDEN_WINDOW
Set objProcess = GetObject("winmgmts:root\cimv2:Win32_Process")
errReturn = objProcess.Create("cmd /c C:\WINDOWS\DHzpColorBoost.bat", null,
objConfig, intProcessID)



Replace this"C:\WINDOWS\DHzpColorBoost.bat" with your batch file?
--
Ciao, Dave
 
Reply With Quote
 
Lawrence D'Oliveiro
Guest
Posts: n/a
 
      09-13-2006
In message <Xns983CBE9A06076daveytaynospamplshot@203.97.37.6> , Dave Taylor
wrote:

> Enkidu <(E-Mail Removed)> wrote in news:450519b6$1
> @news2.actrix.gen.nz:
>
>> You can run a service as any user. However most services run as "System
>> Account",
>>

>
> I think this can:
>
> Const HIDDEN_WINDOW = 12


[rest of VB-looking script omitted]

> Replace this"C:\WINDOWS\DHzpColorBoost.bat" with your batch file?


This is starting to get pretty complicated, isn't it? Now you're proposing a
script to run the script that the OP wanted to run, all just to get rid of
an unwanted UI window.
 
Reply With Quote
 
Dave Taylor
Guest
Posts: n/a
 
      09-13-2006
Lawrence D'Oliveiro <(E-Mail Removed)_zealand> wrote in
news:ee8d3u$gu9$(E-Mail Removed):

> In message <Xns983CBE9A06076daveytaynospamplshot@203.97.37.6> , Dave
> Taylor wrote:
>
>> Enkidu <(E-Mail Removed)> wrote in news:450519b6$1
>> @news2.actrix.gen.nz:
>>
>>> You can run a service as any user. However most services run as
>>> "System Account",
>>>

>>
>> I think this can:
>>
>> Const HIDDEN_WINDOW = 12

>
> [rest of VB-looking script omitted]
>
>> Replace this"C:\WINDOWS\DHzpColorBoost.bat" with your batch file?

>
> This is starting to get pretty complicated, isn't it? Now you're
> proposing a script to run the script that the OP wanted to run, all
> just to get rid of an unwanted UI window.
>


Bloody computers and their guis
I was just trying to help

--
Ciao, Dave
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
batch file/jar file sihle87@gmail.com Java 2 02-16-2008 01:34 AM
How to execute Jar file using Batch file. Sriram Java 1 01-31-2008 03:59 PM
creating a file within a subdir in DOS batch file =?Utf-8?B?bWF0bHlu?= ASP .Net 0 09-20-2007 01:28 PM
Batch File - Renaming File with DATE Tom Computer Support 11 03-05-2007 10:33 PM
Compilation Batch File Won't Pipe To File Luc The Perverse Java 7 10-23-2005 10:17 AM



Advertisments