Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

BATCH: ini file with variables read out and use in batch-file

$
0
0
Company=KB-Consulting.pro

LogFolder=%systemroot%\Logs
InstallPath=%ProgramFiles%\

Server=
Storage=
FileServer=
NAS=
BackupDrive=%cd%\BACKUP

Tools=


WindowsLogFolder=%systemroot%\Logs
localPolicyPath=%systemroot%\System32\GroupPolicy
EnvRegPath=HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment

UninstallRegAMD64=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
UninstallRegx86=HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432NodeMicrosoft\Windows\CurrentVersion\Uninstall

MDTTemp=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Deployment 4

this is my ini-File

set "inifile=%~dp0Global Settings.ini"
for /f "usebackq delims=" %%a in ("%inifile%") do ( set "%%a" )

md "%BackupDrive%"

this is my batch

problem is, that the folder will named %cd%\Backup

So the problem is, that for the batch %cd% is a text and not a variable....

where is my failure?




Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>