Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Install Apps From Another Drive

Featured Replies

I have put together an unattended cd with no problem, but I find that I am always updating apps with new versions.

I would rather create a generic xpcd that directs start.cmd or runonceex.cmd to install my various programs from my d:\install files directory.

This way I can update the apps without having to create a new cd and also install more programs than would fit on a cd in the $OEM$ folder.

I haven't been able to figure this out.

  • Author

I did read that post, but I'm not trying to install Windows from another hard drive, I just want RunOnceEx.cmd or Start.cmd to install programs from a hard drive after windows has been installed.

Normally, the programs are copied from the cd OEM folders and installed from C:\apps. I want to direct the install to be done from D:\install files (for example).

Ow, sorry I misunderstood your question :P

This can be done very easily.

You can do this in two ways:

Method 1

You can use the drive path of which you want to install from.

Example, you want to install from another harddrive ( D:\ ) and you have your applications under d:\install_files.

You can now use this line under RunonceEX:

REG ADD %KEY%\010 /V 01 /D "D:\install_files\peace_of_software\application /Switch" /f

In this way $OEM$\$1 folder isn't neccesary anymore.

Method 2

Ofcourse you want to use direct paths as less as possible. So now we are going to change D:\ into %harddrive%

Add this line to the top of your RunonceEX:

SET tagfile=\install_files\install_from_harddrive.txt
FOR %%i in (c d e f g h i j k l m n o p q r s t u v w x y z) do if exist "%%i:%tagfile%" set harddrive=%%i:

Now, create a textfile (you can leave the file empty) and name it install_from_harddrive.txt

Be sure to put it in the right folder like this:

D:\install_files\install_from_harddrive.txt

.

D:\ can ofcourse be something else.

When this batch is loaded, it will check the locations C:\install_files to Z:\install_files to find if the file install_from_harddrive.txt exists. If so, this drive can be called with %harddrive%.

Now you can use code like this in your runonceex:

REG ADD %KEY%\010 /V 01 /D "%harddrive%\install_files\peace_of_software\application /Switch" /f

I hope this help

Erik

  • Author

Thanks for your help. That's what I'm looking for. I think my problem has been the spaces in the path.

Why is that not a problem for an install from OEM folder C:\apps, but it is when you direct it to D:?

For example, I had no problem with my Batch.cmd that I loaded from:

[GuiRunOnce]

%systemdrive%\apps\batch.cmd

Can I have winnt.sif directed to D:\install\batch.cmd or is it better to stick with runonceex.cmd?

ECHO.

ECHO Installing K-Lite Codec V2.34 ...

ECHO Please wait...

start /wait %systemdrive%\apps\K-Lite Codec\klcodec234f.exe /silent

But, to install it from D:\install\Batch.cmd I had to change it to:

ECHO.

ECHO Installing K-Lite Codec V2.34 ...

ECHO Please wait...

start /wait %systemdrive%\apps\K-Lite_Codec\klcodec234f.exe /silent

without the space in the folder name.

Here Is Another Way With A Error Control

Blue Is The Folder adjust to your needs

echo off && cls && Mode 65,5 && Color 5e && Title My Install

set P4=Ping -n 4 127.0.0.1

SET tagfile=\SomeFolder

FOR %%i in (c d e f g h i j k l m n o p q r s t u v w x y z) do if exist "%%i:%tagfile%" set harddrive=%%i:\

if exist "%harddrive%" goto Confirm

if not exist "%harddrive%" goto Missing

:Confirm

echo. && echo Your Install Location -^> %harddrive%

%P4%>nul

goto quit

:Missing

echo. && Echo The Location Not Present && %P4%>nul

goto quit

:quit

Goto EOF

exit

Thanks for your help. That's what I'm looking for. I think my problem has been the spaces in the path.

Why is that not a problem for an install from OEM folder C:\apps, but it is when you direct it to D:?

For example, I had no problem with my Batch.cmd that I loaded from:

[GuiRunOnce]

%systemdrive%\apps\batch.cmd

Can I have winnt.sif directed to D:\install\batch.cmd or is it better to stick with runonceex.cmd?

ECHO.

ECHO Installing K-Lite Codec V2.34 ...

ECHO Please wait...

start /wait %systemdrive%\apps\K-Lite Codec\klcodec234f.exe /silent

But, to install it from D:\install\Batch.cmd I had to change it to:

ECHO.

ECHO Installing K-Lite Codec V2.34 ...

ECHO Please wait...

start /wait %systemdrive%\apps\K-Lite_Codec\klcodec234f.exe /silent

without the space in the folder name.

The problem isnt the location.. the problem is that in your original example, you have spaces in your paths... you need to use quotes. i.e:

start /wait "%systemdrive%\apps\K-Lite Codec\klcodec234f.exe" /silent

@gunsmokingman

That seems like a great addition

Can you explain the following to me?

set P4=Ping -n 4 127.0.0.1

And

%P4%>nul

What is the function of ping here?

Ping -n 4 127.0.0.1>nul will ping that ip address (your local machines 'loopback' address) for 4 seconds (-n 4).

This is just a common way of 'stalling' or 'pausing' your batch file for a determined about of time.

The syntax he used just cleaned it up a bit... he created a variable called 'P4' and set it to 'Ping -n 4 127.0.0.1'. This way if he had to use it multple times through out the script he can simply reference the variable instead of typing out the entire line every time.

Ping -n 4 127.0.0.1>nul will ping that ip address (your local machines 'loopback' address) for 4 seconds (-n 4).

This is just a common way of 'stalling' or 'pausing' your batch file for a determined about of time.

The syntax he used just cleaned it up a bit... he created a variable called 'P4' and set it to 'Ping -n 4 127.0.0.1'.  This way if he had to use it multple times through out the script he can simply reference the variable instead of typing out the entire line every time.

You Beat Me To It Thanks For Replying :thumbup

@durex

Okay I see, thanks :thumbup

So basicly I could change this into a sleep of 4 seconds. Then again, I won't change it, this looks better :P

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.