I am making an Installer for my own OS, and it's nearly done. One thing is missing: The actual installing. I got the startup file and a "Wundows 1" file on my Floppy Disk. I want the "Wundows 1" file to be the new startup file of the connected PC.
I would really apprechiate a quick answer.
~ Mika
0
9 replies to this topic
#1
Posted 29 August 2015 - 12:55 AM
#2
Posted 29 August 2015 - 01:11 AM
Assuming there is one disk drive connected to the computer, and the file in question is named "Wundows" (spaces will mess things up here!) you can use this:
>cp disk/Wundows startup
#3
Posted 29 August 2015 - 01:33 AM
Can't you use cp only in the Computer Console? I want to copy "Wundows" to the PC and rename it to "startup" after I did some things in the Floppy Disk-Startup. Sorry if I'm misunderstanding something, but I started with CC today and I don't have that much experience
#4
Posted 29 August 2015 - 05:17 AM
In the floppy disk's startup, you can add this line:
shell.run("cp disk/Wundows startup")'shell.run' will execute the string you give it as if you'd run it in the computer's console.
#5
Posted 29 August 2015 - 05:48 AM
HPWebcamAble, on 29 August 2015 - 05:17 AM, said:
In the floppy disk's startup, you can add this line:
shell.run("cp disk/Wundows startup")'shell.run' will execute the string you give it as if you'd run it in the computer's console.
shell.run("cp","disk/Wundows","startup")
#6
Posted 29 August 2015 - 06:29 AM
That was true once; but quite some time ago, it was changed so that either format became acceptable.
#7
Posted 29 August 2015 - 01:22 PM
HPWebcamAble, on 29 August 2015 - 05:17 AM, said:
In the floppy disk's startup, you can add this line:
shell.run("cp disk/Wundows startup")'shell.run' will execute the string you give it as if you'd run it in the computer's console.
Thenk you very much, this worked perfectly for me!
I tried shell.run before, but I didn't know it's syntax and i just forgot looking because it was 2AM.
But I'm writing too much, I'm just impressed, by the community in this forum.
Just thanks for the answer, I'm sure I will enjoy my stay in this forum!
#8
Posted 29 August 2015 - 04:30 PM
Bomb Bloke, on 29 August 2015 - 06:29 AM, said:
That was true once; but quite some time ago, it was changed so that either format became acceptable.
Expanding on this, shell.run() joins its arguments with a space, then splits them again, so each argument (mainly the first one) can contain a space and it is split correctly.
While using shell.run() is generally ok, you might want to use fs.move() instead. It works exactly the same, `fs.move( "disk/Wundows", "startup" )`, but doesn't rely on shell running a whole program that does the exact same thing.
#9
Posted 29 August 2015 - 05:12 PM
Rather, fs.copy instead of cp.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users