> How can this be done?!, Directory must stay portable
DaemonForce
post Oct 6 2007, 04:18 PM
Post #1


Advanced Member
***

Group: Members
Posts: 64
Joined: 29-August 07
From: SEA
Member No.: 10,328


United States


First of all I'd like to thank you for opening this thread.

I'm running into a frustration when running a remote registry command for data entry.
I have 64 problem keys that need fixing. I cannot proceed with my build without automating this process.
This is the first problematic command:
REG ADD "HKLM\...\{135698D2-3A37-4d26-99DF-E2BB6AE3AC61}\InProcServer32" /t REG_EXPAND_SZ /d "%SystemRoot%\System32\dmintf.dll" /f

The problem here is a bit obvious. I need %SystemRoot% to remain an unexpanded environment variable or the result is C:\WINDOWS\System32\dmintf.dll after running that command. I've tried working around this problem by using carrots before each % notation. I then get: ^%SytemRoot^%\System32\dmintf.dll

If I remove the quotes it's fine: %SystemRoot%\System32\dmintf.dll (IMG:../forums/style_emoticons/default/blink.gif)

Now that is fixed.
Here's the real problem:
I need those quotes for namespaces with two commands that have environment variables.

I'm using Alt+255 to generate a space character inside of these commands and I'm not so sure that's a good idea.

Any ideas as to make this work?
Go to the top of the page
 
+Quote Post
Digg this topic Add to my del.icio.us 3 Pages V   1 2 3 >  
Start new topic
Replies (1 - 9)
jaclaz
post Oct 6 2007, 04:22 PM
Post #2


Finder
***

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


Italy


QUOTE(Daemonforce)
First of all I'd like to thank you for opening this thread.

Didn't you start it? (IMG:../forums/style_emoticons/default/confused1.gif)

jaclaz
Go to the top of the page
 
+Quote Post
booty#1
post Oct 6 2007, 04:29 PM
Post #3


Advanced Member
***

Group: .script developer
Posts: 182
Joined: 30-March 07
Member No.: 4,830


Germany


Hi DaemonForce,

I am sorry but your post confuses me a bit. Please describe clearly what you are trying to do and what your problem is.

booty#1
Go to the top of the page
 
+Quote Post
DaemonForce
post Oct 6 2007, 04:37 PM
Post #4


Advanced Member
***

Group: Members
Posts: 64
Joined: 29-August 07
From: SEA
Member No.: 10,328


United States


QUOTE(jaclaz @ Oct 6 2007, 09:22 AM) *

Aha! (IMG:../forums/style_emoticons/default/laugh.gif)
QUOTE(booty#1 @ Oct 6 2007, 09:29 AM) *
Hi DaemonForce,

I am sorry but your post confuses me a bit.

It shouldn't. The problem confuses me...(IMG:../forums/style_emoticons/default/blink.gif)
QUOTE(booty#1 @ Oct 6 2007, 09:29 AM) *
Please describe clearly what you are trying to do and what your problem is.


I have a system variable %SystemRoot% that must stay that way in the registry. It can't be listed as C:\WINNT or C:\WINDOWS or X:\I386...(IMG:../forums/style_emoticons/default/rolleyes.gif)
The variable must remain unexpanded upon loading the command.

This can be fixed when placing carrots(^) around a variable name. The problem is that this doesn't seem to like quotes in the command. Now I'm running into entries that require two variables:
%windir%\onecommand /s %systemroot%\anothercommand

How can this be done without the use of quotes? (IMG:../forums/style_emoticons/default/blink.gif)
Go to the top of the page
 
+Quote Post
booty#1
post Oct 6 2007, 05:09 PM
Post #5


Advanced Member
***

Group: .script developer
Posts: 182
Joined: 30-March 07
Member No.: 4,830


Germany


Why do you use reg.exe instead of using WinBuilder's RegWrite function - or create a .reg-file and import it.
Then you would not face such problems.

booty#1
Go to the top of the page
 
+Quote Post
DaemonForce
post Oct 6 2007, 05:12 PM
Post #6


Advanced Member
***

Group: Members
Posts: 64
Joined: 29-August 07
From: SEA
Member No.: 10,328


United States


QUOTE(booty#1 @ Oct 6 2007, 10:09 AM) *
Why do you use reg.exe instead of using WinBuilder's RegWrite function - or create a .reg-file and import it.
Then you would not face such problems.

Two reasons:
I need to fully automate processing with a single command
This example is intended to function across a network
Go to the top of the page
 
+Quote Post
booty#1
post Oct 6 2007, 05:16 PM
Post #7


Advanced Member
***

Group: .script developer
Posts: 182
Joined: 30-March 07
Member No.: 4,830


Germany


QUOTE(DaemonForce @ Oct 6 2007, 07:12 PM) *
Two reasons:
I need to fully automate processing with a single command
This example is intended to function across a network

If you want to have only one command and common programs like reg.exe do not work as expected, why not programming your own tool that does exactly what you want?

booty#1
Go to the top of the page
 
+Quote Post
MedEvil
post Oct 6 2007, 05:18 PM
Post #8


Advanced Member
***

Group: .script developer
Posts: 1,257
Joined: 29-December 06
Member No.: 2,192



DaemonForce, with which application are you trying to write the keys? With WB?

(IMG:../forums/style_emoticons/default/cheers.gif)
Go to the top of the page
 
+Quote Post
DaemonForce
post Oct 6 2007, 05:20 PM
Post #9


Advanced Member
***

Group: Members
Posts: 64
Joined: 29-August 07
From: SEA
Member No.: 10,328


United States


QUOTE(booty#1 @ Oct 6 2007, 10:16 AM) *
If you want to have only one command and common programs like reg.exe do not work as expected, why not programming your own tool that does exactly what you want?

For one thing it's the only thing I can really guarantee to work. You would have to see my PE environment and poke around to understand the problem with it.
Also, a similar situation to what I'm facing now.
I believe this can be done via cmdline.
It goes back to my philosophy about Windows:
When I find something that can't be done via cmd, I'm usually doing something wrong.


Something worth thinking about. =/
QUOTE(MedEvil)
?

See the green text in first post.
Go to the top of the page
 
+Quote Post
booty#1
post Oct 6 2007, 05:23 PM
Post #10


Advanced Member
***

Group: .script developer
Posts: 182
Joined: 30-March 07
Member No.: 4,830


Germany


QUOTE(DaemonForce @ Oct 6 2007, 07:20 PM) *
When I find something that can't be done via cmd, I'm usually doing something wrong.

A Windows user that lives the Linux/Unix philosophy. Interesting (IMG:../forums/style_emoticons/default/wink.gif)
Go to the top of the page
 
+Quote Post
« Next Oldest · VistaPE · Next Newest »
 

3 Pages V   1 2 3 >
Fast ReplyReply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

Collapse

> Similar Topics

  Topic Replies Topic Starter Views Last Action
No New Posts Pinned: How to determine if a file is redistributable
Files within .scripts or hosted on boot-land servers
1 jaclaz 68 8th October 2007 - 10:48 AM
Last post by: psc
No New Posts how can i add extra shortcut
adding addition avariable and shortcut to script
7 carfan 257 28th September 2007 - 03:27 PM
Last post by: pedrole15
No New Posts How to add Drivers ?
in a "VistaPE" already built !!!
6 Haiphong 355 28th September 2007 - 02:32 AM
Last post by: powaking
No new Topic has attachmentsHow to circumvent Driver Signing Policy elevation?
Read our story and find out..
45 thunn 1,184 27th September 2007 - 10:19 AM
Last post by: Nuno Brito
No New Posts cant get working build
lsass.exe problem
5 carfan 234 19th September 2007 - 04:02 PM
Last post by: carfan


 

Display Mode: Switch to: Standard · Linear+ · Switch to: Outline

Track this topic · Email this topic · Print this topic · Subscribe to this forum

- Lo-Fi Version Time is now: 12th October 2007 - 04:43 AM

MKPortal ©2003-2006 mkportal.it