Fragments
A Collection of Statements, kinda
Runas msi file

 
Post new topic   Reply to topic    Fragments Forum Index -> General Technical
View previous topic :: View next topic  
Author Message
martin
Site Admin


Joined: 19 Jan 2004
Posts: 455
Location: In the middle of Sweden

Reply with quote

PostPosted: Mon Apr 25, 2005 10:29 pm    Post subject: Runas msi file

This I don't want to forget.

If you work under a non-admin account on XP or 2K, you install stuff using runas, usually. Which, naturally, doesn't work on .msi files, since they're not executable. And these come from, you guessed it, Mickeysoft, usually. Damn, these guys are convoluted. So, to install from a .msi, open the command windows, then do:

runas /user:administrator "msiexec /i packagename.msi"

Note that blanks embedded in the packagename or its path causes grief.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
nevelsteen



Joined: 19 Jan 2004
Posts: 90
Location: Uppsala, Belgium or Texas

Reply with quote

PostPosted: Sun May 22, 2005 7:12 pm    Post subject:

I have been trying the RunAs option under a normal user account and I must say that I am highly UNimpressed. Maybe it is me, but how do you change harddrive rights using RunAs? You can't say RunAs admin for explorer.

For other apps, the RunAs didn't function 100%. The child processes of the RunAs admin'ed program don't seem to inherited the security privalledges well. I believe to remember it was while trying to uninstall software.

-KiM "UNimpressed so far"


Last edited by nevelsteen on Tue Oct 14, 2008 6:17 am; edited 1 time in total
Back to top
View user's profile Send private message
martin
Site Admin


Joined: 19 Jan 2004
Posts: 455
Location: In the middle of Sweden

Reply with quote

PostPosted: Sun May 22, 2005 8:15 pm    Post subject:

Well, to put it bluntly, it's a pile of horsedung. I'm working as non-admin all the time. Or at least, all the time it allows me to do it. That is, half the time. The runas system indeed only works sometimes and doesn't handle child processes right. Then, you can't run some utilities (like defrag) this way, since they've moved them into the management console. Maybe there's a way of doing it anyway, but it's getting to hairy for words.

The only system that holds up, almost, is using "fast user switching" and having both an admin and a non-admin logged in at the same time. Switching as needed. Which isn't, by any stretch of the imagination, instantaneous.

(A little caveat here: if you switch to the admin user account, start defragging, switch back to the non-admin account, you risk corrupting your hard disk, if it's external. At least, that happened to me, twice. XP disconnects the USB drive sometimes, so the MFT doesn't update and... boom... Then, of course, you run "Check disk for errors" that then says it "cannot complete checking disk", which sounds fatal. Big disappointment until you discover that what they meant to say was that you need to enable fixes to proceed. From which part of hell did these guys come?)

On the other hand, as a developer you *have* to run as non-admin. Why? Else you make software just like, the otherwise excellent, organisation that made my accounting software. It works fine under a non-admin, but if I try to create a company or remove a company, it corrupts the SQL database unless I'm an admin, spewing meaningless errors in the process. Making backups of the accounting data only gives very weird error messages if I'm not admin, but no backup. I'm sure these guys developed under admin accounts, else it wouldn't have happened. I told them and they didn't even know (making me wonder how many of their users work under non-admin accounts; none, I'm sure).

Now, sorry guys, but it's time for some Mac OSX comparisons. I never run as admin there. If an installation or update or something needs admin rights, it simply pops up a dialog box asking for my admin password, and then continues on its merry way! Could someone please show these guys at Mickeysoft a Mac with OSX on it?

I must say that getting a Mac has not been good for my morale. Windows starts pissing me off no end, ever since I realized it doesn't have to be this way.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
martin
Site Admin


Joined: 19 Jan 2004
Posts: 455
Location: In the middle of Sweden

Reply with quote

PostPosted: Sun May 22, 2005 8:17 pm    Post subject:

Kim,

What I actually was going to say, before I got carried away, is that you can probably do it from the commandline using cacls.exe. That is

runas /user:administrator "cacls ..."

something. If you really feel like it...
Back to top
View user's profile Send private message Send e-mail Visit poster's website
nevelsteen



Joined: 19 Jan 2004
Posts: 90
Location: Uppsala, Belgium or Texas

Reply with quote

PostPosted: Tue May 24, 2005 9:58 pm    Post subject:

After reading your reply, I think I shall give up on the notion of RunAs. BAH!

Btw, you say that as a programmer you have to program as non-Admin, but isn't it set in the security settings that only Administrators can debug under Windows? I thought I saw that as a default security setting last time I looked. (Could be wrong here. Haven't tried and don't want to anymore.)

I will leave my PC for what it actually *can* do (under the admin account Rolling Eyes ) until I bump into an alternative (which could be one of those cute mini-Macs).
Back to top
View user's profile Send private message
martin
Site Admin


Joined: 19 Jan 2004
Posts: 455
Location: In the middle of Sweden

Reply with quote

PostPosted: Wed May 25, 2005 7:03 am    Post subject:

The "debug" privilege is separate. When you install a debugger, like Visual Studio, it automatically sets that privilege. It doesn't require admin rights.

OTOH, having that privilege (debug) opens your account to spectacular attacks, even though I haven't heard of any specifically attacking debugging programmers. But they will come.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
martin
Site Admin


Joined: 19 Jan 2004
Posts: 455
Location: In the middle of Sweden

Reply with quote

PostPosted: Wed May 25, 2005 7:07 am    Post subject:

Just to add another gripe. Lately, all Installshield based setups have problems on my machine. They stay on "99%" preparing for a long time before proceeding. Some, like the patches for Acrobat 5.0, don't work at all anymore. To get them installed I have to boot up into safe mode, install, boot normally again. I know Adobe wants me to upgrade, but I simply refuse. (BTW, pdf generation is now a part of Mac OSX itself... ahem...)

This is getting really gross.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Fragments Forum Index -> General Technical All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Theme created by K.Nevelsteen