jwc Posted July 25, 2006 Share Posted July 25, 2006 The end result is I want to set an environment variable outside of the script using the set command to a particular network path. ex. set netpath=\\servername\share. Next I want to create an autoit script to open an explorer window to this path. The problem I'm having is when I set the environment variable, AutoIt doesn't read the contents that I set. I can read existing env variables but not the ones I set. I'm an amateur at this, more of a hacker at programs than a programmer so any help would be greatly appreciated. Thanks. Link to comment Share on other sites More sharing options...
Xenobiologist Posted July 25, 2006 Share Posted July 25, 2006 Hi, why using Env if you only want to get a share to another PC? So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
jwc Posted July 25, 2006 Author Share Posted July 25, 2006 I'm in a multi-user environment, I will be setting environment variables when user logs on. Different users will access different shares according to the variables that are set when loggin on. Link to comment Share on other sites More sharing options...
theguy0000 Posted July 25, 2006 Share Posted July 25, 2006 http://www.autoitscript.com/autoit3/files/...ions/EnvGet.htm The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN Link to comment Share on other sites More sharing options...
jwc Posted July 25, 2006 Author Share Posted July 25, 2006 I'm familar with the EnvGet command and this works fine and retrieves normal environment variables, however, variables that I set from a command prompt using the set command appear to be unretrievable using the EnvGet command. Ex. If I run "set junk=stuff" from a command prompt, when I run EnvGet command to retrieve "junk" there appears to be no data. If I run "set junk" from the command prompt, the data is there. ??? If I use the set command to create a variable in a command prompt, is it a global environment variable that can be retrieved by AutoIt? Link to comment Share on other sites More sharing options...
ZipleR Posted September 20, 2006 Share Posted September 20, 2006 I'm familar with the EnvGet command and this works fine and retrieves normal environment variables, however, variables that I set from a command prompt using the set command appear to be unretrievable using the EnvGet command. Ex. If I run "set junk=stuff" from a command prompt, when I run EnvGet command to retrieve "junk" there appears to be no data. If I run "set junk" from the command prompt, the data is there. ??? If I use the set command to create a variable in a command prompt, is it a global environment variable that can be retrieved by AutoIt?Use stdOutRead.strOutRead read will get the output of a process ID and then save that to a variable.Look for it in the index of the help, has a pretty good example Link to comment Share on other sites More sharing options...
theguy0000 Posted September 21, 2006 Share Posted September 21, 2006 Use stdOutRead.strOutRead read will get the output of a process ID and then save that to a variable.Look for it in the index of the help, has a pretty good examplethis thread is 2 months old... The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN Link to comment Share on other sites More sharing options...
Richard Robertson Posted September 21, 2006 Share Posted September 21, 2006 Environment variables only exist in the present environment. Once the process that made changes to the variable ends, the mini environment closes. This is why you cannot share environment variables in this way. Link to comment Share on other sites More sharing options...
ZipleR Posted November 17, 2012 Share Posted November 17, 2012 this thread is 2 months old...And your point? Link to comment Share on other sites More sharing options...
BrewManNH Posted November 17, 2012 Share Posted November 17, 2012 And your point?I hope you realize you just insulted a post from 6 years ago. And the post you insulted was pointing out someone necroing the thread, good going!!! If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
Developers Jos Posted November 17, 2012 Developers Share Posted November 17, 2012 Well it was his own post that got the comment, and even though it is only 6 years ago, one has to respond when somebody asks a question. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Recommended Posts