Digg this topic Add to my del.icio.us Submit to SlashDot 5 Pages V  « < 3 4 5  
Reply to this topicStart new topic
> Password protect, Either via Grub or at PE Switcher
psc
post Sep 21 2007, 03:05 PM
Post #41


Guru
***

Group: .script developer
Posts: 3,076
Joined: 14-July 06
From: Korschenbroich, Germany
Member No.: 3


Germany


This works (Resfile contains 'test')
CODE
[main]
Title=CodeBox test
Description=Running custom commands

[variables]
%tmpfile%=%ProjectTemp%\psc.txt
%resfile%=%ProjectTemp%\res.txt

[process]
If,ExistFile,%resfile%,FileDelete,%tmpfile%
FileCreateBlank,%resfile%
If,ExistFile,%tmpfile%,FileDelete,%tmpfile%
FileCreateBlank,%tmpfile%
TXTAddLine,%tmpfile%,"[mysection]","Append"
ShellExecute,Open,"cmd.exe","/c for /f %a in ('echo test') do (echo myvalue=%a >> #$q%tmpfile%#$q)"
IniRead,%tmpfile%,"mysection","myvalue",%myVar%
Message,%myVar%,Information
TXTAddLine,%resfile%,%myVar%,"Append"

The main difference I see:
QUOTE
TXTAddLine,%resfile%,%myVar%,"Append"

QUOTE
TXTAddLine,"%MenuFile%",%myVar%,"Append"

You see that your line has quotes around the file name?

Peter
Go to the top of the page
 
+Quote Post
powaking
post Sep 21 2007, 03:10 PM
Post #42


Advanced Member
***

Group: Members
Posts: 104
Joined: 11-September 06
From: Fall River, MA
Member No.: 372


United States


QUOTE(psc @ Sep 21 2007, 03:05 PM) *
This works (Resfile contains 'test')
CODE
[main]
Title=CodeBox test
Description=Running custom commands

[variables]
%tmpfile%=%ProjectTemp%\psc.txt
%resfile%=%ProjectTemp%\res.txt

[process]
If,ExistFile,%resfile%,FileDelete,%tmpfile%
FileCreateBlank,%resfile%
If,ExistFile,%tmpfile%,FileDelete,%tmpfile%
FileCreateBlank,%tmpfile%
TXTAddLine,%tmpfile%,"[mysection]","Append"
ShellExecute,Open,"cmd.exe","/c for /f %a in ('echo test') do (echo myvalue=%a >> #$q%tmpfile%#$q)"
IniRead,%tmpfile%,"mysection","myvalue",%myVar%
Message,%myVar%,Information
TXTAddLine,%resfile%,%myVar%,"Append"

The main difference I see:
You see that your line has quotes around the file name?

Peter


Hmmm interesting. I haven't even thought of that. I now have it so that I can password protect certain items in the menu just by modifying the source.

THANKS!
Go to the top of the page
 
+Quote Post
« Next Oldest · Grub4dos · Next Newest »
 

5 Pages V  « < 3 4 5
Fast ReplyReply to this topicStart new topic

Collapse

> Similar Topics

  Topic Replies Topic Starter Views Last Action
Moved Password protect
Either via Grub or at PE Switcher
0 powaking 0 19th September 2007 - 12:49 PM
Last post by: powaking


 

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

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

- Lo-Fi Version Time is now: 18th October 2007 - 12:56 PM

MKPortal ©2003-2006 mkportal.it