Search found 38 matches

by jvuz
25 Jan 2013 05:30
Forum: DOS Batch Forum
Topic: Launch a batch in another batch
Replies: 7
Views: 6386

Re: Launch a batch in another batch

That's a script we use to install new pc's. But some commands won't pass, like writing something in the WIndows folder. That only works when you do it wiht elevated admin rights.
by jvuz
25 Jan 2013 05:12
Forum: DOS Batch Forum
Topic: Launch a batch in another batch
Replies: 7
Views: 6386

Re: Launch a batch in another batch

This is the message:

Code: Select all

The command completed succesfully.

Enter the password for administrator:
Attempting to start 0-setup.bat as user "VM-J3\administrator" ...
Press any key to continue...


and after I hit a key, nothing happens :(

Jvuz
by jvuz
25 Jan 2013 04:43
Forum: DOS Batch Forum
Topic: Launch a batch in another batch
Replies: 7
Views: 6386

Re: Launch a batch in another batch

It's with the local (built-in) administrator
by jvuz
25 Jan 2013 03:59
Forum: DOS Batch Forum
Topic: Launch a batch in another batch
Replies: 7
Views: 6386

Launch a batch in another batch

Hi, because my original file needs to be run as administrator (elevated rights), I created another batch file with this code @echo off net user administrator password runas /user:administrator 0-setup.bat exit The file 0-setup.bat is in the same directory where this file resides. But nothing opens. ...
by jvuz
25 Jan 2013 02:53
Forum: DOS Batch Forum
Topic: assing an ico file to a shortcut
Replies: 4
Views: 5474

Re: assing an ico file to a shortcut

Thank you both for your posts. The only problem is that the shortcut doesn't contain an extension. So I'm not sure howto to do this.
by jvuz
24 Jan 2013 06:33
Forum: DOS Batch Forum
Topic: assing an ico file to a shortcut
Replies: 4
Views: 5474

assing an ico file to a shortcut

Hi, I have this code @echo off setLocal EnableDelayedExpansion set dir=c:\users if exist "%dir%\." (goto 7) else (goto XP) :7 pushd "C:\Users\%username%\Desktop" type nul > %computername% exit :XP pushd "C:\Documents and settings\%username%\Desktop" type nul > %computer...
by jvuz
05 Oct 2012 02:47
Forum: DOS Batch Forum
Topic: Write to registry
Replies: 10
Views: 8324

Re: Write to registry

With this I have all: @Echo Off & Cls & Color 0E Setlocal EnableDelayedExpansion :: Reading Input From CSV File For /F "tokens=1,2,3,4 delims=," %%A in ('Type "C:\Users\USERNAME\Documents\Support\PC-Dates.csv"') Do ( set "IP=%%A" & set "PC=%%B" &am...
by jvuz
05 Oct 2012 01:31
Forum: DOS Batch Forum
Topic: Write to registry
Replies: 10
Views: 8324

Re: Write to registry

Thanks guys, it seems to be working, but is there a way to show which line has been done and which couldn't (because there weren't up and running)? Is it possible maybe to write it to another txt file?
by jvuz
01 Oct 2012 02:12
Forum: DOS Batch Forum
Topic: Write to registry
Replies: 10
Views: 8324

Re: Write to registry

Thanks,

but what if I have more lines. It's meant for our whole computer park (between 300 and 400 pc's). Is there a way to use something like EOF (end of file)?

Jvuz
by jvuz
28 Sep 2012 06:56
Forum: DOS Batch Forum
Topic: Write to registry
Replies: 10
Views: 8324

Re: Write to registry

OK, thanks for the info. I knew it would be easier with a csv file, I just didn't know how ;)
Now I can play with it. I'll keep you posted.

Thanks again,
have a nice weekend,
jvuz
by jvuz
28 Sep 2012 06:47
Forum: DOS Batch Forum
Topic: Write to registry
Replies: 10
Views: 8324

Re: Write to registry

I want it to be written to HKLM\SYSTEM\CurrentControlSet\Policies StartWarrantyDate (reg_sz). this key doesn't exist yet.

I know how to write to the registry, I don't know how to start, how to check the first line (1st and 4the field).
by jvuz
28 Sep 2012 05:01
Forum: DOS Batch Forum
Topic: Write to registry
Replies: 10
Views: 8324

Write to registry

Hello, I'm having a csv file (for instance) 192.168.3.132,LC03-132,User A,11-04-2011 192.168.3.133,LC03-133,User B,02-05-2011 192.168.4.109,LC04-109,User C,26-10-2011 192.168.5.143,LC05-143,User D,02-05-2010 This file contains IP-address, PC name, User and start date of the warranty. The goal is to ...
by jvuz
07 May 2012 06:35
Forum: DOS Batch Forum
Topic: Check for value
Replies: 15
Views: 10324

Re: Check for value

Thanks!
by jvuz
07 May 2012 01:03
Forum: DOS Batch Forum
Topic: Check for value
Replies: 15
Views: 10324

Re: Check for value

Thanks Squashman, I tried it with this: @echo off &setlocal enabledelayedexpansion set "separator=," set "foundhyphens=" set /a n=0 for /f "delims=" %%a in ('net localgroup administrators') do ( if defined foundhyphens set /a n+=1 set "member!n!=%%a" echo(...
by jvuz
04 May 2012 06:43
Forum: DOS Batch Forum
Topic: Check for value
Replies: 15
Views: 10324

Re: Check for value

Sorry Squashman,

i thought it would be better to start a new one, because the other one was old. Sorry. If you think it's better to merge to the other one, no problem for me.

Jvuz