Search found 11 matches

by gilb
17 Mar 2018 02:18
Forum: DOS Batch Forum
Topic: Script only by computer name...
Replies: 21
Views: 17730

Re: Script only by computer name...

@echo off IF /I %COMPUTERNAME:~0,6%=="mokedm" then (\\test\bginfo.exe \\arkiants\it$\test\4.bgi /timer:0 /silent /accepteula) ELSE IF /i %computername:~0,5%%== "moked" then (\\test\bginfo.exe \\arkiants\it$\test\3.bgi /timer:0 /silent /accepteula) ELSE IF /i %computername:~0,3%%== "sdv" then (\\tes...
by gilb
08 Mar 2018 05:26
Forum: DOS Batch Forum
Topic: Script only by computer name...
Replies: 21
Views: 17730

Re: Script only by computer name...

Getting: The syntax of the command is incorrect What I'm doing wrong? IF /I "%COMPUTERNAME:~0,3%"=="PCM" ( \\test\bginfo.exe \\test\pcmDesktop.bgi /timer:0 /silent /accepteula ) ELSE IF /i "%computername:~0,3%"=="PCS" ( \\arkiants\it$\test\bginfo.exe \\arkiants\it$\test\pcsdesktop.bgi /timer:0 /sile...
by gilb
07 Mar 2018 02:10
Forum: DOS Batch Forum
Topic: Script only by computer name...
Replies: 21
Views: 17730

Batch File script - by computer name

Hi, Did this: --------- @echo off IF /I %COMPUTERNAME:~0,3%==PCM (Do THIS1) ELSE IF /i %computername:~0,3%== "PCS (DO THIS2) ELSE IF /i %computername:~0,2%%= "PC" (DO THIS3) -------------- got 3 pcs: 1 = PCM01 2= PCS01 3 = PC01 when run script on 1 - it need to do = "DO THIS1" when run script on 2 -...
by gilb
21 Feb 2018 01:55
Forum: DOS Batch Forum
Topic: Script only by computer name...
Replies: 21
Views: 17730

Re: Script only by computer name...

How to do it that will work?
by gilb
20 Feb 2018 10:24
Forum: DOS Batch Forum
Topic: Script only by computer name...
Replies: 21
Views: 17730

Re: Script only by computer name...

I wrote this:

Code: Select all

IF /i 

"%computername:~0,5%"=="MOKED"(

but pc name is MOKED01

this is not runs the command in the if statemant

howto fix it?
Thanks
by gilb
18 Feb 2018 09:34
Forum: DOS Batch Forum
Topic: Pervent user change desktop wallepaper
Replies: 4
Views: 3954

Re: Pervent user change desktop wallepaper

disable wallpaper setting
also disable click on image set as wallpaper
Thanks.
by gilb
18 Feb 2018 03:13
Forum: DOS Batch Forum
Topic: Script only by computer name...
Replies: 21
Views: 17730

Re: Script only by computer name...

howto?
IF /i %computername:~0,6%==mokedm (
echo yes
) ELSE (
echo no
)

how to do it with.. ELSE IF?
by gilb
18 Feb 2018 03:08
Forum: DOS Batch Forum
Topic: Pervent user change desktop wallepaper
Replies: 4
Views: 3954

Pervent user change desktop wallepaper

Hi,
using batch script - how to Pervent user change desktop wallpaper?
Also, how to perevent this-> on image set as wallpaper?
thanks.
by gilb
17 Feb 2018 09:04
Forum: DOS Batch Forum
Topic: Script only by computer name...
Replies: 21
Views: 17730

Re: Script only by computer name...

Did this:

---------
IF /i %computername:~0,6%%== mokedm

(Do...)

ELSE IF /i %computername:~0,5%%== moked

(Do...)
-------------

Not working
what's wrong here?

Thanks, GIl
by gilb
15 Feb 2018 10:18
Forum: DOS Batch Forum
Topic: Script only by computer name...
Replies: 21
Views: 17730

Re: Script only by computer name...

What is ~0,3% for?
what ~ for?
0,3 for?

also do I need to write at the end of line "Run a command"???

Thanks
by gilb
15 Feb 2018 06:38
Forum: DOS Batch Forum
Topic: Script only by computer name...
Replies: 21
Views: 17730

Script only by computer name...

Hi,
How to run command in script only if computer name start with XXX ?
like XXX01 / XXX02 / XXX03
Thanks, Gil.