NET USE in VISTA to a Shared Printer on XP giving ACCESS DENIED

I am trying to use a DOS Application on VISTA - I know I know but I need to run this application on VISTA.
The application runs fine except I use a NET USE command to capture output to LPT1: and redirect it to a Shared Printer on the Network.  When I start my application I run a batch file which contains the NET USE commands to connect to Shared Network Resources that I want to use.  The NET USE command that assigns a Drive Letter to the Shared Data Files works fine but the NET USE command that attempts to capture LPT1: to a Shared Printer returns ACCESS DENIED.  This would indicate that there is a permission problem with the Shared Printer.  However, when I then go to a Command Prompt and entre the same NET USE command it connects without a problem.
RussellWinterscheidtAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

younghvCommented:
Hi,
I haven't played with it that much (yet) but I have found that the "Net" commands on my Vista box are different from XP.

If you type (net help use) from a command prompt, you will see some of the bigger differences.



Vic
0
Michael PfisterCommented:
Are you starting your script from an elevated command prompt?
Even the "Admin" on a Vista box is quite restriected. To really get full admin access, right click on the batch starting your app and select: "Run as administrator...."

Hope it helps, Michael
0
RussellWinterscheidtAuthor Commented:
The NET USE command works if I start it by right clicking the batch file - however - this does not parse the AUTOEXEC.NT and CONFIG.NT files that happens when the batch file is started from a shortcut and I need the AUTOEXEC.NT and CONFIG.NT files to be parsed.  

The USER that is logged in is set as an ADMINISTRATOR - Is this not good enough or the same as right clicking the batch file and selecting "Run as Administrator"???

Is there some way of making a Shortcut "Run as Administrator"???
0
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

Ryan_RIT Systems AdministratorCommented:
Get TweakVI (google it)
In there is a tweak so that ALL command issued from the RUN box run as the administrator.

I'll see if I can find out if there's a way to make a shortcut to the 'Run as...' option
0
Ryan_RIT Systems AdministratorCommented:
http://www.computerperformance.co.uk/vista/vista_run_command.htm

According to this you can set Advanced options for your shortcuts so that they always run as an Administrator.  [r/click shortcut>properties>advanced - or something like that]

I'll also try it out on my PC when I get home - untill then let me know if this solves your problem.
0
Ryan_RIT Systems AdministratorCommented:
One other thing you might want to check:

I have a funny feeling that 'administrator' users are actually set as Power Users - try r/clicing My Comp - choose Manage
On the left choose Local Users and Groups
Choose Users
dbl-click your username
If not already done so add it to the "Administrators" group.

If you get on Vista befoer me let me know if I'm right or not with this one   :)
0
Ryan_RIT Systems AdministratorCommented:
1 out of 2 ain't bad:  (on Vista now)


YOUR SOLUTION: Right click the shortcut you have made. Ensure you are on the General tab. Click Advanced. Tick the box that says 'Run as Administrator'
All done



The one I got wrong was about being a Power User and not an Administrator (if you're wondering).
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
younghvCommented:
I have a link somewhere to the instructions on how to access the 'Real' Administrator account in Vista.
As I remember, it is somewhat like XP Home - even members of the "Administrator" user group do not have full Administrator rights.

Will post if I can find it.

Vic
0
Ryan_RIT Systems AdministratorCommented:
perhaps that means that there's a difference between each edition of Vista (ie Home Premium has *fake administrators* and Business has *real ones*) - i'm running Ultimate 32bit

enabling the Administrator account is quite simple:
r/click My Comp and click Manage
On the left side - choose Local Users and groups - then choose Users
double click Administrator and untick "Account is disabled"
click OK and log off to find it there. You should have setup an Admin password during Vista setup
0
RussellWinterscheidtAuthor Commented:
It is now working - the solution was to set the "Run as Administrator" option in the Program's Shortcut - Compatibility Tab - Tick "Run this program as a administrator"
I also disabled the "User Account Control" because the warning messages were driving me crazy.
It now works as expected.
Thanks
0
Ryan_RIT Systems AdministratorCommented:
Thanks for the points
0
younghvCommented:
Hey Ryan - good lick!
I will save that one for future use.

Vic
0
Ryan_RIT Systems AdministratorCommented:
Sometimes the easiest way to get info is to use Vista Help! - although it has let me down a bit today with irrelevant search results and very few technical articles, which means back to google   :-P
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Vista

From novice to tech pro — start learning today.