Windows NT4 Drive Mapping for Citect as a service ?


Thread Starter

Neil Firmin

I need to map to a network share using a Windows NT4 (sp6) box to a specific drive letter for a Citect application that runs on the PC. Citect is configured to start as a service under the "system account" and has interaction with the desktop. How do I map a network share for Citect to use so that the mapping can also survive Logon/Logoff and reboot of the NT box if necessary. I need a mapping that is independent of the user currently logged in but that applications started as services can use. I've looked at NET USE /persistent etc under a "AT" type command but these dont survive after reboot. This must be a simple one for the wizards out there ! thanks, Neil Firmin Technical Officer Yallourn Energy Pty Ltd

Alex Pavloff

Hi Neil. I don't think that what you want is possible. Searching the MSDN Knowledge base came up with this tidbit of info (in KB Article #Q257174. This actually relates to using mapped drives with IIS -- but its a similar situation, a service accessing a network drive. From the article: Drive mappings are an extension to the net use command and are created on a per-user basis. That is, the entries for drive mappings exist under the Hkey_Current_User registry key for the user who maps to the network drive. Also, drive mappings are created with the credentials of the user who is currently logged on. My suggestion: Try to use a UNC path instead (\\server\share). You can usually use those in place of mapped drives. However, when you do that, you won't be able use the System Account, because the system account doesn't have rights to access other machines -- you'll have to make Citect log in with an account that has full rights to the system as well as the rights to access the other machines that you need to. Good luck! Alex Pavloff Software Engineer Eason Technology

Dave Ferguson

Have the administrator of your NT domain create a login script that uses the Net Use command in it to map the share point. Now you must assign that login script to all users who will log on. The share point is a bit trickier, create a group and put the users who will log into this machine into that group and then assign them rights to the share point. Now when they log in, the share will map and they will have rights to it. E-mail me off list if you want more detailed info or have more detailed info........ [email protected] Dave Ferguson Blandin Paper Company UPM-Kymmene DAVCO Automation
Hi Neil, I have never tried this while running Citect as the shell, but you can try the following: Set up your required mappings with the Net Use command in a .bat file. Execute the file at startup using the cicode "Exec()" function. Jack Rainey Highland Valley Copper

Johan Bengtsson P&L Automatik AB

I have done a similar thing (starting with at) in this way: 1. Use a "normal" account instead, possibly with administrator rights if necessary, you can lock down that account so it can't log on on any other computer in the domain and assign it a such obscure password that you have to look it up yourself... 2. I start my application thru a .bat file (I need that for my application anyway) and I execute some net use instructions there before I start my actual application For some reason some of the applications I start shutdown when someone logs on and then off again, while other remain active, the difference is quite easy: GUI programs shut down and command-line based doesn't but I fail to understand why (you don't have to answer this, I just wanted to point it out) /Johan Bengtsson ---------------------------------------- P&L, Innovation in training Box 252, S-281 23 H{ssleholm SWEDEN Tel: +46 451 49 460, Fax: +46 451 89 833 E-mail: [email protected] Internet: ----------------------------------------