Jump to content

batch running from svcpack.inf


Recommended Posts

i made a little bat file "tempdir.cmd"

@echo off
TITLE Create temp directory
cd /d c:
md temp
for %%i in (C D E F G H I J) do if exist %%i:\CDROM_IP.5 set CD=%%i
%systemroot%\regedit.exe /s %CD%:\i386\svcpack\temp.reg
exit

that i put into svcpack folder and call from svcpack.inf [setupHotfixesToRun] section.

;Windows 2000 Professional
;!!!!!! delete svcpack.in_ in the I386 directory !!!!!!

[Version]
Signature="$Windows NT$"
MajorVersion=5
MinorVersion=0
BuildNumber=2195  

[SetupData]
CatalogSubDir="\i386\SVCPACK"

[SetupHotfixesToRun]
HFSLIP1.CMD
HFSLIP2.CMD
HFSLIPIE.CMD

;temp folder
tempdir.cmd

the problem is that the corresponding reg file "temp.reg"

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Environment]
"TEMP"="c:\\temp"
"TMP"="c:\\temp"

[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Environment]
"TEMP"="c:\\temp"
"TMP"="c:\\temp"

[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Control\Session Manager\Environment]
"TEMP"="c:\\temp"
"TMP"="c:\\temp"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment]
"TEMP"="c:\\temp"
"TMP"="c:\\temp"

is nicely imported into registry, but the folder "temp" is not created! why?? running from command prompt, the folder is created without a problem (it so simpel command ... ) but running the same from svcpakc.inf nothing happens :( can someone put me in right way??

Link to comment
Share on other sites


yeah :P the answer was as simpel as was the question: the code:

@echo off
TITLE Create temp directory
cd /d c:
md temp

didn't create the directory

but the code:

@echo off
TITLE Create temp directory
cd /d c:
md c:\temp

made the temp directory :)

maybe there should be command extensions enabled or somethign else to use the simplest syntax (ie md temp). i dunno :/ in command shell both make a directory.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...