The MASM Forum

Projects => MASM32 => Topic started by: dacacad on October 03, 2014, 12:47:45 AM

Title: modified installation destination, installation for multiple users
Post by: dacacad on October 03, 2014, 12:47:45 AM
I have installed MASM32, version 11 on a machine under Windows XP, as the administrator.
It passed without any problems.  I have tried to start various applications as the administrator,
and all apparently worked fine.

However, when I tried to invoke qeditor as a user, without admin  privileges, I could not. 

I have also noticed that the paths in the various configuration files all begin with "\masm32\...".


Q1: Could MASM32 be installed so that multiple non-privileged users can use it on a single machine?
Q2: Could MASM32 be installed in a directory other than the root?


Title: Re: modified installation destination, installation for multiple users
Post by: fearless on October 03, 2014, 02:32:28 AM
I use a subst drive M: to reference all my asm stuff, its real folder is c:\develop\asm
I call this from a batch file ran at startup of pc, which contains:

SUBST M: C:\DEVELOP\ASM

Then i have an m: drive, and in that i have my \masm32\ folders etc

So yes, you can use another folder for the actual usage. I think you need to move the installation from c:\masm32 (or whatever drive/folder originally installed to) to your own folder, and subst the drive. Remember to setup any shortcuts to reference this new drive or run exe's from the m: drive and not the c:\develop\asm one, so running m:\masm32\qeditor.exe should auto reference the m: drive root for all relevant stuff, like the \masm32 references etc.

Title: Re: modified installation destination, installation for multiple users
Post by: hutch-- on October 03, 2014, 11:27:11 AM
QE needs to have read/write access and if your user profile does not allow that, then you will have problems. All of MASM32 is fully portable which means it does not write to the OS at all and it does not take over file extensions like some others do but it means you must configure the profile to allow it all to run.

RE: The paths starting with \masm32\ ..... it is designed that way on purpose so that multiple installations can be done on different partitions. The fixed paths ensure that you don't end up with the wrong versions of LINK or other binaries. If you move it to another path apart from drv:\masm\ then most of the support files will not work.

To you 2 questions,

Quote
Q1: Could MASM32 be installed so that multiple non-privileged users can use it on a single machine?
Q2: Could MASM32 be installed in a directory other than the root?

The answer is NO and NO. This is development software and needs to have admin access for all of it to function.

This is the URL for the installation.

http://www.masm32.com/installation.htm
Title: Re: modified installation destination, installation for multiple users
Post by: dacacad on October 20, 2014, 09:25:08 PM
Quote from: fearless on October 03, 2014, 02:32:28 AM
I use a subst drive M: to reference all my asm stuff, its real folder is c:\develop\asm
I call this from a batch file ran at startup of pc, which contains:

SUBST M: C:\DEVELOP\ASM

Then i have an m: drive, and in that i have my \masm32\ folders etc

So yes, you can use another folder for the actual usage. I think you need to move the installation from c:\masm32 (or whatever drive/folder originally installed to) to your own folder, and subst the drive. Remember to setup any shortcuts to reference this new drive or run exe's from the m: drive and not the c:\develop\asm one, so running m:\masm32\qeditor.exe should auto reference the m: drive root for all relevant stuff, like the \masm32 references etc.

Thanks for the hint!

Now, here is a hack I came up with.  I have based it round SUBST.  It works all right, with a little bit of care from the users:

Installation:

1.  Log in as the Administrator, or as a user with admin privileges.

2.  Start the installation of masm32.  During the installation process select a drive on which masm32 is to be installed, e.g. the selected drive is C: , then complete the installation.  By the end of the installation process, allow the creation of a link (a shortcut) to masm32 editor.  The link will appear on the current user's Desktop.

     The installation will create directory \masm32 in the root directory of the selected drive, e.g. directory C:\masm32 will be created.

3.  After the installation, the newly created directory masm32 may be moved elsewhere in the file system.  However, it must be placed in a directory that is readable by ordinary users, i.e. by the users with Users privileges. E.G. directory masm32 has been moved to C:\Software, so the directory with masm32 is now C:\Software\masm32.

4.  Create directory C:\Documents and Settings\All Users\Start Menu\Programs\masm32.  Copy batch scripts masm32on.bat and masm32off.bat into this directory (see below for the batch scripts).

5.  Open a command line window (Start -> Programs -> Accessories -> Command Prompt).  Go to the directory containing masm32, i.e. execute:
         
C:         
cd \Software

6.  Temporarily assign a drive letter to this directory, e.g. drive letter M: is assigned to C:\Software.  Execute:

subst M: .

     Do not close the command line window, yet.

7.  Move link (shortcut) "MASM32 Editor" from the current user's Desktop into "C:\Documents and Settings\All Users\Start Menu\Programs\masm32" , that has been created in step 4.   Edit the properties of this link.  Click with the right mouse button in the "Shortcut" tab.   Set the value of "Target" to "M:\masm32\geditor.exe", then the value of "Start in" to "M:\masm32", then click on OK. 

8.  Go back to the command line window, and remove the substituted drive letter.  Execute:

subst /D M:

      The command line window may be closed.

This is all to do for the installation! In order to use masm32 as a non-privileged, ordinary user, do the following:


Use:

It is assumed that an ordinary user keeps his development files in a separate directory, e.g. ASM, somewhere in his tree.
In order to work on files in ASM:

1.  Execute masm32on.bat ( Start -> Programs -> masm32 -> masm32on.bat ).  Drive M: will appear on the list of drives, and directory \masm32 will appear in it.
2.  Create a link (shortcut) to the directory with the development files, e.g. ASM, and move it into M: drive.

3.  Do the work!  Invoke the editor from Start menu ( Start -> Programs -> masm32 -> MASM32 Editor )

4.  When the work is finished, exit the editor, and close all the windows that refer to files or directories on M: drive.

5.  Execute masm32off.bat ( Start -> Programs -> masm32 -> masm32on.bat ).  This will remove M: drive.

This last step is necessary so that the created substituted M: drive can be released to other users.





.bat files:

masm32on.bat

rem
rem start using MASM32 as a non privileged user
rem
%HOMEDRIVE%
subst /d M:
cd "%HOMEPATH%"
rmdir /q /s MDRV
mkdir MDRV
subst M: "%HOMEDRIVE%\%HOMEPATH%\MDRV"
M:
mkdir masm32
%HOMEDRIVE%
cd \Software
xcopy masm32 M:\masm32 /s /e /q
cd "%HOMEPATH%"








masm32off.bat

rem
rem clean up after using MASM32 as a non privileged user
rem
%HOMEDRIVE%
subst /d M:
cd "%HOMEPATH%"
rmdir /q /s MDRV





Title: Re: modified installation destination, installation for multiple users
Post by: fearless on October 20, 2014, 10:22:47 PM
Happy days, nicely done.
Title: Re: modified installation destination, installation for multiple users
Post by: Gunther on October 21, 2014, 12:28:08 AM
Good work, dacacad.  :t

Gunther