| View previous topic :: View next topic |
| Author |
Message |
ghosti
Joined: 03 Jul 2007 Posts: 3
|
Posted: Tue Jul 03, 2007 1:25 pm Post subject: %myfiles% not work please help |
|
|
hi,
here is my batch file
@echo on
copy %myfiles%\welcome.exe C:\Documents and Settings\All Users\Start Menu\Programs\Startup
echo done
no file was copy to there!!
please help
i am using 2.1.5.0 |
|
| Back to top |
|
 |
|
|
ghosti
Joined: 03 Jul 2007 Posts: 3
|
Posted: Wed Jul 04, 2007 3:50 pm Post subject: |
|
|
| any kind soul out there that can help? |
|
| Back to top |
|
 |
ghosti
Joined: 03 Jul 2007 Posts: 3
|
Posted: Fri Jul 06, 2007 1:02 pm Post subject: |
|
|
look like this software not worth to buy after all!!
support was so bad!!! |
|
| Back to top |
|
 |
Zyzy
Joined: 07 Jul 2007 Posts: 1
|
Posted: Sat Jul 07, 2007 10:40 pm Post subject: Im working on it |
|
|
yeah im trying to figure out whats up with thats %MYFILES% environment variable too...im still workin on it. If I find something ill let you know.
...seems theres not a lot of people around on the forum...
Zyzy |
|
| Back to top |
|
 |
J Dark Shadow
Joined: 07 Jul 2007 Posts: 16 Location: N/A
|
Posted: Sat Jul 07, 2007 11:15 pm Post subject: Here's your solution ghosti |
|
|
So this was your batch file:
copy %myfiles%\welcome.exe C:\Documents and Settings\All Users\Start Menu\Programs\Startup
echo done
The reason why there was no file copied is because your command line was incorrect. You can't put spaces in a path without using ".
Example:
C:\Documents and Settings\All Users\Start Menu\Programs\Startup
is the same as:
C:\"Documents and Settings"\"All Users"\"Start Menu"\Programs\Startup
This would work.
OR
You can also use the ~ symbol in your path instead of using ". You have to write down the first 6 letters (without spaces) of the path followed by ~1.
Example:
C:\Documents and Settings\All Users\Start Menu\Programs\Startup
is the same as:
C:\Docume~1\AllUse~1\StartM~1\Programs\Startup
This would work also.
Here's a tip: If you want you can also use the default set environment variables of Windows. You can get a list of them by typing "set" in the command prompt.
So it means that this path:
C:\Documents and Settings\All Users\Start Menu\Programs\Startup
is also the same as:
"%ALLUSERSPROFILE%"\StartM~1\Programs\Startup
Note: Don't forget to use the " like in this case, because even tough this variable is already defined by Windows, the real path still contains spaces.
J Dark Shadow |
|
| Back to top |
|
 |
support Site Admin
Joined: 13 Feb 2004 Posts: 147
|
Posted: Sun Jul 08, 2007 1:39 am Post subject: Re: Here's your solution ghosti |
|
|
| J Dark Shadow wrote: | So this was your batch file:
C:\"Documents and Settings"\"All Users"\"Start Menu"\Programs\Startup
This would work.
|
Yes, you right. But why not:
"C:\Documents and Settings\All Users\Start Menu\Programs\Startup" ??? |
|
| Back to top |
|
 |
J Dark Shadow
Joined: 07 Jul 2007 Posts: 16 Location: N/A
|
Posted: Sun Jul 08, 2007 2:35 am Post subject: That's right |
|
|
Yeah that's right I forgot to tell, thanks support. You can also use this:
"C:\Documents and Settings\All Users\Start Menu\Programs\Startup"
It's just to say, don't forget that we use the " to precise a data string and to separate them from others, not only in paths but also in command lines.
Here's a quick example, like when you use the "reg add" command which is a registry tool in Windows XP.
This would work:
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v cmd /t REG_SZ /d "%SYSTEMROOT%\system32\cmd.exe" /f
But this wouldn't, because the command doesn't make the difference between the command, the registry path, the value name, the data type, the data itself and the parameters. The command is incorrect and you get an error:
reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v cmd /t REG_SZ /d %SYSTEMROOT%\system32\cmd.exe /f
So it's very important that you learn where to put " in your DOS commands and batch files if you want them to work correctly.
J Dark Shadow |
|
| Back to top |
|
 |
|