Digg this topic Add to my del.icio.us Submit to SlashDot 2 Pages V   1 2 >  
Reply to this topicStart new topic
> driver setting in registry vs command line switch, help request
bilou_gateux
post Sep 29 2007, 05:22 PM
Post #1


Advanced Member
***

Group: Advanced user
Posts: 68
Joined: 1-August 06
Member No.: 97


France


QUOTE (Olof Lagerkvist @ May 11 2007, 06:38 PM) *
All driver settings are in a very "techincal" format in the registry, basically based on the data structure the user mode applications send to the driver when a new virtual disk is created. You can create a registry key HKLM\SYSTEM\CurrentControlSet\Services\ImDisk\Parameters.

I'm a little lost on this one, can someone help me out.

Basically, i want to automount at boot an image containing Lotus Notes 7.0.2 - NOMAD.

The command line used in batch script:
CODE
:Mount
if not exist "%ProgramFiles%\Lotus" md "%ProgramFiles%\Lotus"
  imdisk -a -t vm -f %~dp0Nomad.img -m "%ProgramFiles%\Lotus"
:AutoStart
::# "%ProgramFiles%\Lotus\notes\notes.exe" "=%ProgramFiles%\Lotus\notes\notes.ini"


ImDisk is already installed.
Should i set /v "Start" /t REG_DWORD /d "0" for both ImDisk and ImDskSvc? Current data value is "3"
What are the correct registry settings?
Go to the top of the page
 
+Quote Post
Olof Lagerkvist
post Sep 30 2007, 09:43 AM
Post #2


Advanced Member
***

Group: Developer
Posts: 122
Joined: 27-April 07
From: Borås, Sweden
Member No.: 6,234


Sweden


QUOTE (bilou_gateux @ Sep 29 2007, 07:22 PM) *
Basically, i want to automount at boot an image containing Lotus Notes 7.0.2 - NOMAD.

First, the registry settings equivalent to you command line, in the form of a .reg file:
CODE
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ImDisk\Parameters]
"Flags0"=dword:00000200
"FileName0"="\\??\\C:\\Directory\\Images\\Nomad.img"
"LoadDevices"=dword:00000001

Change the FileName0 setting to the correct path to the image file.

Then, set the imdisk driver to autostart. That can be done with the reg command but I prefer the sc command for changing service control settings for drivers and services. In this case:
CODE
sc config imdisk start= auto

This will give you a RAM-disk automatically when Windows starts, with the image file loaded to it. Then you will need to fix the junction point so that the directory "%ProgramFiles%\Lotus" actually redirects to the ImDisk drive. You can use my junc.exe tool for that and this command line syntax:
CODE
junc "%ProgramFiles%\Lotus" \Device\ImDisk0\


This should make it.
Go to the top of the page
 
+Quote Post
jaclaz
post Sep 30 2007, 10:12 AM
Post #3


Finder
***

Group: Advanced user
Posts: 1,622
Joined: 14-July 06
Member No.: 2


Italy


If I may:
QUOTE (Olof Lagerkvist)
[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\ImDisk\Parameters]

is not always the "right" ControlSet.

One should either use "CurrentControlSet" or inspect via the batch the
HKEY_LOCAL_MACHINE\SYSTEM\Select
key and act accordingly.
As an example the 2K machine I am writing from has this contents:
QUOTE
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\Select]
"Current"=dword:00000002
"Default"=dword:00000002
"Failed"=dword:00000001
"LastKnownGood"=dword:00000003


(due to a corrupted controlset)

jaclaz
Go to the top of the page
 
+Quote Post
Olof Lagerkvist
post Sep 30 2007, 10:15 AM
Post #4


Advanced Member
***

Group: Developer
Posts: 122
Joined: 27-April 07
From: Borås, Sweden
Member No.: 6,234


Sweden


QUOTE (jaclaz @ Sep 30 2007, 12:12 PM) *
If I may:

is not always the "right" ControlSet.

One should either use "CurrentControlSet" or inspect via the batch the
HKEY_LOCAL_MACHINE\SYSTEM\Select
key and act accordingly.

Absolutely. I just did a copy-and-paste and did not really check that part. I have corrected my post to "CurrentControlSet" now.
Go to the top of the page
 
+Quote Post
bilou_gateux
post Sep 30 2007, 03:23 PM
Post #5


Advanced Member
***

Group: Advanced user
Posts: 68
Joined: 1-August 06
Member No.: 97


France


QUOTE (jaclaz @ Sep 30 2007, 12:12 PM) *
If I may:

is not always the "right" ControlSet.

One should either use "CurrentControlSet" or inspect via the batch the
HKEY_LOCAL_MACHINE\SYSTEM\Select
key and act accordingly.
As an example the 2K machine I am writing from has this contents:
(due to a corrupted controlset)

jaclaz

Offline registry editing here, that's why i have selected ControlSet001 which is Default in my case.

@Olof,
I agree with you. Change status of a service with the right tool is even better.
Go to the top of the page
 
+Quote Post
ktp
post Oct 5 2007, 09:30 AM
Post #6


Advanced Member
***

Group: Members
Posts: 210
Joined: 16-February 07
Member No.: 3,365



I always found adding reg/inf to BartPE/UBCD4Win a little "technical". For ImDisk I believe a plugin
(inf/xml) was posted by someone. But I found it is easier (at least for me) to just after BartPE boot,
to click on ImDiskinst.exe, then in the Control Panel I find the usual umbrella applet :-).
Of course it is not permanent, but sufficient for me. ImDisk looks like then as portable application for me,
which I like a lot. A vast majority of portable applications run under BartPE, so it is really nice
(no install, no explicit registry tweaking).

For adding portable applications, I do not create a plugin for each of them, just use Total Commander to the
right application directory and start them. For a little housekeeping, you can also use pstart which is much
user-friendly than nu2menu, with dynamic menu creation, very useful for USB key (writable).
Go to the top of the page
 
+Quote Post
bilou_gateux
post Oct 15 2007, 10:18 AM
Post #7


Advanced Member
***

Group: Advanced user
Posts: 68
Joined: 1-August 06
Member No.: 97


France


When the command used to mount the image is:
CODE
imdisk -a -f %~dp0P_Notes.img -m  "%ProgramFiles%\Lotus"


what's the command to unmount it:
i can check the mounted images with
QUOTE
imdisk -l
\Device\ImDisk0
\Device\ImDisk1


but my mounted image has no drive letter assigned and i can't use the command imdisk -d -m <drive_letter>

I hope i haven't already ask this question in an another thread but can't find an answer.
Go to the top of the page
 
+Quote Post
jaclaz
post Oct 15 2007, 11:50 AM
Post #8


Finder
***

Group: Advanced user
Posts: 1,622
Joined: 14-July 06
Member No.: 2


Italy


I am not sure this is the "correct" answer, but what I normally do is:
CODE
imdisk -l

and I have, say, the same output you got:
QUOTE
\Device\ImDisk0
\Device\ImDisk1

then I issue:

QUOTE
imdisk -l -u 0


and

QUOTE
imdisk -l -u 1



from the output I get which device number is assigned to the image, (0 in my case), then I issue:
QUOTE
imdisk -d -u 0


The above can easily be made into a few lines of batch. (IMG:http://www.boot-land.net/forums/style_emoticons/default/smile.gif)

jaclaz
Go to the top of the page
 
+Quote Post
Olof Lagerkvist
post Oct 15 2007, 01:15 PM
Post #9


Advanced Member
***

Group: Developer
Posts: 122
Joined: 27-April 07
From: Borås, Sweden
Member No.: 6,234


Sweden


QUOTE (bilou_gateux @ Oct 15 2007, 12:18 PM) *
When the command used to mount the image is:
CODE
imdisk -a -f %~dp0P_Notes.img -m  "%ProgramFiles%\Lotus"


what's the command to unmount it:

CODE
imdisk -d -m "%ProgramFiles%\Lotus"
Go to the top of the page
 
+Quote Post
blobbo
post Nov 2 2007, 06:34 PM
Post #10


Newbie
*

Group: Members
Posts: 1
Joined: 2-November 07
Member No.: 11,632


United Kingdom


Please could you give an extra explanation, Olof.

Using the example you gave at the beginning of this thread, to autostart imdisk using registry settings


Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ImDisk\Parameters]
"Flags0"=dword:00000200
"FileName0"="\\??\\C:\\Directory\\Images\\Nomad.img"
"LoadDevices"=dword:00000001


I tried this to replace the following command line start

imdisk.exe -a -t vm -f c:\ramdisk.img -m R:

and created the following registry keys after reading through the source of imdisk, but not fully understanding what it does.

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ImDisk\Parameters]
"Flags0"=dword:00000200
"FileName0"="\\??\\C:\\ramdisk.img"
"DriveLetter0"="R:"
"LoadDevices"=dword:00000001

I have also set the imdisk service to autostart using the sc command as described in your earlier post.

I have varied the FileName0 string and th DriveLetter0 string (maybe it should be a Dword?), but I cannot get the drive image to load at start up.
if I enter the same commandline as before, it works fine.

Please can you advise on what should be in the registry.

Thanks in advance.
Go to the top of the page
 
+Quote Post
Olof Lagerkvist
post Nov 2 2007, 07:57 PM
Post #11


Advanced Member
***

Group: Developer
Posts: 122
Joined: 27-April 07
From: Borås, Sweden
Member No.: 6,234


Sweden


I have no idea, everything looks ok to me. Can you check if the drive gets loaded but just missing the drive letter? You would see it in the Control Panel applet listed as a drive without a driveletter in that case.
Go to the top of the page
 
+Quote Post
bilou_gateux
post Nov 3 2007, 01:15 PM
Post #12


Advanced Member
***

Group: Advanced user
Posts: 68
Joined: 1-August 06
Member No.: 97


France


QUOTE (blobbo @ Nov 2 2007, 08:34 PM) *
Please could you give an extra explanation, Olof.

Using the example you gave at the beginning of this thread, to autostart imdisk using registry settings


Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ImDisk\Parameters]
"Flags0"=dword:00000200
"FileName0"="\\??\\C:\\Directory\\Images\\Nomad.img"
"LoadDevices"=dword:00000001


I tried this to replace the following command line start

imdisk.exe -a -t vm -f c:\ramdisk.img -m R:

and created the following registry keys after reading through the source of imdisk, but not fully understanding what it does.

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ImDisk\Parameters]
"Flags0"=dword:00000200
"FileName0"="\\??\\C:\\ramdisk.img"
"DriveLetter0"="R:"
"LoadDevices"=dword:00000001

I have also set the imdisk service to autostart using the sc command as described in your earlier post.

I have varied the FileName0 string and th DriveLetter0 string (maybe it should be a Dword?), but I cannot get the drive image to load at start up.
if I enter the same commandline as before, it works fine.

Please can you advise on what should be in the registry.

Thanks in advance.

@blobbo

I have the same issue: no drive letter assigned to the mounted image.
I finally gave up on this one and currently trying another free RamDisk for the purpose of mounting a ramdisk at boot and set %temp% and IECache data to it.

I need to use a fully operational solution at boot for a shared computer (Internet kiosk public access PC) with all temporary data stored on RamDisk not kept at shutdown.
For my own usage, i will continue to use ImDisk as it has a lot of nice other features.
Hope Olof may find why it don't works with our Windows boxes.
Go to the top of the page
 
+Quote Post
Olof Lagerkvist
post Nov 3 2007, 03:31 PM
Post #13


Advanced Member
***

Group: Developer
Posts: 122
Joined: 27-April 07
From: Borås, Sweden
Member No.: 6,234


Sweden


QUOTE (bilou_gateux @ Nov 3 2007, 03:15 PM) *
@blobbo

I have the same issue: no drive letter assigned to the mounted image.
I finally gave up on this one and currently trying another free RamDisk for the purpose of mounting a ramdisk at boot and set %temp% and IECache data to it.

Just a couple of ideas while waiting for a better solution...

For this case, do you really need a drive letter? You could try to mount it under a subdirectory if you like (discussed earlier in this thread).

You could also try to assign the drive letter via Session Manager registry settings. Add a string value under HKLM\SYSTEM\CurrentControlSet\Session Manager\DOS Devices, set the name of the string value to the drive letter followed by a colon and the value data to \Device\ImDisk0. When you reboot, the drive letter will be pointing to the first ImDisk device. The drawback is that the ImDisk driver does not "know" about this drive letter so that it can't show it for example in the Control Panel applet.
QUOTE (bilou_gateux @ Nov 3 2007, 03:15 PM) *
Hope Olof may find why it don't works with our Windows boxes.

As it looks right now the chances are not very big that I will find out what is wrong, because I cannot reproduce the problem on any of my test machines. So, I have no idea where to start looking for anything... (IMG:../forums/style_emoticons/default/dubbio.gif) (IMG:../forums/style_emoticons/default/frusty.gif)

If anyone get any kind of clues about when this problem happens, please post as many details as possible here.
Go to the top of the page
 
+Quote Post

2 Pages V   1 2 >
Fast ReplyReply to this topicStart new topic

Members Who Viewed Topic Today ()

 

RSS Lo-Fi Version Time is now: 3rd March 2008 - 06:26 AM

MKPortal ©2003-2006 mkportal.it