[wpkg-users] Accessing file path within .bat file

simplesi siwalters at hotmail.com
Sat May 15 12:01:11 CEST 2010


I'm trying to write a package to deploy some files and then run an
install.bat files afterwards
[code]
	<install 
		cmd='xcopy "%PACKAGES%\heliumfrognet\*.*" "c:\apps\Helium_Frog_Netbook" /c
/e /f /i /y' />
	<install 
		cmd='%COMSPEC% /C "c:\apps\Helium_Frog_Netbook\install.bat"' />
[/code]
the install.bat file works fine when run directly from explorer as %CD%
contains its path and it needs it path to function but when I run it from
WPKG it doesn't seem to know where it is :(

If there a way of passing a parameter to the install.bat file so tell it
that it is?

I'm sure this is a newbie question but I;m not a great cmd .bat person
:embarassed: 

The reason for all this is that I'm going to be publicly publishing the
whole thing as a zip file to non-WPKG users and those users will just be
un-zipping and then double-clicking on the install.bat

Just for ref here is the install.bat
[code]
rem V1.2 install dlls and shortcuts

rem copy a couple of dlls to system32 (vb6 video capture related)

copy fsfwrap.dll "%SYSTEMROOT%\system32" /y >NUL 2>&1
copy capstill.dll "%SYSTEMROOT%\system32" /y >NUL 2>&1

regsvr32 /s "%SYSTEMROOT%\system32\fsfwrap.dll" >NUL 2>&1
regsvr32 /s "%SYSTEMROOT%\system32\capstill.dll" >NUL 2>&1

rem create shortcut using a vbs file that needs path to main exe
cscript.exe createshortcut2.vbs "%CD%" >NUL 2>&1


[code]
-- 
View this message in context: http://old.nabble.com/Accessing-file-path-within-.bat-file-tp28567345p28567345.html
Sent from the WPKG - Users mailing list archive at Nabble.com.




More information about the wpkg-users mailing list