Over 1 million tech questions and answers.

Adding an ODBC Link through a batch file or the registry

Q: Adding an ODBC Link through a batch file or the registry

I'm looking for a way to add an odbc link without having to type anything in, or at least as little as possible...

I'm using Windows XPe on the terminals in question.

I'd like to be able to just do it through a batch file, or to import it directly into the Registry, but I'm not sure of all the steps I need to take to be sure that it works properly.

Thanks for the help

Read other answers
RELEVANCY SCORE 200
Preferred Solution: Adding an ODBC Link through a batch file or the registry

I recommend downloading and running Reimage. It's a computer repair tool that has been proven to identify and fix many Windows problems with a high level of success.

I've used it in the past to identify and fix everything from blue screens (BSOD's), ActiveX errors, corrupt files and processes, dll/exe/sys errors, recover lost memory, Windows update problems, defragging, malware removal etc.

You can download it direct from this link http://downloadreimage.com/download.php. (This link will automatically start a download of Reimage that you can save to your computer.)

RELEVANCY SCORE 90.8

please see other post
 

A:Adding to registry via batch file

Hi, welcome to TSG. I will inform admins to close this thread.
 

Read other 1 answers
RELEVANCY SCORE 89.6

Hi

I am distributing a small database to a company and they will be running access 2010 runtime on an XP Pro machine. This will be a split db with FE on the users machine, BE on the server.

To avoid having to make the person install the db only on the 1 trusted location that MS gives when you have a runtime version, I want to be able to add a trusted location for the user, without having to talk them through it and me personally being there (they are not local to me).

As such, to disable the security warning each time, I need to add the to the HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Access\Security\Trusted Locations folder

1. Add afolder called "Location0" (make sure that doesn't alreay exist), if so, locationX
2. Add new string of "path" = "C:\RTMTCL"

Can anyone help me with this please?

Cheers

Michelle
 

A:Solved: Adding to registry via batch file

Does this need to be a batch file for a specific reason? If your clients are using WinXP might I suggest using a VBScript instead? A simple file.vbs could add a registry key no problem. I have done these type of scripts many times to deploy to our 4000 Windows XP computers at work. Here is a link to an example VBScript:

http://www.cruto.com/resources/vbscript/vbscript-examples/os/registry/Create-a-Registry-Key.asp

I'll poke around my computer and see if I can find one of my old scripts that might be more detailed.
 

Read other 2 answers
RELEVANCY SCORE 67.6

Hi,

I am a network/system administrator and I am having to add a user group to the administrators group on about 60 different machines. I was wondering if anyone knows how to program a batch file that I can disseminate down to all my computers that could add a user group to the administrator group. Any help would be great.

Thanks,

John
 

A:Adding a administrator by creating a batch file.

I'm assuming this is a domain

You can 1) Use startup script (defined trough GPO) on your computers, that has the command - NET localgroup Administrators /add "domain\yourgroup"

Or you can do some VB code -
Code:
strComputer = InputBox("Type in the Computer Name","Computer Name Variable")
strUID = InputBox("Enter Domain User Name", "Domain User Name Variable")
Set objGroup = GetObject("WinNT://" & strComputer & "/Administrators")
Set objUser = GetObject("WinNT://Domain/" & strUID & "")
objGroup.Add(objUser.ADsPath)
Change Domain to your Domain.
Take out the strUID's input box and put in the name of the group you want to add.

You can do the input box on strComputer to do it one at a time or do some kind of list and have the vb code parse the list.

Also you can stick either in some kind of GPO or something

Hopefully if your a network admin your users don't have admin rights so you really don't want to run this on a batch file basis.
 

Read other 2 answers
RELEVANCY SCORE 67.6

I tried looking a little on google, and couldnt find much. I need to make a batch file to add dns suffixs to local area connection.

i have a script that i tested but it didn't work, because i beleive it was for just the 2 local dns's and not for the dns suffixes.

Any help is a appreciated.

Update i found a script here. That works for now. Just need to figure out how to set it so it manually checks those 2 boxes.

On Error Resume Next

strComputer = "."
arrDNSDomainSuffixSearchOrder = Array("dns1.com", "dns2.com", "dns3.com")

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

WScript.Echo VbCrLf & "DNS Host Name: " & strDNSHostName & VbCrLf & _
" Attempting to enable DNS"
intEnableDNS = objNicConf.EnableDNS(strDNSHostName, strDNSDomain, _
arrDNSServerSearchOrder, arrDNSDomainSuffixSearchOrder)
If intEnableDNS = 0 Then
WScript.Echo " Successfully enabled DNS."
ElseIf intEnableDNS = 1 Then
WScript.Echo " Successfully enabled DNS." & VbCrLf & " Must reboot."
Else
WScript.Echo " Unable to enable DNS."
End If

WScript.Echo VbCrLf & String(80,"-")

Set colNicConfigs = objWMIService.ExecQuery _ ... Read more

Read other answers
RELEVANCY SCORE 66.8

Hi there forum,

how do you change the Visual effects using a batch file or registry file.

Thanks,

Edward.

Read other answers
RELEVANCY SCORE 66.8

Hi there forum,

how do you change the Visual effects using a batch file or registry file.

Thanks,

Edward.

A:How to change visual effects using batch file or registry file?

Hello Edward, and welcome to Ten Forums.

The links in the blue note box under OPTION FOUR in the tutorial below may be able to help with this.

Visual Effects Settings - Change in Windows 10

Read other answers
RELEVANCY SCORE 66.8

We sell PCs and one of the biggest pains is having to wait for the updates to download. After Windows XP SP2 (which is preinstalled), there are currently 118 "critical" downloads that have to be taken down before the PC is up to date. There is also a number of reboots involved in this which is the most awkward part (as you cant just leave the PC there to take down ALL patches on its own, it requires user intervention)

I have downloaded all of these 118 fixes and have created a batch file that has the format of

echo installing Windows XP Post SP2 upates.
start "" /wait StepByStepInteractiveTraining-KB898458-x86-ENU.exe /quiet /norestart
start "" /wait WindowsInstaller-KB893803-v2-x86.exe /quiet /norestart
start "" /wait WindowsMedia-KB911564-x86-ENU.exe /quiet /norestart
start "" /wait WindowsMedia10-KB911565-v2-x86-ENU.exe /quiet /norestart
start "" /wait WindowsMedia10-KB917734-x86-ENU.exe /quiet /norestart
.....
.....

for all of the updates. It runs much quicker than downloading it (obviously) and only requires one reboot at the end. Is there anything wrong with doing it this way. I have done it on three PCs already and they seem fine (and windowsupdate.com reports that it has all of the critical updates)

I have looked at all of the other patching options and this is the easiest for me.
 

Read other answers
RELEVANCY SCORE 66.4

Hey,

Im trying to create a batch(.bat) file as a shortcut to a particular point in my registry:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer

I tried putting this:
REGEDIT
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer

But all it does is try to add a registry key.

Any help would be great

Thanks
 

A:Registry Batch File

You need to set the startup key in the registry before regedit starts. Create a batch file with these 2 lines and then specify the starting key on the command line when running the batch file.

reg ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit" /v "LastKey" /d "%1" /f
start regedit
 

Read other 1 answers
RELEVANCY SCORE 66.4

Ineed help about file registry or batch file to enable or disable the date and time setting

Read other answers
RELEVANCY SCORE 65.6

Hi

i need to change the registry in a batch file so that certail lines are either changed or added to the registry without the user having to click on ok if i make a reg file. there should be a way of coding into a batch file a line that does this.

if anyone canm i help

Thank You
 

A:Batch File Registry Changing

The easiest method is to create an MSI. Here's a link to read about it: http://www.microsoft.com/windows2000/techinfo/administration/management/wininstaller.asp
 

Read other 2 answers
RELEVANCY SCORE 65.6

Hi All,

I want to create a file that will allow access to the registry so that a registry change can be made remotely. I use Deep Freeze to manage the computers. Normally I make registry changes by physically going to each PC and using Console1 to allow registry changes, make the change, and restrict the registry. Is there a batch file that I can use to allow access to the registry and then restrict access to it?

Thanks
 

A:batch file to allow access to the registry on XP

Hi,

Since you are using Deep Freeze, which requires a password to thaw the machine, I don't think we can help you. Deep Freeze tech support would be the way to go.

It seems to me that you are asking for help to remotely control Deep Freeze....so that your batch can make changes, and then re-freeze the computer.

I would think DF would have been broken long ago if that was possible. The object of DF is to keep settings intact....and the only way to make changes, is to thaw the computer.

In most school etc situations, a supervisor has to thaw the machines personally.

I'm Closing this thread since it is against our Rules to help with this.
 

Read other 3 answers
RELEVANCY SCORE 65.6

I'm having some difficulty with a (fairly) simple batch file.
I simply need to edit [HKEY_CLASSES_ROOT\.html] as certain pesky browsers like to change the value. Here is what I have:

REGEDIT4
; @ECHO OFF
; CLS
; REGEDIT.EXE /S "%~f0"
; EXIT
[HKEY_CLASSES_ROOT\.html]
"(Default)"="htmlfile"

It does everything perfect, EXCEPT it does not edit the (Default) value. Instead it just adds a second entry called (Default).

Any suggestions?

A:Batch file registry edit

I think you should do a Reg Delete for that keyname. Then do a Reg Add to restore what you want.

Here's some guidelines: Reg command help

But, I never have pesky browsers trying to change that value since I carefully check the options during install and turn off the nags or the automatic settings that would try to do that. You can do that after install in all the browsers I'm familiar with in 'Settings'.

Read other 13 answers
RELEVANCY SCORE 65.6

recently I ran Mamu's add icons to system batch file for mame icons. I wasn't satified with the results so I was going to do a system restore. Then I learned system restore was turned off "which I turn off when I defrag then turn back on when completed". Now I can't figuere out how to remove it. I'm not very good with cmd. or batch files so any help would be greatly appreciated

A:removing batch file from registry

You just delete the batch file if you want to remove a batch file, there's no need whatsoever to go inside the registry.

Read other 9 answers
RELEVANCY SCORE 64.8

Hi,

I know that a similar post has been posted before but i am looking for the "for dummies" version. A simple notepad script for xp pro to change HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\O utlook\Security
C:\Documents and Settings\mbremner\Local Settings\Temporary Internet Files\OLK127\

to

C:\Documents and Settings\mbremner\Local Settings\Temp\OLK127\

It is to allow a program called Iaanywhere to send pdf files to outlook

Any help would really be appreciated

A:[SOLVED] Batch File to Change registry

First thing is you mis-spelled iaanywhere it is actually iAnywhere and from what I can find is a security type program shown here:

http://en.wikipedia.org/wiki/Ianywhere

Since this has to do with security I would suggest to try to find a solution to this by some other means than trying to modify the registry by use of a batch file and help with this here might be against the forum rules.

I will ask a manager to take a look see at the rules pertaining to this program and let him/her make the decision.

Read other 15 answers
RELEVANCY SCORE 64.8

I am trying to change the value of a registry key. I want to create a batch file to do this because I have alot of computers that this needs changing on. I figured the easiest way to do this is to delete the current entry and then add another entry that contains the correct value.

So far I have exported the key with the correct value set. This is the one that wants adding after deleting the original. I created the batch file and have tried testing to see if it deletes before i add the code to add the correct registry key. This is what i have.....

REG DELETE "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\fDenyTSConnections.reg"

I run the batch file, it brings up a command prompt screen asking Y or N. I enter Y then hit ENTER but the registry key remains.

What am i doing wrong? Also i don't want it to prompt for a Y or N i want it to do it automatically. How do i do that?
 

A:Solved: Batch file to delete registry key?

Rry this:
REG DELETE "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /f

You can also use the REG ADD command to change the data in a registry key value, instead of first deleting it. If it already exists, REG ADD will overwrite it.
 

Read other 2 answers
RELEVANCY SCORE 64.8

Can anyone tell me why this line in my batch file won't execute?:

REG DELETE HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\Folders /v ?C:\\Program Files\\UltraVNC\\? /f

I get this error:
ERROR: The system was unable to find the specified registry key or value.

I've tried tried it several different ways with quotes, without quotes, and with 1 \'s. I've verified the key is there and I'm running as administrator. Thanks.
 

Read other answers
RELEVANCY SCORE 64.8

I would like to know how to search a Registry Entry using a Batch file and modify that entry. For example, I want to search all occurrence of "amvo" in the registry and delete them all.
 

A:Finding Registry Value and Editing Using Batch File

Read other 16 answers
RELEVANCY SCORE 64.8

I downloaded a beta version of a program and it for some reason it has a "usage count" in the registry which denies access to the program after 10 uses. When i delete the key it works again but it's pretty annoying to keep deleting it through the registry all the time.

I want to make a batch file to delete this key so i can just put it in the autostart folder and it will delete the key at every system start.

Can someone give me an example of how this batch file should look like?

A:Deleting registry keys with a batch file?

Hi,

Whats the name of this program?

Regards,
Golden

Read other 1 answers
RELEVANCY SCORE 64

Hi all,
I have a requirement where I want to delete the registry entry using .bat file. I have the Administrative Privilege and I am able to delete the registry manually by right clicking on the key and then selection "Delete". The key is deleted from
the registry without any error.

But when I tried to delete  the registry entry using .bat file (batch file) I am unable to delete the key. I am clueless why the .bat file is not deleting the registry entry whereas I can delete the registry manually but not using .bat file.
The content of .bat file is:-
%SystemRoot%\system32\reg.exe delete HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{36fc9e60-c465-11cf-8056-444553540000} /v "LowerFilters" /f
%SystemRoot%\system32\reg.exe delete HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{36fc9e60-c465-11cf-8056-444553540000} /v "UpperFilters" /f

Please suggest me what I am doing wrong and how can I fix this issue.
Thanks for help.

Read other answers
RELEVANCY SCORE 64

Hi All,

Can any1 help me on writing a batch file for Windows XP which will amend the following registry key:

HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Desktop\SafeMode\Components\DeskHtmlVersion

I have never written a batch file before, however I have had a try and it doesn't work. The details of my file are below:

REM -----Fix Active Desktop-----
Windows Registry Editor Version 5.00
regedit.exe /s "%USERPROFILE%\Desktop\Keith.reg"
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Desktop\Components]
"DeskHtmlVersion"=dword:00000000
"DeskHtmlMinorVersion"=dword:00000005
"Settings"=dword:00000001
"GeneralFlags"=dword:00000001

I need to change the value data in the key from Decimal 272 to 0.

Thanks,
lpool1
 

A:Solved: How to write a batch file to amend a registry key??

Read other 16 answers
RELEVANCY SCORE 64

reg add HTLM\Software\Microsoft\Windows\CurrentVersion\Policies\System /v DontDisplayLastUserName /t REG_DWORD 00000001 /f

I am trying to hide all users at logon and I know this is where you change it but for some odd reason the syntax is wrong and I can not figure it out. Can someone please help me fix this?

A:Problem with batch file command to edit registry

I figured it out all. My problem lied in a few small argument issues and missed quotation marks. For future references this is the correct syntax.

reg add "HTLM\Software\Microsoft\Windows\CurrentVersion\Policies\System" /v "DontDisplayLastUserName" /t REG_DWORD /d 1 /f

Read other 1 answers
RELEVANCY SCORE 63.6

Create a batch script for Oracle ODBC connection
 

Read other answers
RELEVANCY SCORE 63.6

I have a batch file that creates a registry key and a string. I want the string value data field to contain a path to a folder on the local machine but have been unsuccessful at doing so.
My current batch file contains the following: (This example does create the string but leaves the value data field blank)
--------------------------------------------------------------------------
@echo off

REM Add a registry key and values with Regedit.exe and a .reg file
REM /s is used to avoid an "Are you sure" prompt

REM Create the Registry key

> "%temp%\globalconfig.reg" ECHO Windows Registry Editor Version 5.00
>> "%temp%\globalconfig.reg" ECHO.
>> "%temp%\globalconfig.reg" ECHO [HKEY_LOCAL_MACHINE\Software\iTALC Solutions\iTALC\path2]
>> "%temp%\globalconfig.reg" ECHO "globalconfig"=""

regedit.exe /s "%temp%\globalconfig.reg"
--------------------------------------------------------------------------

The new string is ?globalconfig.? The value data field of this string needs to contain the following path:
C:\Documents and Settings\All Users\Application Data\iTALC\globalconfig.xml

I am new to batch file creation so please give me the ?for dummies? explanation.

Thanks,
Kirk

A:[SOLVED] Batch file to change registry string value data

Welcome to TSF!

You've set the globalconfig value equal to nothing:

Code:
"globalconfig"= ""
It should be this

Code:
"globalconfig"= "C:\\Documents and Settings\\All Users\\Application Data\\iTALC\\globalconfig.xml"
The \ must be doubled as the \ is the escape character.

Rather than create a file to merge, be easier to just use reg.exe, only one line needed and no file to delete afterward:

Code:
Reg Add "HKLM\Software\iTALC Solutions\iTALC\path2" /V globalconfig /T REG_SZ /D "C:\Documents and Settings\All Users\Application Data\iTALC\globalconfig.xml" /F
Enter reg /? in a prompt for all the options

Read other 7 answers
RELEVANCY SCORE 62

MS Access 2003 Pro:

I am trying to link to external data via ODBC. When I select "Link Tables",
the dialog opens and I drop the file type box down to ODBC. As soon as I
click on the ODBC file type, the dialog closes and I am returned to the
Access main window - nothing happens! If I open a database that already has
tables linked to it via ODBC, I AM able to access those ODBC tables (DB2 UDB,
iSeries AS/400). I just cannot link or import a NEW ODBC table on THIS
machine.

I can link to ODBC sources from other applications on this machine (like
Crystal Reports) just not from MS Access. Is there something I need to do to
this machine so that Access can connect via ODBC. Is there some .ini setting that has gotten corrupted? Please help. This used to work fine. Thanks.
 

A:Cannot link via ODBC from this machine

Read other 9 answers
RELEVANCY SCORE 62

Hi,
I've been trying to create a batch file to modify the Windows Visual FX setting from whatever it's on to 'Best for Performance'.  I need to run the change remotely to many many machines, and the change needs to be for the Current User which is a restricted
account with no access to task manager or anything other that the till application that starts when its logged on.
So far I my batch does the following (registry settings found via a Package Builder):
rem Update registry keys
REG ADD HKCU\Control Panel\Desktop\ /v DragFullWindows /t REG_SZ /d 0 /f
REG ADD HKCU\Control Panel\Desktop\ /v FontSmoothing /t REG_SZ /d 0 /f
REG ADD HKCU\Control Panel\Desktop\ /v UserPreferencesMask /t REG_BINARY /d 90120180 /f

REG ADD HKCU\Control Panel\Desktop\WindowMetrics\ /v MinAnimate /t REG_SZ /d 0 /f

REG ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ /v ShellState /t REG_BINARY /d 2400000033880000000000000000000000000000010000000D0000000000000000000000 /f

REG ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v ListviewAlphaSelect /t REG_DWORD /d 0 /f
REG ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v ListviewShadow /t REG_DWORD /d 0 /f
REG ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v ListviewWatermark /t REG_DWORD /d 0 /f
REG ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v TaskbarAnimations /t REG_DWORD /d 0 /f
REG ADD HKCU\SOFTWARE\Microsoft\Window... Read more

Read other answers
RELEVANCY SCORE 62

how can i bring Control panel to desktop using batch file or registry key or command prompt

Read other answers
RELEVANCY SCORE 61.6

Operating System - Windows XP Professional Version 2002 Service Pack 2
Office version - Office Professional Edition 2003
I am trying to link an Access application to a SQL Server table via ODBC link. However, when selecting "ODBC" under Files of Type on the Link dialog, the Link dialog box closes and nothing happens.

SQL Server is installed on my computer as are the database tables that I am trying to connect to.

To see if it was an issue, I set the macro security level to low, but still no luck.

Is there anything else that needs to be adjusted to enable the ODBC link?
 

A:MS Access 2003 - Cannot Link To ODBC

Here is the resolution along with the disclaimer.

http://support.microsoft.com/kb/329820/en-us
 

Read other 2 answers
RELEVANCY SCORE 61.2

We are trying to set up an ODBC connection to one of our SQL server databases and I've tried adding to a group policy but it won't push down to the workstations. We are trying to create a System DSN but not sure how to do that either through a registry
entry or through group policy. Machines are all running Windows 7 Pro.

Any help is appreciated
Thanks in advance

Read other answers
RELEVANCY SCORE 60

Ok I'm totally at a loss on how to word this so I'm just going to write it out the best that I can...

First I have a batch file that I'm writing that will convert mp4 files to mp3 files (I have a lot) for a buddies band using ffmpeg.

Here's the code that I'm using:

ffmpeg -i folder\video.mp4 -f mp3 -ab 160000 -vn "\different folder\music.mp3"

what I would like to do is add to this so that I don't have to write out this code for every file I have... :/

I have the mp4 files in one folder and than the mp3 files are saving to another folder.

So here's an example of what the code will do if it isn't clear yet.

Folder 1:

video1.mp4
video2.mp4
video3.mp4

what it should do is grab video1.mp4 and convert it.

ffmpeg -i folder\video1.mp4 -f mp3 -ab 160000 -vn "\different folder\music1.mp3"

and than move onto the next one

ffmpeg -i folder\video2.mp4 -f mp3 -ab 160000 -vn "\different folder\music2.mp3"

and than the next one

ffmpeg -i folder\video3.mp4 -f mp3 -ab 160000 -vn "\different folder\music3.mp3"

It's going to have to grab the name from the mp4 file and insert it for the mp3 file.

I can get around pretty good in cmd if it's basic commands but when it comes to something like this I'm a little confused...

Thanks for the help in advance!
I'll see what i can do about searching some more on what I would have to do and if I find the solution I'll post it here if it isn't already answered.

A:Batch File that grabs file names from folder to insert into batch file

A DOS "for /f" loop should do the trick, although changing the filename extension for the output to do everything in one line escapes me at the moment.

Perhaps you could do a dir .\folder\*.mp4/s/b > mp4s.txt, then make a copy of that and edit each line to rename the file to the destination name, and save it as mp3s.txt. Then you just feed both the source (mp4s.txt) and destination (mp3s.txt) filesnames into the for /f loop which handles the ffmpeg conversion.

Quite a crude solution and you'd have to handpatch the destination filenames, but i can't think of how to get a source mp4 filename and then just change the extension.

Read other 3 answers
RELEVANCY SCORE 59.2

Hi,
I have a question  that how to copy file from remote desktop user drive to my local machine using  xcopy or any other protocol.

This is my server path "\\Trail01" and here is the file location "c:\Users\ashique.sheikh\Desktop\Day2.R"
How can i give this is in my batch file. I have used this
net use "\\Trail01" "[email protected]" "/USER:ashique.sheikh"
XCOPY /Y \\Trail01\c:\users\ashique.sheikh\Desktop\Day2.R  "D:\VMI"
But its not working. It is give path error.
How can i download this or is there any other way to do it?

Read other answers
RELEVANCY SCORE 54.8

If someone can Please help, I just need the Data in the XML tag extracted to Batch File Variable....the rest i figured out and works great for the backup...just need the extracted tags...
thank you

i have a parent directory that contains a sub directory and a XML file that i need a batch to read 2 specific tags then create a Set command in the batch with those 2 lines to create a backup folder with the tags as the names and such. looks like this:

Parent Directory = XML
XML Folder contains > WJFKB02229001.D Folder & Config.xml File

I need to read the contents of the xml "Config.xml" extract the PhaseID Tag data "WJFKB02229001"
Also need to extract the BoxID "D", I don't need anything else on these seperate lines.

keep trying the following For /F command but no luck
Code:
[COLOR=red]for /f "tokens=1 delims=[" %%G in ("PHASEID" %path%\%myfile%) DO ([/COLOR]
[COLOR=red]set PhaseID=%%G[/COLOR]
[COLOR=red])[/COLOR]
[COLOR=red]echo Phase: %PhaseID%[/COLOR]
pause

and i've searched so many sites and forums with no real help on this one....the data is contained in the xml, weird enough i guess that it's enclosed in brackets "[", which all the forums i read and try it either replies with a blank variable being passed or says it can't find the file at all....

PLEASE HELP, lol

Code:

:StartSet
Set PhaseID="[COLOR=red][B][I]Extracted PhaseID from xml[/I][/B][/COLOR]"
Set BoxID="... Read more

A:Solved: Batch File Extract TAGID to Batch Variable? weird

Read other 16 answers
RELEVANCY SCORE 53.2

Hiya,

I'd just like to run a simple batch file at logoff to backup some settings. I plan to use Robocopy, which is what i use to more thorough backups.

Two questions:
1. How make it run by clicking Start > Shutdown? (i realise i could make a shutdown batch file and run it instead, but i'd rather keep a standard 'workflow' for other users who use the machine.

2. I'm 'ok' with batch files, but i've never tried to mirror to a different folder each time (automagically). What i'd like to do is have it backup a folder and call it "blah.1" then "blah.2" each time it is run, and then repeat once it gets to "blah.9" so it doesn't keep growing forever. I don't know how to do this.

I realise no.2 is not really for this forum, but someone might know and i might as well ask

Thanks.

A:How to run a batch file at logoff & some batch scripting help please

I found an answer to the logoff/shutdown:
How to schedule a task to run when shutting down windows - Stack Overflow

And the batch file folders:
robocopy - Insert current date in to destination folder structure - Stack Overflow

Read other 1 answers
RELEVANCY SCORE 52.8

In trying to use BRIO to access LOtus Approach on my machine, I'm told to "You need to define the .dbf file as a ODBC data source in windows." How do you define a file as such ??
 

A:Defining .dbf file as ODBC data source

Please don't post duplicates in multiple forums. I moved the one from the Windows forum to the Business Apps forum. You can find it here.

http://forums.techguy.org/showthread.php?s=&threadid=51606
 

Read other 1 answers
RELEVANCY SCORE 52.8

In trying to use BRIO to access LOtus Approach on my machine, I'm told to "You need to define the .dbf file as a ODBC data source in windows." How do you define a file as such ??
 

A:Defining .dbf file as an ODBC data source

Click on Start>Settings>ControlPanel>ODBC Data Sources
 

Read other 1 answers
RELEVANCY SCORE 52

Hi Guys,

I am running a batch file through the night to copy things between servers (using the xcopy command).

The files being copied are quite large (171MB) and I am wanting to know what time they finish copying over.

I have a Pause command at the end of the script which allows me to see that it has finished successfully when I arrive at work in the morning. Is there a way for it to insert a timestamp just before the pause to show the finishing time?
Regards
Andy
 

A:Solved: Adding a timestamp to Batch Scripts

Read other 6 answers
RELEVANCY SCORE 52

I have this code.

@ECHO OFF
:Values
SET strSSID=
SET strPWD=
ECHO Please enter the ssid:
SET /p strSSID=SSID:
ECHO.
ECHO Please enter the password:
SET /p strPWD=Password:

IF ".%strSSID%"=="." GOTO :TryAgain
IF ".%strPWD%"=="." GOTO :TryAgain

CALL :HostedNW "%strSSID%" "%strPWD%"
pause
GOTO :EOF
:HostedNW
ECHO
C:\Windows\System32\netsh.exe wlan set hostednetwor mode=allow ssid="%~1" key="%~2" keyUsage=persistent
SET strSSID=
SET strPWD=
GOTO :EOF
:TryAgain
CLS
ECHO.
ECHO One or more inputs weren't correct.
ECHO Please try again.
ECHO.
GOTO :Values

In which I have taken the proper inputs from user as SSID and PASSWORD, Now I have second code as:

C:\Windows\System32\netsh.exe wlan start hostednetwork

This code will turn ON the WiFi, and another code which is :

C:\Windows\System32\netsh.exe wlan stop hostednetwork

This code will turn OFF the WiFi.
Now I want all these codes in one codding format and wanted to display a proper user interface in which:
first clickable button will show "Configure WiFi"
second clickable button will show "Turn ON"
third clickable button will show "Turn Off"
fourth clickable button will exit the user interface.

and the re... Read more

A:Adding user interface in batch programme

The Choice command is what you want (minus the clickable buttons part). Feel free to ask for further guidance or for an example of how you may set this up in you script.

Read other 1 answers
RELEVANCY SCORE 52

Hey

for artwork to be displayed in iTunes, each track has to have a jpeg dragged manually into the program, so it's added into the mp3 file as ID3 tag info. Apparently.

Anyway, this is a real ordeal for my large music collection, and thanks to Windows Media Player, i already have the artwork in each album folder under the name of "folder.jpg".

I need to find a program which will BATCH add the folder.jpg to the relevant mp3 s in the collection. So far i've only found iCoverArt, which I have to pay for, and a selection of other programs, the latter of which either check amazon.com (which i dont want -> the artwork is already in the folders), or still require me to add the image manually.

Any suggestions?

Cheers, Ian
 

Read other answers
RELEVANCY SCORE 52

i get a blue screen error message.
Stop: c0000218 {Registry File Failure} The registry cannot load the hive (file): \SystemRoot\System32\Config\SOFTWARE or its log or alternate.
this happend when i accidentally hit the power switch on the bus-bar that my comp was plugged into, shuttin off all the power while the comp was running.
My windows xp will not boot. i do not have any windows xp boot disks, Nor a floopy drive.
is there any way i can make a boot disk from another xp comp i have (it also has no floppy drive) just using a cd-rom??
is there any chance in hell to save my files on the harddisk?
ive looked all over the interweb. any help would be greatly appreciated.!!
 

Read other answers
RELEVANCY SCORE 52

Hi,

I am running Windows Vista.

When my Sony Vaio laptop boots up, it says:

STOP: c0000218 {Registry File Failure} The registry cannot load the hive (file): \systemroot\system32\config\components

How can I fix this?

HELP!!!!!!!!

Thanks in advance! I need to get this working TODAY!


Thanks!!!!!

A:STOP: c0000218 {Registry File Failure} The registry cannot load the hive (file):

You need to install a backup copy of your Registry. The simplest method would be a System Restore.

Read other 4 answers
RELEVANCY SCORE 51.6

I've tried creating a .bat file to add a directory to a Windows XP machine's environmental path using:setx path "%PATH%;C:\Path\To\Directory"However it isn't working. From what I've read, doing this via the CLI only adds the variable to the path temporarily.Is there a way to permanently doing it? Other than the obvious, longer approach of: My Computer>Properties>Advanced>Environmental Variables>Path>Edit

A:Batch script for ADDING directory to environmental path

Anyone? This has to be possible from a scripting environment...

Read other 1 answers
RELEVANCY SCORE 51.6

I wrote some batch files that do simple commands to back up several files in a minecraft folder. But a friend of mine suggested making a GUI for it in VB. With the GUI made and all the batch files doing what they need to do upon execution, I need to know how to include the batch files into the installer for the GUI.

"setup.exe" So when I call a file such as this;

' Starts the process to copy files to the correct folder.

Private Sub BtnInstall_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnInstall.Click
System.Diagnostics.Process.Start("Initial_Run.bat")

it can find "Initial_Run.bat" for now though even if I have that batch file the application folder after "publishing" the vb code it gives an exception "System.Diagnostics.Process.Start() cannot find the file necessary"

Initial_Run.bat copies other batch files and creates folders under C:\MCBackup\, if you run that batch file the program still doesn't call the other batch files correctly, they also give the "System.Diagnostics.Process.Start() cannot find the file necessary"

I'm not the greatest with VB, I had one class in college for it 3 years ago and my book from that class doesn't help at all.
Review -

-Need to know how to include a batch file with the vb program so it can correctly call it.
 

A:Solved: Adding Batch Files to VB Program Installer

I'm using Visual Studio 2010 Ultimate if that's of any importance.
 

Read other 2 answers
RELEVANCY SCORE 51.6

hi guys, i have been searching around trying to find the commands for batch file (dont eve know if its possible) to do this :
open minimized explorer with a specific link, wait 1min then close explorer.

ex : start/min iexplorer http://www.google.com

just dont know if its possible the open/close in 1min lol

hope you guys can helpme
 

A:batch that open/close link

Read other 14 answers
RELEVANCY SCORE 50.8

I'm trying to make a batch file backup the registry , with the date and time of when the
backup was created. The problem is that there is some sort of problem with the
environment variables being in the paths. When this is invoked, a box pops pops up
titled "Registry Editor" saying, "Cannot export C:\autoregbackups\auto-reg-backups-
created-on-wed 11/21/07-22:20:09.37.reg:Error opening the file. There may be a disk
or file system error."

Any ideas on how I could get this to work? Here's the code I'm having problems with.
[codebox]set now=%date%-%time%
if not exist "%SystemDrive%\autoregbackups" (mkdir "%SystemDrive%\autoregbackups")
attrib "%SystemDrive%\autoregbackups" -s -h -r
attrib "%SystemDrive%\autoregbackups\explanation.txt" -s -h -r
@echo The Registry.bat file you ran always creates a backup of the registry, reguardless of weather or not the user says to. Each backup file should be a backup of only parts of the registry edited by this, and named accordingly>%SystemDrive%\autoregbackups\explanation.txt
regedit.exe /e "%SystemDrive%\autoregbackups\auto-reg-backup-created-on-%now%.reg"
attrib "%SystemDrive%\autoregbackups\auto-reg-backup-created-on-%now%.reg" +h +s +r
attrib "%SystemDrive%\autoregbackups\explanation.txt" +h +s +r
attrib "%SystemDrive%\autoregbackups" +h +... Read more

A:Help With Batch And Registry

First in line would be the slash and colon characters - they can't be used in filenames.

Characters illegal in filenames: ? [ ] / \ = + < > : ; " , * |

Read other 3 answers
RELEVANCY SCORE 50.8

Hi all,

I've written a batch file which adds registry keys (with dynamic driveletter recognition) upon startup, launches a program and deletes the keys when closing the program.

My only concern now is that when launching the batch, I get a UAC dialog for the registry changes.

Is there some way I can tell Windows through the batch file that I really don't need any dialog (for this file only)?

I don't know anything about the creation process of EXEs, but I've never seen any UAC for registry changes made by EXEs...? So it has to be possible I guess...

Thanks!
Propa

A:Batch, Registry & UAC

  
Quote: Originally Posted by Propaganistas


Hi all,

I've written a batch file which adds registry keys (with dynamic driveletter recognition) upon startup, launches a program and deletes the keys when closing the program.

My only concern now is that when launching the batch, I get a UAC dialog for the registry changes.

Is there some way I can tell Windows through the batch file that I really don't need any dialog (for this file only)?

I don't know anything about the creation process of EXEs, but I've never seen any UAC for registry changes made by EXEs...? So it has to be possible I guess...

Thanks!
Propa


Hi Propa,

It depends where you write these keys, if your just using the HKCU (Current User) hive then you wont need UAC elevation, however every other hive will result in a UAC prompt

Steven

Read other 9 answers
RELEVANCY SCORE 50.4

I want to edit my registry to remove EVERY reference to a program which I have uninstalled, but which still has dozens (or more) of references still embedded in the registry.

Is there a registry editor in which I can enter one single word, and the editor will search out every mention of that one word-- and then permit me to delete all those entries at one time ???

A:Batch editing of Registry

CCleaner does a good job. It is not perfect, but if you uninstalled the software and then deleted the directory, CCleaner will try to remove all references to it in the registry. This is fairly safe way to go. If you are and expert in the registry there are more powerful tools however you MUST know what you are doing or you can BSOD your machine quickly.

CCleaner - Home

Read other 1 answers