Hello, ive searched many times and i cannot find a solution to my issue.
Im creating a program that starts on startup, launching programs after x seconds.
But i have an issue when i use system()
1 2
system ("C:\\PROGRA~1\\vistaa~1\\val.exe"); //Works ok
system ("C:\\PROGRA~1\\windows sidebar\\sidebar.exe"); //Fails to work
when i dont use shortnames,
system("C:\\program files\\...")
i get an error message C:\PROGRAM' is not recognized as an internal or external command, operable program or batch file.
i cant use the shortname for windows sidebar because there are 8 other's that begin with window, and window~8 doesnt work goes up to ~4
any solution other than renaming things or launching shortcuts?
Thanks for the help!
Grey Wolf's suggestion should work. I don't think escaped spaces shouldn't work in Windows because of the fact that '\' is the directory separator in Windows, and using the single '\' like that in C makes it think it is an escape sequence, which it isn't. In fact, gcc prints a warning when I use system("dir C:\\Program\ Files");