REGEDIT4 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce] "Install2"="%CD%\Install2.bat"
The Install2.bat is part of the installation procedure of a program I made. It needs to be run after Install.bat reboots the computer. It is located in C:\Program Files\XTA\. However, when other people download this program, they may save it in a different directory, so I need to find current directory. But even when I try:
REGEDIT4 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce] "Install2"="C:\Program Files\XTA\Install2.bat"
it doesn't work. The registry entry never appears.
When I try:
REGEDIT4 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce] "Install2"="Install2.bat"
the registry entry appears, but it doesn't work, for obvious reasons.
Any help would be greatly appreciated.
Thanks,
stettybet0
EDIT: I need the registry to know the current directory from which Install.bat was launched (and therefore Install2.bat is located). I'm not sure if something like %CD% would even work because the computer has been restarted.
Edited by stettybet0, 06 April 2007 - 05:34 PM.